Here are my notes on building Xalan-C/C++ Web Pages. The format is similar to the [http://people.apache.org] pages. The StyleBook XML source pages are still being supported. The StyleBook Java program is no longer required. The XHTML output scales very well with modern browsers.
I will soon post new content on JIRA. Steven J. Hathaway --------------------------------------------------- ## Building the Xalan-C Web Pages This section shows how to build the documentation products for Xalan-C/C++. This is a subproject of the ASF XALAN PMC. The XALAN PMC project web page [http://xalan.apache.org] is a top-level page with branches to the subprojects that include the Java and C/C++ code libraries. The Xalan-C/C++ home web page [http://xml.apache.org/xalan-c] is the content construction that is being described here. ## Documentation Source Tree xalan/c/trunk/xdocs/sources/ entities.ent -- Product specific entities make-book.bat -- Build All Web Pages make-xalan.bat -- Build Single Web Page xalan-book.xslt -- Transformation for StyleBook XML xalan.xml -- The Navigation Panel for Xalan-C Pages xalan/c/trunk/xdocs/sources/xslt-resources/ {Common components used by Xalan-C Web Pages} apache-xalan.css -- The Web Page Presentation Style asf_logo.png -- The ASF Trademark Logo note.gif -- A (note:) graphic xalan/c/trunk/xdocs/sources/xalan/ {The StyleBook XML Sources for Xalan-C Web Pages} index.xml -- This creates the root index.html resources.xml -- A resources dispatch page xalan/c/trunk/xdocs/style/dtd/ {DTD Resources for Apache StyleBook Validation} blocks.ent book.dtd changes.dtd characters.ent document.dtd faqs.dtd links.ent markup.ent ## Destination Build Tree xalan/c/trunk/build/docs/html/ {The Xalan-C project html Web Pages go here} index.html -- This is the root of the Xalan-C subproject xalan/c/trunk/build/docs/html/resources/ {Resources to support Xalan-C project html Web Pages} apache-xalan.css asf_logo.png note.gif xalan/c/trunk/build/docs/html/apiDocs/ {The Xalan-C API Web Pages go here} index.html -- This is the root of the Xalan-C API Documents ## Building the Web Pages The Apache StyleBook Java program is no longer needed to create useful web pages. You should have a standard XSLT transform utility. The "Xalan" command-line program distributed with Xalan-C works just fine. Connect to the a copy of the (xdocs) directory. The StyleBook validation files are in the (xdocs/style/dtd) directory. The StyleBook XML sources for the web pages are in the (xdocs/xalan) directory. Each web page is associated with an XML file in this directory. The transformed output is to be placed in the (build/docs/html) directory. The Web Page output directory is (build/docs/html). After creating the web pages, copy the (xdocs/xslt-resources) files to the (build/docs/html/resources) directory. Graphic images for individual web pages are in the (xdocs/xalan-graphic) directory and later copied to the (build.docs/html) directory. ## Preparing the Navigation File The (xdocs/xalan.xml) is the project navigation file that is on the left side of each web page. The root element is <book> containing child elements of <hidden>, <external>, <document>, <resources>, <faqs>, and <separator>. The format of this navigation file is inherited from the StyleBook Java program. Our stylesheet uses the <book> to provide only a navigation panel. It does not control the production of the entire suite of web pages. The "id=" attribute is the name of the web page file without extension. The "label=" attribute is the navigation text. The "source=" attribute is the name of the StyleBook XML source file. The "href=" attribute is a link to an external resource. ## Creating the Web Pages The XSLT transformation utility must support top-level parameters. The Xalan command-line program built and distributed with the this project has sufficient capability to create the project web pages. The xalan-book.xslt stylesheet is designed to interpret StyleBook XML and create XHTML web pages for the Xalan-C project. Example: Create the "index.html" web page from "index.xml" source. Xalan.exe -p sectionid "'index'" -p createdate "'Tue 08/09/2011'" xalan\index.xml xalan-book.xslt > ..\..\build\docs\html\index.html Do the same for each web page replacing index, index.xml, and index.html in the above example. I use batch files or shell scripts to automate this process. The following batch files are what I use on Windows platforms. The make-book.bat file to create all web pages: mkdir ..\..\build\docs\html\resources call make-xalan usagepatterns call make-xalan samples call make-xalan resources call make-xalan install call make-xalan download call make-xalan overview call make-xalan charter call make-xalan whatsnew call make-xalan extensionslib call make-xalan commandline call make-xalan readme call make-xalan releasenotes call make-xalan programming call make-xalan getstarted call make-xalan index call make-xalan extensions call make-xalan faq call make-xalan license call make-xalan buildlibs call make-xalan secureweb copy xalan-graphic\*.* ..\..\build\docs\html copy xslt-resources\*.* ..\..\build\docs\html\resources The make-xalan.bat file to create a single web page: :: :: Set the current path to include a stylesheet transformation utility :: :: %1 The document filename (without extension) to transform :: :: %XALANEXSLT% The exslt stylesheet transformation utility :: :: %XALANSTYLE% The XSLT stylesheet to :: :: %XALANXMLDIR% Source directory of STYLEBOOK markup XML documents :: :: %XALANOUTDIR% Target directory of XHTML web page documents :: :: %WEBCREATED% Web Page Creation Date :: :: sectionid Top-level stylesheet parameter (document file id) :: :: createdate Top-level stylesheet parameter (web page creation date) :: SET WEBCREATED=%DATE% SET XALANEXSLT=..\..\bin\xalan.exe SET XALANSTYLE=xalan-book.xslt SET XALANXMLDIR=xalan SET XALANOUTDIR=..\..\build\docs\html "%XALANEXSLT%" -p sectionid "'%1'" -p createdate "'%WEBCREATED%'" %XALANXMLDIR%\%1.xml %XALANSTYLE% >% XALANOUTDIR%\%1.html ## XSLT Stylesheet for Xalan-C Web Pages Here is the stylesheet I use to generate the Xalan-C documentation web pages. This stylesheet creates Strict XHTML output. The ASF License 2 statement is also placed in all created XHTML web pages. <?xml version="1.0" encoding="ISO-8859-1" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. --> <!-- * <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" * "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> --> <xsl:output method="xml" version="1.0" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" omit-xml-declaration="no" encoding="ISO-8859-1" standalone="no" /> <!-- THE TOP-LEVEL PARAMETERS (sectionid, createdate) sectionid = basename of the source xml file without the (.xml) extension. createdate = date that this stylesheet is used. Building the documentation using commandline stylesheet transformation. EXSLT -p sectionid='documentfile' -p createdate='June 1, 2011' xalan\documentfile.xml xalan-manual.xslt ..\html\documentfile.html --> <xsl:param name="sectionid"/> <xsl:param name="createdate"/> <!-- THE STYLESHEET ROOT - LAUNCH THE CONSTRUCTORS --> <xsl:template match="/"> <html> <head> <title>Xalan-C++ XSLT User Guide Version 1.11</title> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/> <meta http-equiv="Content-Style-Type" content="text/css"/> <link rel="stylesheet" type="text/css" href="resources/apache-xalan.css"/> </head> <xsl:comment> * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. </xsl:comment> <body> <!-- CONSTRUCT A BOOK SUBTITLE TITLE FROM SOURCE XML PROPERTIES --> <xsl:variable name="xalantitle"> <xsl:choose> <xsl:when test="s1/@title"> <xsl:value-of select="s1/@title"/> </xsl:when> <xsl:when test="s2/@title"> <xsl:value-of select="s2/@title"/> </xsl:when> <xsl:when test="s3/@title"> <xsl:value-of select="s3/@title"/> </xsl:when> <xsl:when test="faqs"> <xsl:choose> <xsl:when test="faqs/@title"> <xsl:value-of select="faqs/@title"/> </xsl:when> <xsl:otherwise> <xsl:text>Frequently Asked Questions</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test="resources"> <xsl:text>Resources</xsl:text> </xsl:when> <xsl:when test="changes/@title"> <xsl:value-of select="changes/@title"/> </xsl:when> <xsl:otherwise> <xsl:text>DEBUG - xalantitle not found</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:variable> <!-- THE TITLE SECTION --> <xsl:call-template name="doTitle"> <xsl:with-param name="booktitle"> <xsl:text>Xalan-C++ XSLT 1.11 User Guide</xsl:text> </xsl:with-param> <xsl:with-param name="booksection"> <xsl:value-of select="$xalantitle"/> </xsl:with-param> </xsl:call-template> <!-- THE NAVIGATION SECTION --> <xsl:call-template name="doLeftNav"> <xsl:with-param name="sectparm"> <xsl:value-of select="$sectionid"/> </xsl:with-param> </xsl:call-template> <!-- THE MAIN CONTENT SECTION --> <xsl:call-template name="doContent"> <xsl:with-param name="mysectionid"> <xsl:value-of select="$sectionid"/> </xsl:with-param> </xsl:call-template> <!-- THE COPYRIGHT FOOTER --> <xsl:call-template name="doFooter"> <xsl:with-param name="releaseinfo"> <xsl:text>Web Page created on - </xsl:text> <xsl:value-of select="$createdate"/> </xsl:with-param> </xsl:call-template> </body> </html> </xsl:template> <!-- DEBUG TEMPLATE --> <xsl:template name="DEBUG"> <xsl:param name="theText"/> <xsl:param name="theNode"/> <xsl:element name="DEBUG"> <xsl:element name="DEBUGTEXT"> <xsl:value-of select="$theText"/> </xsl:element> <xsl:if test="$theNode"> <xsl:element name="DEBUGNODES"> <xsl:copy-of select="$theNode"/> </xsl:element> </xsl:if> </xsl:element> </xsl:template> <xsl:template name="doTitle"> <xsl:param name="booktitle">Xalan-C++ Version 1.11 User Guide</xsl:param> <xsl:param name="booksection">Documentation Project</xsl:param> <xsl:element name="div"> <xsl:attribute name="id"> <xsl:text>title</xsl:text> </xsl:attribute> <table> <tbody> <tr> <th rowspan="2"> <a href="http://www.apache.org/"> <img alt="ASF Logo" title="ASF Logo" src="resources/asf_logo.png" width="220" height="66"/></a> </th> <th text-align="center" width="75%"> <a href="index.html"><xsl:value-of select="$booktitle"/></a> </th> </tr> <tr> <td valign="middle"><xsl:value-of select="$booksection"/></td> </tr> </tbody> </table> </xsl:element> </xsl:template> <xsl:template name="doLeftNav"> <xsl:param name="sectparm" select="''"/> <xsl:element name="div"> <xsl:attribute name="id">navLeft</xsl:attribute> <ul> <xsl:for-each select="document('xalan.xml')/book/*"> <xsl:if test="name(.)='external'"> <li> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="@href"/> </xsl:attribute> <xsl:value-of select="@label"/> </xsl:element> </li> </xsl:if> <xsl:if test="name(.)='resources'"> <li> <xsl:choose> <xsl:when test="$sectparm != 'resources'"> <a href="resources.html">Resources</a><br/> </xsl:when> <xsl:otherwise> <xsl:text>Resources</xsl:text><br/> </xsl:otherwise> </xsl:choose> </li> </xsl:if> <xsl:if test="name(.)='changes'"> <li> <xsl:choose> <xsl:when test="$sectparm != 'changes'"> <a href="changes.html">Changes</a><br/> </xsl:when> <xsl:otherwise> <xsl:text>Changes</xsl:text> </xsl:otherwise> </xsl:choose> </li> </xsl:if> <xsl:if test="name(.)='separator'"> <!-- </ul> <hr/> <ul> --> <xsl:text disable-output-escaping="yes"></ul><hr/><ul></xsl:text> </xsl:if> <xsl:if test="(name(.)='document') or (name(.)='faqs')"> <li> <xsl:choose> <xsl:when test="$sectparm != string(@id)"> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="concat(@id,'.html')"/> </xsl:attribute> <xsl:value-of select="@label"/> </xsl:element> </xsl:when> <xsl:otherwise> <xsl:value-of select="@label"/><br/> </xsl:otherwise> </xsl:choose> </li> </xsl:if> </xsl:for-each> </ul> </xsl:element> </xsl:template> <xsl:template name="doContent"> <xsl:element name="div"> <xsl:attribute name="id">content</xsl:attribute> <xsl:choose> <xsl:when test="faqs"> <xsl:for-each select="faqs"> <xsl:call-template name="doFaqDocument"/> </xsl:for-each> </xsl:when> <xsl:when test="resources"> <xsl:for-each select="resources"> <xsl:call-template name="doResDocument"/> </xsl:for-each> </xsl:when> <xsl:when test="changes"> <xsl:for-each select="changes"> <xsl:call-template name="doChangesDoc"/> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:template> <xsl:template name="doFooter"> <xsl:param name="releaseinfo"/> <xsl:element name="div"> <xsl:attribute name="id">footer</xsl:attribute> <!-- copyright byline information --> <!-- © is the (c) copyright symbol --> <xsl:text>Copyright © 1999-2011 The Apache Software Foundation</xsl:text><br/> <xsl:text>Apache, Xalan, and the Feather logo are trademarks of The Apache Software Foundation</xsl:text> <xsl:element name="div"> <xsl:attribute name="class">small</xsl:attribute> <xsl:value-of select="$releaseinfo"/> </xsl:element> </xsl:element> </xsl:template> <xsl:template name="doFaqDocument"> <h2 class="faqSubHead">Questions</h2> <ol start="1"> <xsl:call-template name="doFaqTitles"> <xsl:with-param name="faqNbr">1</xsl:with-param> </xsl:call-template> </ol> <h2 class="faqSubHead">Answers</h2> <xsl:call-template name="doFaqContent"> <xsl:with-param name="faqNbr">1</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="doFaqTitles"> <xsl:param name="faqNbr">1</xsl:param> <xsl:variable name="myNbr" select="$faqNbr"/> <xsl:if test="faq[position()=$myNbr]"> <!-- output the title reference --> <li> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="concat('#faq-', $myNbr)"/> </xsl:attribute> <xsl:value-of select="faq[position()=$myNbr]/@title"/> </xsl:element> </li> <!-- get the next faq if any --> <xsl:call-template name="doFaqTitles"> <xsl:with-param name="faqNbr" select="number($myNbr + 1)"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template name="doFaqContent"> <xsl:param name="faqNbr">1</xsl:param> <xsl:variable name="myNbr" select="$faqNbr"/> <xsl:if test="faq[position()=$myNbr]"> <!-- output content of this element only --> <!-- <h3><xsl:value-of select="faq[position()=$myNbr]/@title"/></h3> --> <xsl:element name="h3"> <xsl:attribute name="id"> <xsl:value-of select="concat('faq-', $myNbr)"/> </xsl:attribute> <xsl:attribute name="class"> <xsl:text>faqTitle</xsl:text> </xsl:attribute> <xsl:value-of select="concat($myNbr, '. ', faq[position()=$myNbr]/@title)"/> </xsl:element> <!-- The FAQ Text Part --> <xsl:for-each select="faq[position()=$myNbr]/*"> <!-- children of 'faq' --> <xsl:choose> <xsl:when test="name(.)='q'"> <!-- The Question Text --> <div class="faqQuestion"> <xsl:apply-templates/> <!-- children of 'q' --> </div> </xsl:when> <xsl:when test="name(.)='a'"> <!-- The Answer Text --> <br/> <hr/> <div class="faqAnswer"> <xsl:apply-templates/> <!-- children of 'a' --> </div> </xsl:when> <xsl:otherwise> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> </xsl:for-each> <xsl:call-template name="goToTop"/> <!-- Recurse for next faq item --> <xsl:call-template name="doFaqContent"> <xsl:with-param name="faqNbr" select="number($myNbr + 1)"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template name="goToTop"> <p align="right" size="2"> <a href="#content">(top)</a> </p> </xsl:template> <xsl:template name="doResDocument"> <xsl:for-each select="resource|human-resource"> <xsl:choose> <xsl:when test="name(.)='resource'"> <!-- <h4 class="resourcetitle"><strong><xsl:value-of select="@title"/></strong><h4> --> <xsl:element name="h4"> <xsl:attribute name="class">resourcetitle</xsl:attribute> <strong><xsl:value-of select="@title"/></strong> </xsl:element> <p>id = [<xsl:value-of select="@id"/>]<br/> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="@location"/> </xsl:attribute> <xsl:value-of select="@location"/> </xsl:element><br/></p> </xsl:when> <xsl:when test="name(.)='human-resource'"> <!-- <h4 class="resourcetitle"><strong><xsl:value-of select="@name"/></strong><h4> --> <xsl:element name="h4"> <xsl:attribute name="class">resourcetitle</xsl:attribute> <strong><xsl:value-of select="@name"/></strong> </xsl:element> <p>id = [<xsl:value-of select="@id"/>]<br/> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="concat('mailto:',@mailto)"/> </xsl:attribute> <xsl:value-of select="concat('mailto:',@mailto)"/> </xsl:element><br/></p> </xsl:when> </xsl:choose> </xsl:for-each> </xsl:template> <xsl:template name="doChangesDoc"> <!-- context is <changes> element --> <xsl:for-each select="release"> <h3 class="chgRelease"> <xsl:value-of select="concat('Release ',@version,' (',@date,')')"/> </h3> <xsl:if test="features"> <h4 class="chgFeatures"><xsl:text>Features</xsl:text></h4> <xsl:for-each select="features"> <ul> <xsl:for-each select="feat"> <li><xsl:apply-templates/></li> </xsl:for-each> </ul> <hr/> </xsl:for-each> </xsl:if> <xsl:if test="fixes"> <h4 class="chgFixes"><xsl:text>Bug Fixes</xsl:text></h4> <xsl:for-each select="fixes"> <ul> <xsl:for-each select="fix"> <li><xsl:apply-templates/></li> </xsl:for-each> </ul> <hr/> </xsl:for-each> </xsl:if> <xsl:call-template name="goToTop"/> </xsl:for-each> </xsl:template> <!-- THE MATCHING TEMPLATE RULES --> <xsl:template match="s1"> <h2><xsl:value-of select="@title"/></h2> <xsl:apply-templates/> <xsl:call-template name="goToTop"/> </xsl:template> <xsl:template match="s2"> <xsl:call-template name="goToTop"/> <h3><xsl:value-of select="@title"/></h3> <xsl:apply-templates/> </xsl:template> <xsl:template match="s3"> <xsl:call-template name="goToTop"/> <h4><xsl:value-of select="@title"/></h4> <xsl:apply-templates/> </xsl:template> <xsl:template match="s4"> <h5><xsl:value-of select="@title"/></h5> <xsl:apply-templates/> </xsl:template> <!--<!ENTITY % blocks "p|note|ul|ol|gloss|table|source|anchor">--> <xsl:template match="p"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="ul"> <ul><xsl:apply-templates/></ul> </xsl:template> <xsl:template match="ol"> <ol><xsl:apply-templates/></ol> </xsl:template> <xsl:template match="li"> <li><xsl:apply-templates/></li> </xsl:template> <xsl:template match="table"> <table border="1"><xsl:apply-templates/></table> </xsl:template> <xsl:template match="tr"> <tr><xsl:apply-templates/></tr> </xsl:template> <xsl:template match="tn"> <td class="empty"/><!-- empty table element --> </xsl:template> <xsl:template match="th"> <xsl:element name="th"> <xsl:attribute name="class">content</xsl:attribute> <xsl:if test="@rowspan"> <xsl:attribute name="rowspan"> <xsl:value-of select="@rowspan"/> </xsl:attribute> </xsl:if> <xsl:if test="@colspan"> <xsl:attribute name="colspan"> <xsl:value-of select="@colspan"/> </xsl:attribute> </xsl:if> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="td"> <xsl:element name="td"> <xsl:attribute name="class">content</xsl:attribute> <xsl:if test="@rowspan"> <xsl:attribute name="rowspan"> <xsl:value-of select="@rowspan"/> </xsl:attribute> </xsl:if> <xsl:if test="@colspan"> <xsl:attribute name="colspan"> <xsl:value-of select="@colspan"/> </xsl:attribute> </xsl:if> <xsl:apply-templates/> </xsl:element> </xsl:template> <!-- <xsl:template match="note"> <blockquote class="note"><xsl:apply-templates/></blockquote> </xsl:template> --> <xsl:template match="note"> <xsl:element name="table"> <xsl:attribute name="class">note</xsl:attribute> <tr> <xsl:element name="td"> <xsl:attribute name="class">noteImg</xsl:attribute> <xsl:element name="img"> <xsl:attribute name="src">resources/note.gif</xsl:attribute> <xsl:attribute name="alt">note</xsl:attribute> </xsl:element> </xsl:element> <xsl:element name="td"> <xsl:attribute name="class">noteTxt</xsl:attribute> <xsl:apply-templates/> </xsl:element> </tr> </xsl:element> </xsl:template> <xsl:template match="source"> <blockquote class="source"><pre><xsl:value-of select="."/></pre></blockquote> </xsl:template> <xsl:template match="hidden"> <!-- content is hidden --> </xsl:template> <!--<!ENTITY % markup "em|ref|code|br">--> <xsl:template match="br"> <br/> </xsl:template> <xsl:template match="em"> <b><xsl:apply-templates/></b> </xsl:template> <xsl:template match="code"> <code><xsl:apply-templates/></code> </xsl:template> <xsl:template match="ref"> <b><i><xsl:apply-templates/></i></b> </xsl:template> <!-- Glossary Items <label> <item> --> <xsl:template match="label"> <p class="label"><xsl:apply-templates/></p> </xsl:template> <xsl:template match="item"> <p class="item"><xsl:apply-templates/></p> </xsl:template> <!--<!ENTITY % links "link|anchor|jump|img|resource-ref|human-resource-ref">--> <xsl:template match="anchor"> <xsl:element name="a"> <xsl:attribute name="name"> <xsl:value-of select="@name"/> </xsl:attribute> <xsl:text>‌</xsl:text> <!-- (zero-width non-join) character --> </xsl:element> </xsl:template> <xsl:template match="img"> <xsl:copy-of select="."/> </xsl:template> <!-- Glossary elements "gloss (label|item)* --> <xsl:template match="gloss"> <xsl:element name="div"> <xsl:attribute name="class">glossary</xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="label"> <p class="label"><em> <xsl:apply-templates/> </em></p> </xsl:template> <xsl:template match="item"> <xsl:element name="blockquote"> <xsl:attribute name="class">item</xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <!-- ******** <!ELEMENT link (#PCDATA|img)*> <!ATTLIST link idref NMTOKEN #IMPLIED anchor CDATA #IMPLIED> <!ELEMENT jump (#PCDATA|img)*> <!ATTLIST jump href CDATA #REQUIRED> ************* --> <xsl:template match="link"> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:if test="@idref"> <xsl:value-of select="concat(@idref, '.html')"/> </xsl:if> <xsl:if test="@anchor"> <xsl:value-of select="concat('#', @anchor)"/> </xsl:if> </xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="jump"> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="@href"/> </xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <!-- cross-reference resource elements --> <!-- Resolve Resource References through "resources.xml" document --> <xsl:template match="resource-ref"> <xsl:variable name="idval" select="@idref"/> <xsl:variable name="resref" select="document('xalan/resources.xml')//resource[@id=$idval]"/> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="$resref/@location"/> </xsl:attribute> <xsl:value-of select="$resref/@title"/> </xsl:element> </xsl:template> <!-- Resolve Mailbox References through "resources.xml" document --> <xsl:template match="human-resource-ref"> <xsl:variable name="idval" select="@idref"/> <xsl:variable name="resref" select="document('xalan/resources.xml')//human-resource[@id=$idval]"/> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="concat('mailto:',$resref/@mailto)"/> </xsl:attribute> <xsl:value-of select="$resref/@name"/> </xsl:element> </xsl:template> </xsl:stylesheet> -------<end of xslt stylesheet>------- ## CSS Stylesheet for Xalan-C Web Pages This is the CSS Stylesheet I use to render the Xalan-C/C++ web pages to a browser. It needs to be reachable by the XHTML files that are created. Note that the XHTML files are created with the html extension in support of transitional browsers. /* Xalan-C/C++ Project Web Pages (css) Stylesheet */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* This (css) stylesheet renders the xhtml web pages that were generated * from StyleBook XML markup using the "xalan-book.xslt" transformation. */ html > bod {left:0;} body { background-color: white; color: black; padding: 0; margin: 0; font-family: arial, "lucida console", san-serif; } /* Emulate table align=center */ div.centered, td.centered { text-align: center; } div.centered table { margin: 0 auto; text-align: left; } /* * ID Sections */ #content { width: 80%; float: left; font-size: 12pt; padding-top: 1em; padding-left: 5px; margin-left: 10px; border-left: 1px solid #ddd; } #navLeft { clear: left; width: 15%; float: left; padding: 2px; margin-left: 1%; color: red; position: relative; left: 1px; } #title { color: black; background-color: #eee; text-align: center; border-bottom: 1px solid #ccc; padding: 0; font-size: 16pt; height: 86px; vertical-align: middle; } #footer { clear: both; margin: 0 2em; color: #444; background-color: #eee; text-align: center; padding: .5em 0; font-size: 75%; border-top: 1px solid #ccc; } /* * Anchors */ a { color: blue; text-decoration: undedrline; } a img { border: 0; } a:hover { text-decoration: none; background-color: #d7c9c9; } /* * Headers */ h1 {} #title h1 { padding: 1px 0; margin: 0; float: right; width: 60%; font-size: 20pt; text-align: center; } #content h1 { background-color: #ee5 } h2 {} #title h2 { font-size: 14pt; width: 60%; text-alignment: center; padding: 1px 0; margin: 0; } #content h2 { background-color: #ee5 } #content h2.year { background-color: #ddd; text-align: center; } h3 {} #content h3.monthName { background-color: #333; text-align: center; } #content h3 { background-color: #ee5 } h4{} #content h4.eventTitle { margin-left: 1%; border-bottom: 1px solid blue; } /* * Tables */ th {} td {} th.content {background-color: #0BC } td.content {background-color: #0EF } /* * Lists and navLeft */ ul {} #navLeft ul { list-style-type: none; margin: 0; padding: 0; } #navLeft ul li { margin: 0; } #navLeft ul li p { margin: 0; } #navLeft ul li ul { list-style-type: none; font-size: 90%; margin: 0 2em; } #navLeft ul li ul li { margin: 0; } /* * Paragraphs */ p {} #navLeft p { text-align: center; padding: 0 auto; margin: 0; } #footer p { padding: 0; } #content p.topalign { vertical-align: middle; height: 2em; text-align: center; width: 100%; padding: .5em; border: 1px solid #ddd; } #content p.topalign img { vertical-align: middle; text-align: text-middle; } #content p.quote { color:black; font-style: italic; font-size: 110%; margin-left: 10%; margin-right: 10%; padding 1em; border: 1px solid #ddd; text-align: center; } #content p.navbar { font-size: 90%; text-align: center; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; } blockquote {} blockquote.note { font-size: 80%; border: 1px solid #ddd; background-color: #eee; } td.noteImg { background-color: white; border: 0; } td.noteTxt { background-color: white; font-size: 120%; border: 2px solid #ddd; background-color: #eee; } /** ** UNSPECIFIED IN APACHE STYLEBOOK DTD ** <caution>..</caution> and <warning>..</warning> ** * * td.cautionImg { * background-color: white; * border: 0; * } * * td.cautionTxt { * background-color: white; * font-size: 120%; * border: 2px solid #ddd; * background-color: #eee; * } * * * td.warningImg { * background-color: white; * border: 0; * } * * td.warningTxt { * background-color: white; * font-size: 120%; * border: 2px solid #ddd; * background-color: #eee; * } * **/ blockquote.source { font-size: 75%; } code { font-size: 75%; } /* * Special Table (note) */ #notediv div { background-color: white } table.note { width: 90%; } td.noteImg { background-color: white; vertical-align: top; border: 0; width: 24; } td.noteTxt { color: black; background-color: #eee; font-size: 90%; border: 2px solid; border-color: #ccc; } /* * Images */ img {} Title img { float: left; border: 0; padding: 2px; } #footer img { border: 0; } /* * Document Divisions */ div {} /* * Pre */ pre {} /* * Generic Classes */ .indented { margin-left: 3%; } .topBanner { float: right; margin: 0; border: 0; vertical-align: middle; } .noborder { border: 0; margin: 0; } --------<end of css stylesheet>------- --------------------------------------------------------------------- To unsubscribe, e-mail: xalan-dev-unsubscr...@xml.apache.org For additional commands, e-mail: xalan-dev-h...@xml.apache.org