You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2009/04/17 16:25:52 UTC

svn commit: r766026 - in /lenya/docu/modules/forrest: resources/schemas/document-v20.mod.rng resources/schemas/document-v20.rng sitemap.xmap xslt/removeNamespaces.xsl

Author: andreas
Date: Fri Apr 17 14:25:49 2009
New Revision: 766026

URL: http://svn.apache.org/viewvc?rev=766026&view=rev
Log:
Add namespace to forrest document schema.

Added:
    lenya/docu/modules/forrest/xslt/removeNamespaces.xsl
Modified:
    lenya/docu/modules/forrest/resources/schemas/document-v20.mod.rng
    lenya/docu/modules/forrest/resources/schemas/document-v20.rng
    lenya/docu/modules/forrest/sitemap.xmap

Modified: lenya/docu/modules/forrest/resources/schemas/document-v20.mod.rng
URL: http://svn.apache.org/viewvc/lenya/docu/modules/forrest/resources/schemas/document-v20.mod.rng?rev=766026&r1=766025&r2=766026&view=diff
==============================================================================
--- lenya/docu/modules/forrest/resources/schemas/document-v20.mod.rng (original)
+++ lenya/docu/modules/forrest/resources/schemas/document-v20.mod.rng Fri Apr 17 14:25:49 2009
@@ -51,7 +51,10 @@
 <!-- =============================================================== -->
 <!-- Useful entities for increased DTD readability -->
 <!-- =============================================================== -->
-<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+<grammar ns="http://apache.org/lenya/forrest"
+  xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
+  xmlns="http://relaxng.org/ns/structure/1.0"
+  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
   <define name="text">
     <text/>
   </define>

Modified: lenya/docu/modules/forrest/resources/schemas/document-v20.rng
URL: http://svn.apache.org/viewvc/lenya/docu/modules/forrest/resources/schemas/document-v20.rng?rev=766026&r1=766025&r2=766026&view=diff
==============================================================================
--- lenya/docu/modules/forrest/resources/schemas/document-v20.rng (original)
+++ lenya/docu/modules/forrest/resources/schemas/document-v20.rng Fri Apr 17 14:25:49 2009
@@ -95,7 +95,8 @@
 <!-- =============================================================== -->
 <!-- Document -->
 <!-- =============================================================== -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+<grammar ns="http://apache.org/lenya/forrest"
+  xmlns="http://relaxng.org/ns/structure/1.0">
   <include href="document-v20.mod.rng"/>
   <start>
     <choice>

Modified: lenya/docu/modules/forrest/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/docu/modules/forrest/sitemap.xmap?rev=766026&r1=766025&r2=766026&view=diff
==============================================================================
--- lenya/docu/modules/forrest/sitemap.xmap (original)
+++ lenya/docu/modules/forrest/sitemap.xmap Fri Apr 17 14:25:49 2009
@@ -77,6 +77,7 @@
             <map:transform src="fallback://lenya/modules/forrest/xslt/{doc-info:{2}:{3}:{4}:{5}:resourceType}2document.xsl"/>
           </map:when>
         </map:select>
+        <map:transform src="fallback://lenya/modules/forrest/xslt/removeNamespaces.xsl"/>
         <map:transform src="fallback://lenya/modules/forrest/xslt/forrestDocument202{1}.xsl">
           <map:parameter name="rendertype" value="{request-param:rendertype}"/>
           <map:parameter name="nodeid" value="{doc-info:{2}:{3}:{4}:{5}:nodeName}"/>

Added: lenya/docu/modules/forrest/xslt/removeNamespaces.xsl
URL: http://svn.apache.org/viewvc/lenya/docu/modules/forrest/xslt/removeNamespaces.xsl?rev=766026&view=auto
==============================================================================
--- lenya/docu/modules/forrest/xslt/removeNamespaces.xsl (added)
+++ lenya/docu/modules/forrest/xslt/removeNamespaces.xsl Fri Apr 17 14:25:49 2009
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
+
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  
+  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+  
+  <xsl:template match="*">
+    <xsl:element name="{local-name()}">
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </xsl:element>
+  </xsl:template>
+
+  <!-- fixme: this might be generalized to also pass on processing instructions etc...-->
+  <xsl:template match="comment()">
+    <xsl:copy/>
+  </xsl:template>
+                                          
+</xsl:stylesheet>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org