cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgra...@apache.org
Subject svn commit: r264666 - in /cocoon/gsoc/rgraham/refdoc/samples/snippets: neutral-ordering.xsl sitemap.xmap
Date Tue, 30 Aug 2005 01:29:41 GMT
Author: rgraham
Date: Mon Aug 29 18:29:34 2005
New Revision: 264666

URL: http://svn.apache.org/viewcvs?rev=264666&view=rev
Log:
Fixed neutral-ordering.xsl to work as I wanted, or near to it with things sorted by type and
secondly by name.

Modified:
    cocoon/gsoc/rgraham/refdoc/samples/snippets/neutral-ordering.xsl
    cocoon/gsoc/rgraham/refdoc/samples/snippets/sitemap.xmap

Modified: cocoon/gsoc/rgraham/refdoc/samples/snippets/neutral-ordering.xsl
URL: http://svn.apache.org/viewcvs/cocoon/gsoc/rgraham/refdoc/samples/snippets/neutral-ordering.xsl?rev=264666&r1=264665&r2=264666&view=diff
==============================================================================
--- cocoon/gsoc/rgraham/refdoc/samples/snippets/neutral-ordering.xsl (original)
+++ cocoon/gsoc/rgraham/refdoc/samples/snippets/neutral-ordering.xsl Mon Aug 29 18:29:34 2005
@@ -25,102 +25,29 @@
 
   <xsl:template match="/">
       <xsl:copy>
+       
+      <neutralDoc>
       
-      <here>
-      
-        <xsl:apply-templates select="//snippet[@type='name']"/>
-        <xsl:apply-templates select="//snippet[@type='description']"/>
-        <xsl:apply-templates select="//snippet[@type='details']"/>
-        <xsl:apply-templates select="//snippet[@type='see-also']"/>
-        <xsl:apply-templates select="//snippet[@type='warnings']"/>
-        <xsl:apply-templates select="//snippet[@type='sitemap-param']"/> 
-        <xsl:apply-templates select="//snippet[@type='component-param']"/> 
-        <xsl:apply-templates select="//snippet[@type='sitemap-example']"/> 
-        <xsl:apply-templates select="//snippet[@type='xsp-example']"/> 
-        <xsl:apply-templates select="//snippet[@type='flow-example']"/> 
-        <xsl:apply-templates select="//snippet[@type='form-example']"/> 
+        <xsl:for-each select="//snippet">
+            <xsl:sort select="@type"/>
+            <xsl:sort select="@name"/>
+            <xsl:copy>
+                <xsl:copy-of select="@*"/>
+                <xsl:copy-of select="descendant::*"/>
+            </xsl:copy>
+        </xsl:for-each>
                 
-      </here>
+      </neutralDoc>
                 
       </xsl:copy>
   </xsl:template>
 
-    <xsl:template match="snippet[@type='name']"> 
-        <xsl:copy>
-            <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="descendant::*"/>
-        </xsl:copy> 
-    </xsl:template>
-   
-    <xsl:template match="snippet[@type='description']"> 
+    <xsl:template match="snippet"> 
         <xsl:copy>
             <xsl:copy-of select="@*"/>
             <xsl:copy-of select="descendant::*"/>
         </xsl:copy> 
     </xsl:template>
-    
-    <xsl:template match="snippet[@type='details']"> 
-        <xsl:copy>
-            <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="descendant::*"/>
-        </xsl:copy> 
-    </xsl:template>
-    
-    <xsl:template match="snippet[@type='see-also']"> 
-        <xsl:copy>
-            <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="descendant::*"/>
-        </xsl:copy> 
-    </xsl:template>
-    
-    <xsl:template match="snippet[@type='warnings']"> 
-        <xsl:copy>
-            <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="descendant::*"/>
-        </xsl:copy> 
-    </xsl:template>
-    
-    <xsl:template match="snippet[@type='sitemap-param']"> 
-        <xsl:copy>
-            <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="descendant::*"/>
-        </xsl:copy> 
-    </xsl:template> 
-    
-    <xsl:template match="snippet[@type='component-param']"> 
-        <xsl:copy>
-            <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="descendant::*"/>
-        </xsl:copy> 
-    </xsl:template> 
-    
-    
-    <xsl:template match="snippet[@type='sitemap-example']"> 
-        <xsl:copy>
-            <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="descendant::*"/>
-        </xsl:copy> 
-    </xsl:template> 
 
-        <xsl:template match="snippet[@type='xsp-example']"> 
-        <xsl:copy>
-            <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="descendant::*"/>
-        </xsl:copy> 
-    </xsl:template> 
-    
-        <xsl:template match="snippet[@type='flow-example']"> 
-        <xsl:copy>
-            <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="descendant::*"/>
-        </xsl:copy> 
-    </xsl:template> 
-    
-        <xsl:template match="snippet[@type='form-example']"> 
-        <xsl:copy>
-            <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="descendant::*"/>
-        </xsl:copy> 
-    </xsl:template> 
 
 </xsl:transform>

Modified: cocoon/gsoc/rgraham/refdoc/samples/snippets/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/gsoc/rgraham/refdoc/samples/snippets/sitemap.xmap?rev=264666&r1=264665&r2=264666&view=diff
==============================================================================
--- cocoon/gsoc/rgraham/refdoc/samples/snippets/sitemap.xmap (original)
+++ cocoon/gsoc/rgraham/refdoc/samples/snippets/sitemap.xmap Mon Aug 29 18:29:34 2005
@@ -82,7 +82,7 @@
         <map:serialize type="xml"/>
       </map:match>
       
-      <!-- Testing searching from the pipeline -->
+      <!-- ND --> 
       <map:match pattern="searchQuery/*/neutraldoc">
         <map:generate src="cocoon:/searchQuery/{1}?pageLength=100"/>
         <map:transform label="neutralOne" src="searchxml-to-neutralDoc.xsl"/>
@@ -92,7 +92,7 @@
         <map:transform src="clear-bad-keys.xsl"> 
             <map:parameter name="query" value="{1}"/>
         </map:transform>
-        <map:transform src="neutral-ordering.xsl"/> 
+        <map:transform src="neutral-ordering.xsl"/>
         <map:serialize type="xml"/>
       </map:match>
 



Mime
View raw message