cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/webapp/samples/stylesheets sort-samples.xsl
Date Wed, 17 Mar 2004 20:35:40 GMT
cziegeler    2004/03/17 12:35:40

  Modified:    src/webapp/samples sitemap.xmap
  Added:       src/webapp/samples/stylesheets sort-samples.xsl
  Log:
  Sort the block samples - not the best solution but it works
  
  Revision  Changes    Path
  1.21      +2 -1      cocoon-2.1/src/webapp/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/sitemap.xmap,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- sitemap.xmap	10 Mar 2004 15:39:51 -0000	1.20
  +++ sitemap.xmap	17 Mar 2004 20:35:40 -0000	1.21
  @@ -95,6 +95,7 @@
   
      <map:match pattern="blocks">
       <map:generate src="block-samples.xml"/>
  +    <map:transform src="stylesheets/sort-samples.xsl"/>
       <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
          <map:parameter name="contextPath" value="{request:contextPath}"/>
       </map:transform>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/stylesheets/sort-samples.xsl
  
  Index: sort-samples.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!--
    Copyright 1999-2004 The Apache Software Foundation
  
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
        http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  
  <!--+
      | Sort groups in alphabetical order.
      |
      | CVS $Id: sort-samples.xsl,v 1.1 2004/03/17 20:35:40 cziegeler Exp $
      +-->
  
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <xsl:template match="samples">
      <samples>
        <xsl:apply-templates select="group[@name='Back']"/>
        <xsl:for-each select="group[not(@name='Back')]">
          <xsl:sort select="@name"/>
          <xsl:apply-templates select="."/>
        </xsl:for-each>
      </samples>
    </xsl:template>
    <xsl:template match="@*|node()">
      <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
    </xsl:template>
  
    <xsl:template match="text()">
      <xsl:value-of select="."/>
    </xsl:template>
  </xsl:stylesheet>
  
  
  

Mime
View raw message