|
|||||||||||||||||||||
|
|
5. Serving DocBook 4.1.2 XMLThere are 3 ways to serve DocBook 4.1.2 XML from a web server:
Using an application server like Cocoon is the best the option.
In this section we will see how to serve DocBook 4.1.2 XML content using Tomcat + Cocoon. 5.1. Tomcat + CocoonTomcat is the Java Servlet Container. For more information please visit http://jakarta.apache.org/tomcat/index.html. Apache Cocoon is an XML publishing framework. For more information please visit http://xml.apache.org/cocoon/index.html. This HOWTO will not go into details of setting up Tomcat + Cocoon, since it is already explained in the document http://xml.apache.org/cocoon/installing/index.html. Setting up Tomcat + Cocoon is an easy process and should take less than five minutes. Once you have the Cocoon + Tomcat setup and working, please follow the next the sections to server DocBook 4.1.2 XML content.
At the very least, make sure you're using the latest JRE from Sun (at this writing, 1.4.2). Also consider upgrading the Xalan parser to the latest release. At this writing, the latest Sun JRE, 1.4.2, is bundled with Xalan 2.4.1, while Xalan itself is up to version 2.5.1. To check the version currently installed, type
For more info, visit http://xml.apache.org/xalan-j/faq.html . 5.2. Installing Norman Walsh's XSLIn this step we will install the Norman Walsh's XSL under the /usr/local/dbtools/ directory. Change to the /tmp/downloads directory and untar the docbook-xsl file.
To install the docbook-xsl please move the files to the /usr/local/dbtools.
Next install the LDP XSL. 5.3. Installing LDP XSLUnzip the tldp-xsl-xxxxx.tar.gz and the copy all the files to the /usr/local/dbtools/docbook-xsl/html directory.
5.4. Setting up sitemap.xmap$COCOON_HOME points to the Cocoon Web Application Directory. This directory is typically /usr/local/jakarta-tomcat-4.1.9/webapps/cocoon/ Create a directory named docbook under the $COCOON_HOME/mount. This is where we will put all our DocBook XML 4.1.2 content.
Create a file name sitemap.xmap in the $COCOON_HOME/mount/docbook with the following content:
5.5. Accessing DocBook 4.1.2 XML Content from a Web BrowserPlace a DocBook 4.1.2 XML file in the $COCOON_HOME/mount/docbook/ directory. A sample file is available from http://www.xml-dev.com:8080/cocoon/mount/docbook/openjade.xml. Now you can access the document using a browser at http://localhost:8080/cocoon/mount/sample.html (HTML) or http://localhost:8080/cocoon/mount/sample.pdf (PDF). | ||||||||||||||||||||
|
|
|
Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account Document on this page is part of "DocBook XML/SGML Processing Using OpenJade". See Index Page for more info about Authorship and Copyright. 1999-2008 Linuxinfor.com. No rights reserved. |