logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

svn commit: r278946 - in /lenya/trunk/src: modules/xhtml/config/ modules/xh: msg#00013

Subject: svn commit: r278946 - in /lenya/trunk/src: modules/xhtml/config/ modules/xhtml/schemas/ modules/xhtml/schemas/xhtml/ webapp/lenya/pubs/default/ webapp/lenya/pubs/default/lenya/resources/schemas/ webapp/lenya/pubs/default/modules/homepage/config/ webapp...
Author: andreas
Date: Tue Sep  6 01:57:39 2005
New Revision: 278946

URL: http://svn.apache.org/viewcvs?rev=278946&view=rev
Log:
Moved XSLT and homepage schemas to corresponding modules. This required to 
translate fallback:// rng includes to absolute urls 
(translate-rng-includes.xsl) so that they can be requested by BXE.

Added:
    lenya/trunk/src/modules/xhtml/schemas/
    lenya/trunk/src/modules/xhtml/schemas/xhtml/
      - copied from r278742, 
lenya/trunk/src/webapp/lenya/resources/schemas/xhtml/
    lenya/trunk/src/modules/xhtml/schemas/xhtml.rng
      - copied, changed from r278742, 
lenya/trunk/src/webapp/lenya/resources/schemas/xhtml.rng
    lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/schemas/
    
lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/schemas/homepage.rng
      - copied, changed from r278745, 
lenya/trunk/src/webapp/lenya/pubs/default/lenya/resources/schemas/homepage.rng
    lenya/trunk/src/webapp/lenya/xslt/bxe/translate-rng-includes.xsl
Removed:
    
lenya/trunk/src/webapp/lenya/pubs/default/lenya/resources/schemas/homepage.rng
    lenya/trunk/src/webapp/lenya/resources/schemas/xhtml/
    lenya/trunk/src/webapp/lenya/resources/schemas/xhtml.rng
Modified:
    lenya/trunk/src/modules/xhtml/config/module.xconf
    
lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/config/module.xconf
    lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap

Modified: lenya/trunk/src/modules/xhtml/config/module.xconf
URL: 
http://svn.apache.org/viewcvs/lenya/trunk/src/modules/xhtml/config/module.xconf?rev=278946&r1=278945&r2=278946&view=diff
==============================================================================
--- lenya/trunk/src/modules/xhtml/config/module.xconf (original)
+++ lenya/trunk/src/modules/xhtml/config/module.xconf Tue Sep  6 01:57:39 2005
@@ -22,7 +22,7 @@
   <component-instance name="xhtml"
                       logger="lenya.resourcetypes.xhtml"
                       
class="org.apache.lenya.cms.publication.ResourceTypeImpl">
-    <schema src="fallback://lenya/resources/schemas/xhtml.rng"/>
+    <schema src="fallback://lenya/modules/xhtml/schemas/xhtml.rng"/>
     <creator src="org.apache.lenya.cms.authoring.DefaultBranchCreator">
       
<sample-name>fallback://lenya/modules/xhtml/samples/xhtml.xml</sample-name>
     </creator>

Copied: lenya/trunk/src/modules/xhtml/schemas/xhtml.rng (from r278742, 
lenya/trunk/src/webapp/lenya/resources/schemas/xhtml.rng)
URL: 
http://svn.apache.org/viewcvs/lenya/trunk/src/modules/xhtml/schemas/xhtml.rng?p2=lenya/trunk/src/modules/xhtml/schemas/xhtml.rng&p1=lenya/trunk/src/webapp/lenya/resources/schemas/xhtml.rng&r1=278742&r2=278946&rev=278946&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/schemas/xhtml.rng (original)
+++ lenya/trunk/src/modules/xhtml/schemas/xhtml.rng Tue Sep  6 01:57:39 2005
@@ -34,7 +34,7 @@
 
 
 <!-- include Lenya schema, for Lenya assets within xhtml -->
