forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@apache.org
Subject cvs commit: xml-forrest/src/documentation/library/xslt howto2document.xsl
Date Sun, 19 May 2002 21:06:44 GMT
stevenn     02/05/19 14:06:44

  Modified:    src/documentation sitemap.xmap
  Added:       src/documentation/library/xslt howto2document.xsl
  Log:
  added a howto2document stylesheet and a pipeline matcher that goes with it
  
  Revision  Changes    Path
  1.7       +9 -0      xml-forrest/src/documentation/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/documentation/sitemap.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sitemap.xmap	12 May 2002 22:37:19 -0000	1.6
  +++ sitemap.xmap	19 May 2002 21:06:44 -0000	1.7
  @@ -158,6 +158,15 @@
        </map:call>    
      </map:match>
   
  +   <map:match pattern="body-**howto**.xml">
  +     <map:generate type="file-nolabel" 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="isfaq" value="true"/>
  +     </map:call>
  +   </map:match>
  +
      <!-- Generate the "doclist" - list of all documentation
        The first match generates each book.xml and adds a new attribute "uri".
        The second match aggregates each book.xml into a doclist and
  
  
  
  1.1                  xml-forrest/src/documentation/library/xslt/howto2document.xsl
  
  Index: howto2document.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      version="1.0">
  
   <xsl:import href="copyover.xsl"/>
  
    <xsl:template match="howto">
     <document>
       <xsl:copy-of select="header"/>
       <body><xsl:apply-templates select="*[not(name()='header')]"/></body>
     </document>
    </xsl:template>
    
    <xsl:template match="overview | purpose | prerequisites | audience | steps | extension
| tips | references">
      <section>
        <xsl:choose>
          <xsl:when test="normalize-space(@title)!=''">
            <xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute>
          </xsl:when>
          <xsl:otherwise>
            <xsl:attribute name="title"><xsl:value-of select="name()"/></xsl:attribute>
          </xsl:otherwise>
        </xsl:choose>
        <xsl:apply-templates/>
      </section>
    </xsl:template>
    
  </xsl:stylesheet>
  
  

Mime
View raw message