You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ch...@apache.org on 2006/02/13 23:20:05 UTC
svn commit: r377510 - in /lenya/trunk/src/webapp/lenya: lenya.xmap
module-resources.xmap xslt/resources/external-relax.xsl
Author: chestnut
Date: Mon Feb 13 14:20:03 2006
New Revision: 377510
URL: http://svn.apache.org/viewcvs?rev=377510&view=rev
Log:
fixes for rng includes, added context prefix and core resources
Modified:
lenya/trunk/src/webapp/lenya/lenya.xmap
lenya/trunk/src/webapp/lenya/module-resources.xmap
lenya/trunk/src/webapp/lenya/xslt/resources/external-relax.xsl
Modified: lenya/trunk/src/webapp/lenya/lenya.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/lenya.xmap?rev=377510&r1=377509&r2=377510&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/lenya.xmap (original)
+++ lenya/trunk/src/webapp/lenya/lenya.xmap Mon Feb 13 14:20:03 2006
@@ -60,6 +60,12 @@
<map:match pattern="images/**.*">
<map:read src="resources/images/{1}.{2}" mime-type="image/{4}" />
</map:match>
+
+ <map:match pattern="**.rng">
+ <map:generate src="resources/{1}.rng"/>
+ <map:transform src="xslt/resources/external-relax.xsl"/>
+ <map:serialize type="xml"/>
+ </map:match>
<map:match pattern="css/**.css">
<map:select type="resource-exists">
Modified: lenya/trunk/src/webapp/lenya/module-resources.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/module-resources.xmap?rev=377510&r1=377509&r2=377510&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/module-resources.xmap (original)
+++ lenya/trunk/src/webapp/lenya/module-resources.xmap Mon Feb 13 14:20:03 2006
@@ -60,6 +60,7 @@
<map:generate src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}"/>
<map:transform src="fallback://lenya/xslt/resources/external-relax.xsl">
<map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
+ <map:parameter name="contextprefix" value="{request:contextPath}"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
Modified: lenya/trunk/src/webapp/lenya/xslt/resources/external-relax.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/xslt/resources/external-relax.xsl?rev=377510&r1=377509&r2=377510&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/resources/external-relax.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/resources/external-relax.xsl Mon Feb 13 14:20:03 2006
@@ -20,14 +20,21 @@
>
<xsl:param name="publicationid" />
+ <xsl:param name="contextprefix"/>
+ <xsl:template match="@href[starts-with(.,'fallback://lenya/resources/')]" priority="10">
+ <xsl:attribute name="href">
+ <xsl:variable name="resource" select="substring-after(., 'fallback://lenya/resources/')"/>
+ <xsl:value-of select="concat($contextprefix, '/lenya/', $resource )"/>
+ </xsl:attribute>
+ </xsl:template>
- <xsl:template match="@href[starts-with(.,'fallback')]">
+ <xsl:template match="@href[starts-with(.,'fallback')]" priority="5">
<xsl:variable name="nofallback" select="substring-after(.,'fallback://lenya/modules/')"/>
<xsl:variable name="restype" select="substring-before($nofallback,'/resources')"/>
<xsl:variable name="resource" select="substring-after($nofallback,'resources/')"/>
<xsl:attribute name="href">
- <xsl:value-of select="concat('/' , $publicationid, '/modules/' , $restype, '/', $resource)"/>
+ <xsl:value-of select="concat($contextprefix, '/' , $publicationid, '/modules/' , $restype, '/', $resource)"/>
</xsl:attribute>
</xsl:template>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org