cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon2/webapp/stylesheets/documents changes2document.xsl copyover.xsl faq2document.xsl todo2document.xsl root2html.xsl
Date Fri, 20 Jul 2001 10:54:05 GMT
dims        01/07/20 03:54:05

  Modified:    webapp   sitemap.xmap
               webapp/stylesheets/documents root2html.xsl
  Added:       webapp/stylesheets/documents changes2document.xsl
                        copyover.xsl faq2document.xsl todo2document.xsl
  Log:
  Patch from John Morrison for better "C2 Docs" from webapp
  
  Revision  Changes    Path
  1.39      +23 -12    xml-cocoon2/webapp/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/webapp/sitemap.xmap,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- sitemap.xmap	2001/07/20 08:40:44	1.38
  +++ sitemap.xmap	2001/07/20 10:54:05	1.39
  @@ -116,6 +116,7 @@
      <map:action name="form-validator" src="org.apache.cocoon.acting.FormValidatorAction"/>
      <map:action name="session-state" src="org.apache.cocoon.acting.SessionStateAction"/>
      <map:action name="session-isvalid" src="org.apache.cocoon.acting.SessionIsValidAction"/>
  +   <map:action name="resource-exists" src="org.apache.cocoon.acting.ResourceExistsAction"/>
     </map:actions>
   
    </map:components>
  @@ -209,18 +210,28 @@
     <map:pipeline internal-only="true">
       <map:match pattern="shared/sidebar">
         <map:generate src="docs/xdocs/internal/site-book.xml"/>
  -	  <map:transform src="stylesheets/documents/book2sidebar.xsl"/>
  -	  <map:serialize/>
  -	</map:match>
  -
  -	<map:match pattern="document/*.html">
  -	  <map:generate src="docs/xdocs/{1}.xml"/>
  -	  <map:serialize/>
  -	</map:match>
  -	<map:match pattern="document/*">
  -	  <map:generate src="docs/xdocs/{1}.xml"/>
  -	  <map:serialize/>
  -	</map:match>
  +      <map:transform src="stylesheets/documents/book2sidebar.xsl"/>
  +      <map:serialize/>
  + 	</map:match>
  +
  +	  <map:match pattern="document/*.html">
  +	    <map:generate src="docs/xdocs/{1}.xml"/>
  +     <map:act type="resource-exists">
  +      <map:parameter name="url" value="context://stylesheets/documents/{1}2document.xsl"/>
  +       <map:transform src="stylesheets/documents/{../1}2document.xsl"/>
  +     </map:act>
  +	    <map:serialize/>
  +	  </map:match>
  +
  +	  <map:match pattern="document/*">
  +	    <map:generate src="docs/xdocs/{1}.xml"/>
  +     <map:act type="resource-exists">
  +      <map:parameter name="url" value="context://stylesheets/documents/{1}2document.xsl"/>
  +       <map:transform src="stylesheets/documents/{../1}2document.xsl"/>
  +     </map:act>
  +	    <map:serialize/>
  +	  </map:match>
  +
     </map:pipeline>
   
     <map:pipeline>
  
  
  
  1.6       +19 -0     xml-cocoon2/webapp/stylesheets/documents/root2html.xsl
  
  Index: root2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/webapp/stylesheets/documents/root2html.xsl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- root2html.xsl	2001/07/19 10:53:28	1.5
  +++ root2html.xsl	2001/07/20 10:54:05	1.6
  @@ -98,5 +98,24 @@
      </xsl:element>
   </xsl:template>
   
  +<xsl:template match="link">
  +	  <a href="{@href}"><xsl:apply-templates/></a>
  +</xsl:template>
  +
  +<xsl:template match="connect">
  +	  <xsl:apply-templates/>
  +</xsl:template>
  +
  +<xsl:template match="jump">
  +	  <a href="{@href}#{@anchor}"><xsl:apply-templates/></a>
  +</xsl:template>
  +
  +<xsl:template match="fork">
  +	  <a href="{@href}" target="_blank"><xsl:apply-templates/></a>
  +</xsl:template>
  +
  +<xsl:template match="anchor">
  +	  <a name="{@id}"><xsl:comment>anchor</xsl:comment></a>
  +</xsl:template>  
   
   </xsl:stylesheet>
  
  
  
  1.1                  xml-cocoon2/webapp/stylesheets/documents/changes2document.xsl
  
  Index: changes2document.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:param name="name"/>
  
   <xsl:template match="changes">
    <document>
     <header>
      <title><xsl:value-of select="@title"/></title>
     </header>
     <body>
      <xsl:apply-templates/>
     </body>
    </document>
   </xsl:template>
  
   <xsl:template match="release">
    <s2 title="{$name} {@version} ({@date})">
     <sl>
      <xsl:apply-templates/>
     </sl>
    </s2>
   </xsl:template>
  
   <xsl:template match="action">
    <li>
     <icon src="images/{@type}.jpg" alt="{@type}"/>
     <xsl:apply-templates/>
     <xsl:text>(</xsl:text><xsl:value-of select="@dev"/><xsl:text>)</xsl:text>
  
     <xsl:if test="@due-to">
      <xsl:text> Thanks to </xsl:text>
      <link href="mailto:{@due-to-email}"><xsl:value-of select="@due-to"/></link>
      <xsl:text>.</xsl:text>
     </xsl:if>
  
     <xsl:if test="@fixes-bug">
      <xsl:text> Fixes </xsl:text>
      <link href="http://xml.apache.org/bugs/show_bug.cgi?id={@fixes-bug}">
       <xsl:text>bug </xsl:text><xsl:value-of select="@fixes-bug"/>
      </link>
      <xsl:text>.</xsl:text>
     </xsl:if>
    </li>
   </xsl:template>
  
   <xsl:template match="devs">
    <!-- remove -->
   </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  
  1.1                  xml-cocoon2/webapp/stylesheets/documents/copyover.xsl
  
  Index: copyover.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      version="1.0">
  
    <xsl:template match="@*|*|text()|processing-instruction()">
      <xsl:copy>
        <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
      </xsl:copy>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-cocoon2/webapp/stylesheets/documents/faq2document.xsl
  
  Index: faq2document.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="faqs">
     <document>
      <header>
       <title><xsl:value-of select="@title"/></title>
      </header>
      <body>
        <s1 title="Questions">
         <ul>
          <xsl:apply-templates select="faq" mode="index"/>
         </ul>
        </s1>
        <s1 title="Answers">
          <xsl:apply-templates select="faq"/>
        </s1>
      </body>
     </document>  
    </xsl:template>
  
    <xsl:template match="faq" mode="index">
      <li>
        <jump anchor="faq-{position()}">
          <xsl:value-of select="question"/>
        </jump>
      </li>
    </xsl:template>
  
    <xsl:template match="faq">
      <anchor id="faq-{position()}"/>
      <s2 title="{question}">
        <xsl:apply-templates/>
      </s2>
    </xsl:template>
  
    <xsl:template match="question">
      <!-- ignored since already used -->
    </xsl:template>
  
    <xsl:template match="answer">
      <xsl:apply-templates/>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-cocoon2/webapp/stylesheets/documents/todo2document.xsl
  
  Index: todo2document.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="todo">
    <document>
     <header>
      <title><xsl:value-of select="@title"/></title>
     </header>
     <body>
      <xsl:apply-templates/>
     </body>
    </document>
   </xsl:template>
  
   <xsl:template match="actions">
    <s2 title="{@priority}">
     <sl>
      <xsl:for-each select="action">
       <li>
        <strong><xsl:text>[</xsl:text><xsl:value-of select="@context"/><xsl:text>]</xsl:text></strong><xsl:text>
</xsl:text>
        <xsl:apply-templates/>
       </li>
      </xsl:for-each>
     </sl>
    </s2>
   </xsl:template>
   
  </xsl:stylesheet>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message