tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kpreis...@apache.org
Subject svn commit: r1528631 - /tomcat/trunk/webapps/docs/tomcat-docs.xsl
Date Wed, 02 Oct 2013 21:24:33 GMT
Author: kpreisser
Date: Wed Oct  2 21:24:33 2013
New Revision: 1528631

URL: http://svn.apache.org/r1528631
Log:
New try: Use the correct subdir for loading the project.xml into the $project variable, and
use $project variable instead of <project> tree that is placed by "&project;" entity.

Modified:
    tomcat/trunk/webapps/docs/tomcat-docs.xsl

Modified: tomcat/trunk/webapps/docs/tomcat-docs.xsl
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/tomcat-docs.xsl?rev=1528631&r1=1528630&r2=1528631&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/tomcat-docs.xsl (original)
+++ tomcat/trunk/webapps/docs/tomcat-docs.xsl Wed Oct  2 21:24:33 2013
@@ -53,9 +53,10 @@
   <xsl:variable name="commentslink"><xsl:value-of select="$relative-path"/>/comments.html</xsl:variable>
 
   <!-- Process an entire document into an HTML page -->
+  <xsl:variable name="project-xml-filename"><xsl:value-of select="$subdir"/>project.xml</xsl:variable>
   <xsl:template match="document">
   <xsl:variable name="project"
-              select="document('project.xml')/project"/>
+              select="document($project-xml-filename)/project"/>
 <html lang="en">
 <head>
   <!-- Note: XLST seems to always output a
@@ -73,7 +74,7 @@
   </xsl:variable>
   <link href="{$css-src}" rel="stylesheet" type="text/css"/>
 
-  <title><xsl:value-of select="project/title"/> (<xsl:value-of select="$version"/>)
- <xsl:value-of select="properties/title"/></title>
+  <title><xsl:value-of select="$project/title"/> (<xsl:value-of select="$version"/>)
- <xsl:value-of select="properties/title"/></title>
   <xsl:for-each select="properties/author">
     <xsl:variable name="name">
       <xsl:value-of select="."/>
@@ -141,12 +142,12 @@
   <header><div id="header">
     <div>
       <div>
-        <xsl:if test="project/logo">
+        <xsl:if test="$project/logo">
           <xsl:variable name="src">
             <xsl:value-of select="$relative-path"/><xsl:value-of select="$home-logo"/>
           </xsl:variable>
           <div class="logo noPrint">
-            <a href="{project/@href}"><img alt="Tomcat Home" src="{$src}"/></a>
+            <a href="{$project/@href}"><img alt="Tomcat Home" src="{$src}"/></a>
           </div>
         </xsl:if>
 
@@ -174,7 +175,7 @@
         <div>
           <!-- Navigation -->
           <nav>
-            <xsl:apply-templates select="project/body/menu"/>
+            <xsl:apply-templates select="$project/body/menu"/>
           </nav>
         </div>
       </div>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message