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/stylesheets wiki2document.xsl
Date Sun, 27 Apr 2003 06:03:39 GMT
jefft       2003/04/26 23:03:39

  Modified:    src/resources/conf forrest.xmap
               src/resources/stylesheets wiki2document.xsl
  Log:
  Pass the Wiki page name to the wiki2document.xsl stylesheet, so it can be used
  as a page title if no other exists.
  
  Revision  Changes    Path
  1.14      +15 -11    xml-forrest/src/resources/conf/forrest.xmap
  
  Index: forrest.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/forrest.xmap,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- forrest.xmap	26 Apr 2003 12:23:14 -0000	1.13
  +++ forrest.xmap	27 Apr 2003 06:03:39 -0000	1.14
  @@ -159,17 +159,21 @@
           </map:act>
           <map:act type="resource-exists">
             <map:parameter name="url" value="content/xdocs/{1}.cwiki" />
  -          <map:generate type="text2xml" src="content/xdocs/{../1}.cwiki" />
  -          <map:transform type="lexer"   src="resources/grammars/wiki.xlex"/>
  -          <map:transform type="parser"  src="resources/grammars/wiki.xgrm"/>
  -          <!--  Dynamically generated equivalents.  Matchers need to be added to
  -          the root sitemap for this to work.
  -          <map:transform type="lexer"   src="cocoon:/wiki.xlex"/>
  -          <map:transform type="parser"  src="cocoon:/wiki.xgrm"/>
  -          -->
  -          <map:transform src="resources/stylesheets/wiki2document.xsl"/>
  -          <map:transform type="idgen" />
  -          <map:serialize type="xml"/>
  +          <map:match type="regexp" pattern="^(.*?)([^/]*).xml$">
  +            <map:generate type="text2xml" src="content/xdocs/{1}{2}.cwiki" />
  +            <map:transform type="lexer"   src="resources/grammars/wiki.xlex"/>
  +            <map:transform type="parser"  src="resources/grammars/wiki.xgrm"/>
  +            <!--  Dynamically generated equivalents.  Matchers need to be added to
  +            the root sitemap for this to work.
  +            <map:transform type="lexer"   src="cocoon:/wiki.xlex"/>
  +            <map:transform type="parser"  src="cocoon:/wiki.xgrm"/>
  +            -->
  +            <map:transform src="resources/stylesheets/wiki2document.xsl">
  +              <map:parameter name="name" value="{2}" />
  +            </map:transform>
  +            <map:transform type="idgen" />
  +            <map:serialize type="xml"/>
  +          </map:match>
           </map:act>
   
           <map:generate src="content/xdocs/{1}.xml" />
  
  
  
  1.2       +10 -1     xml-forrest/src/resources/stylesheets/wiki2document.xsl
  
  Index: wiki2document.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/stylesheets/wiki2document.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wiki2document.xsl	26 Apr 2003 12:23:15 -0000	1.1
  +++ wiki2document.xsl	27 Apr 2003 06:03:39 -0000	1.2
  @@ -10,11 +10,20 @@
                doctype-system="document-v11.dtd"
                cdata-section-elements="source"/>
   
  + <xsl:param name="name"/>
  +
    <xsl:template match="st:document">
     <document>
      <header>
       <title>
  -    <xsl:value-of select="st:section/st:title//st:text"/>
  +      <xsl:choose>
  +        <xsl:when test="st:section/st:title//st:text">
  +          <xsl:value-of select="st:section/st:title//st:text"/>
  +        </xsl:when>
  +        <xsl:otherwise>
  +          <xsl:value-of select="$name"/>
  +        </xsl:otherwise>
  +      </xsl:choose>
       </title>
      </header>
      <body>
  
  
  

Mime
View raw message