Error: No document id'); //create HTTP connection client and set connection properties $client =& DaisyHTTPClient::singleton(); $client->connect(REPOSITORY_HOST, REPOSITORY_PORT); //create publisher request from a particular user $req =& new DaisyPublisherRequest(new DaisyUser(REPOSITORY_USER, REPOSITORY_PASSWORD)); //add tag to the request and set some of its properties @$doc = $req->addDocument($_GET['id'], $_GET['branch'], $_GET['language'], $_GET['version']); //add tag to the $doc->addPreparedDocuments(); //add all the tags that can be contained by $doc->addComments(); $doc->addAvailableVariants(); //$doc->addAclInfo(); //$doc->addSubscriptionInfo(); //trying out different publisher requests //$doc->addShallowAnnotatedVersion(); //$doc->addAnnotatedDocument(); $doc->addAnnotatedVersionList(); //$dif = $doc->addDiff(); //$dif->addOtherDocument(2, 1, 1, 1); //$req->addMyComments(); $tree = $doc->addNavigationTree(); $tree->addNavigationDocument(1, 1, 'default'); $tree->addActiveDocument($_GET['id'], $_GET['branch'], $_GET['language']); $tree->addContextualized(false); //$req->addPerformQuery()->addQuery("select id, name where InCollection('main') and branch = 'main' and language = 'ua'"); //$req->addIf('true')->addPerformQuery()->addQuery("select id, name where InCollection('main') and branch = 'main' and language = 'ua'"); //$foreach = $req->addForEach(); //$foreach->addQuery("select id, name where InCollection('main') and branch = 'main' and language = 'ua'"); //@$foreach->addDocument($_GET['id'], $_GET['branch'], $_GET['language'], $_GET['version']); //@$req->addGroup('1')->addDocument($_GET['id'], $_GET['branch'], $_GET['language'], $_GET['version'])->addComments(); //$tree = $req->addGroup('2')->addNavigationTree(); //$tree->addNavigationDocument(1, 1, 'default'); //$tree->addActiveDocument($_GET['id'], $_GET['branch'], $_GET['language']); //$tree->addContextualized(false); //@$req->addResolveDocumentIds($_GET['branch'], $_GET['language'])->addDocument($_GET['id'], $_GET['branch'], $_GET['language'], $_GET['version']); //send publisher request to the repository server $req->sendRequest(); //exit; require_once IMPLEMENTED_CLASSES_PATH.'PHPDaisyPublisherInlinedTagsConvertor.php'; require_once IMPLEMENTED_CLASSES_PATH.'SmartyDaisyPublisherInlinedTagsConvertor.php'; require_once IMPLEMENTED_CLASSES_PATH.'SmartyDaisyPublisherResponseTemplate.php'; require_once PUBLISHER_RESPONSE_PATH.'DaisyPublisherResponsePreparedDocuments.php'; require_once PUBLISHER_RESPONSE_PATH.'DaisyPublisherHtmlPart.php'; //include Smarty require_once TEMP_PATH.'Smarty/Smarty.class.php'; //initialize Smarty template engine object $engine = new Smarty(); $engine->compile_dir = TEMPLATES_C; $engine->template_dir = TEMPLATES_PATH; $engine->caching = 0; //initialize XSLT processor //$engine = new XSLTProcessor(); //create response object from the repository server reply $resp = DaisyPublisherResponse::processResponse( new SmartyDaisyPublisherInlinedTagsConvertor(new SmartyDaisyPublisherResponseTemplate($engine)), // new PHPDaisyPublisherInlinedTagsConvertor(), $req->getResponse()); $preparedDoc = new DaisyPublisherResponsePreparedDocuments( $resp, new SmartyDaisyPublisherResponseTemplate($engine), new PHPDaisyPublisherInlinedTagsConvertor()); $preparedDoc->defaultDocumentTemplate = TEMPLATES_PATH.'preparedDoc.tpl'; $preparedDoc->preparedDocumentsTemplate = TEMPLATES_PATH.'preparedDocs.tpl'; $preparedDoc->errorTemplate = TEMPLATES_PATH.'error.tpl'; $preparedDoc->setCustomTemplate('Image', TEMPLATES_PATH.'preparedDocImage.tpl'); $res = $preparedDoc->process(); echo $res[0]['html']; ?>