forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/library/xslt howto2document.xsl
Date Sun, 27 Oct 2002 07:09:01 GMT
jefft       2002/10/27 00:09:01

  Modified:    src/resources/conf sitemap.xmap
               src/resources/library/xslt howto2document.xsl
  Log:
  Allow users to have howto/ directories anywhere, which don't break if there
  isn't a revisions section.
  
  Revision  Changes    Path
  1.22      +13 -1     xml-forrest/src/resources/conf/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- sitemap.xmap	25 Oct 2002 15:00:48 -0000	1.21
  +++ sitemap.xmap	27 Oct 2002 07:09:00 -0000	1.22
  @@ -252,7 +252,19 @@
          <map:parameter name="page" value="{3}"/>
        </map:transform>
      <map:serialize type="xml" />
  -   </map:match>
  + </map:match>
  +
  + <!-- Any other howto directories get transformed, without revisions -->
  + <map:match pattern="body-**howto/*.xml">
  +   <map:generate src="content/xdocs/{1}howto/{2}.xml"/>
  +   <map:transform src="library/xslt/howto2document.xsl" label="content"/>
  +   <map:call resource="skinit">
  +     <map:parameter name="type" value="document2html"/>
  +     <map:parameter name="resource" value="{3}"/>
  +     <map:parameter name="dir" value="{1}howto/"/>
  +   </map:call>
  + </map:match>
  +
   
      <!-- Generate the "doclist" - list of all documentation
        The first match generates each book.xml and adds a new attribute "uri".
  
  
  
  1.3       +14 -4     xml-forrest/src/resources/library/xslt/howto2document.xsl
  
  Index: howto2document.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/library/xslt/howto2document.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- howto2document.xsl	7 Jun 2002 05:35:23 -0000	1.2
  +++ howto2document.xsl	27 Oct 2002 07:09:01 -0000	1.3
  @@ -6,14 +6,24 @@
   
    <xsl:import href="copyover.xsl"/>
   
  -  <xsl:template match="all">
  +  <!-- Processing a raw howto without revisions -->
  +  <xsl:template match="/howto">
  +    <document>
  +      <xsl:copy-of select="header"/>
  +      <body>
  +        <xsl:apply-templates/>
  +      </body>
  +    </document>
  +  </xsl:template>
  +
  +  <!-- Processing a howto combined with revisions -->
  +  <xsl:template match="/all">
      <document>
       <xsl:copy-of select="howto/header"/>
        <body>
           <xsl:apply-templates select="howto"/>
  -     	<xsl:apply-templates select="revisions"/>
  -	</body>
  -  
  +        <xsl:apply-templates select="revisions"/>
  +     </body>
      </document>
     </xsl:template>
     
  
  
  

Mime
View raw message