cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r169359 - in /cocoon/trunk/src/webapp/samples/test/sitemap-annotations: ./ explain-test.xml get-annotations.xsl sitemap.xmap
Date Mon, 09 May 2005 21:06:41 GMT
Author: bdelacretaz
Date: Mon May  9 14:06:41 2005
New Revision: 169359

URL: http://svn.apache.org/viewcvs?rev=169359&view=rev
Log:
patch 25352 applied (including anteater test), TreeProcessor ignores new 'annotations' namespace
in sitemaps

Added:
    cocoon/trunk/src/webapp/samples/test/sitemap-annotations/
    cocoon/trunk/src/webapp/samples/test/sitemap-annotations/explain-test.xml
    cocoon/trunk/src/webapp/samples/test/sitemap-annotations/get-annotations.xsl
    cocoon/trunk/src/webapp/samples/test/sitemap-annotations/sitemap.xmap

Added: cocoon/trunk/src/webapp/samples/test/sitemap-annotations/explain-test.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/test/sitemap-annotations/explain-test.xml?rev=169359&view=auto
==============================================================================
--- cocoon/trunk/src/webapp/samples/test/sitemap-annotations/explain-test.xml (added)
+++ cocoon/trunk/src/webapp/samples/test/sitemap-annotations/explain-test.xml Mon May  9 14:06:41
2005
@@ -0,0 +1,35 @@
+<?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.
+-->
+
+<!-- CVS $Id: explain-test.xml 30932 2004-07-29 17:35:38Z vgritsenko $ -->
+
+<page>
+    <title>Sitemap annotations test</title>
+    <content>
+        <para>
+            Test sitemap annotations and their extraction
+            <ul>
+                <li>
+                  The <link href="annotations">annotations</link>
+                  page contains a copy of the annotations found in sitemap.xmap
+                  (with namespaces removed as I haven't been able to get the
+                  anteater-based tests to work with namespaces)
+                </li>
+            </ul>
+        </para>
+    </content>
+</page>
\ No newline at end of file

Added: cocoon/trunk/src/webapp/samples/test/sitemap-annotations/get-annotations.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/test/sitemap-annotations/get-annotations.xsl?rev=169359&view=auto
==============================================================================
--- cocoon/trunk/src/webapp/samples/test/sitemap-annotations/get-annotations.xsl (added)
+++ cocoon/trunk/src/webapp/samples/test/sitemap-annotations/get-annotations.xsl Mon May 
9 14:06:41 2005
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!--
+  Extract annotations from sitemap
+  $Id: dir-links.xsl 36225 2004-08-11 14:36:46Z vgritsenko $
+ -->
+
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:fyi="http://apache.org/cocoon/sitemap/annotations/1.0"
+  exclude-element-prefixes="fyi"
+  >
+
+  <xsl:template match="/">
+    <sitemap-annotations>
+      <xsl:apply-templates/>
+    </sitemap-annotations>
+  </xsl:template>
+
+  <!-- copy fyi elements, without namespace -->
+  <xsl:template match="fyi:*">
+    <xsl:element name="{local-name()}">
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </xsl:element>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/webapp/samples/test/sitemap-annotations/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/test/sitemap-annotations/sitemap.xmap?rev=169359&view=auto
==============================================================================
--- cocoon/trunk/src/webapp/samples/test/sitemap-annotations/sitemap.xmap (added)
+++ cocoon/trunk/src/webapp/samples/test/sitemap-annotations/sitemap.xmap Mon May  9 14:06:41
2005
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<map:sitemap
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0"
+  xmlns:fyi="http://apache.org/cocoon/sitemap/annotations/1.0"
+  >
+  <fyi:info>
+    <fyi:author>The Cocoon team</fyi:author>
+    <fyi:text>
+      This sitemap contains notes which are ignored
+      by the tree processor, but could be used to create
+      self-documenting samples, for example.
+      See bugzilla issue 25352.
+    </fyi:text>
+  </fyi:info>
+
+  <map:pipelines>
+    
+    <map:pipeline>
+
+      <fyi:note>filter out sitemap to keep annotations only</fyi:note>
+      <map:match pattern="annotations">
+        <map:generate src="sitemap.xmap"/>
+        <map:transform src="get-annotations.xsl"/>
+        <map:serialize type="xml"/>
+      </map:match>
+      
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>
\ No newline at end of file



Mime
View raw message