-<include href="lenya.rng"/>
+<include href="fallback://lenya/resources/schemas/lenya.rng"/>
 
 <!-- include original XHTML transitional schema -->
 <include href="xhtml/xhtml-basic.rng">

Modified: 
lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/config/module.xconf
URL: 
http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/config/module.xconf?rev=278946&r1=278945&r2=278946&view=diff
==============================================================================
--- 
lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/config/module.xconf 
(original)
+++ 
lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/config/module.xconf 
Tue Sep  6 01:57:39 2005
@@ -22,7 +22,7 @@
   <component-instance name="homepage"
                       logger="lenya.resourcetypes.homepage"
                       
class="org.apache.lenya.cms.publication.ResourceTypeImpl">
-    <schema src="fallback://lenya/resources/schemas/homepage.rng"/>
+    <schema src="fallback://lenya/modules/homepage/schemas/homepage.rng"/>
     <creator src="org.apache.lenya.cms.authoring.DefaultBranchCreator">
       <sample-name>homepage.xml</sample-name>
     </creator>

Copied: 
lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/schemas/homepage.rng 
(from r278745, 
lenya/trunk/src/webapp/lenya/pubs/default/lenya/resources/schemas/homepage.rng)
URL: 
http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/schemas/homepage.rng?p2=lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/schemas/homepage.rng&p1=lenya/trunk/src/webapp/lenya/pubs/default/lenya/resources/schemas/homepage.rng&r1=278745&r2=278946&rev=278946&view=diff
==============================================================================
--- 
lenya/trunk/src/webapp/lenya/pubs/default/lenya/resources/schemas/homepage.rng 
(original)
+++ 
lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/schemas/homepage.rng 
Tue Sep  6 01:57:39 2005
@@ -32,6 +32,6 @@
     xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0";
     >
 
-<include href="fallback://lenya/resources/schemas/xhtml.rng"/>
+<include href="fallback://lenya/modules/xhtml/schemas/xhtml.rng"/>
 
 </grammar>

Modified: lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap
URL: 
http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap?rev=278946&r1=278945&r2=278946&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap (original)
+++ lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap Tue Sep  6 01:57:39 
2005
@@ -92,8 +92,19 @@
     <!-- BX Editor: RNG Schema, CSS -->
     <map:pipeline type="noncaching">
       
+      <map:match pattern="*/schemas/fallback/**.rng">
+        <map:generate src="fallback://{2}.rng"/>
+        <map:transform src="../../xslt/bxe/translate-rng-includes.xsl">
+          <map:parameter name="root" 
value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}/schemas/"/>
+        </map:transform>
+        <map:serialize type="xml"/>
+      </map:match>
+      
       <map:match pattern="*/schemas/**.rng">
-        <map:generate src="fallback://lenya/resources/schemas/{2}.rng"/>
+        <map:generate src="fallback://lenya/modules/{2}/schemas/{2}.rng"/>
+        <map:transform src="../../xslt/bxe/translate-rng-includes.xsl">
+          <map:parameter name="root" 
value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}/schemas/"/>
+        </map:transform>
         <map:serialize type="xml"/>
       </map:match>
       

Added: lenya/trunk/src/webapp/lenya/xslt/bxe/translate-rng-includes.xsl
URL: 
http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/xslt/bxe/translate-rng-includes.xsl?rev=278946&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/bxe/translate-rng-includes.xsl (added)
+++ lenya/trunk/src/webapp/lenya/xslt/bxe/translate-rng-includes.xsl Tue Sep  6 
01:57:39 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
+  xmlns:rng="http://relaxng.org/ns/structure/1.0";>
+  
+  
+  <xsl:param name="root"/>
+
+
+  <xsl:template match="rng:include/@href[starts-with(., 'fallback://')]">
+    <xsl:attribute name="href">
+      <xsl:value-of select="$root"/>
+      <xsl:text>fallback/</xsl:text>
+      <xsl:value-of select="substring-after(., 'fallback://')"/>
+    </xsl:attribute>
+  </xsl:template>
+
+
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file


<Prev in Thread] Current Thread [Next in Thread>