You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2008/02/19 13:05:03 UTC
svn commit: r629083 -
/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
Author: thorsten
Date: Tue Feb 19 04:04:58 2008
New Revision: 629083
URL: http://svn.apache.org/viewvc?rev=629083&view=rev
Log:
Using always cocoon:/ to resolve the image with the only exception being a @src with a protocol.
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl?rev=629083&r1=629082&r2=629083&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl Tue Feb 19 04:04:58 2008
@@ -345,19 +345,15 @@
<!-- Make relative paths absolute -->
<xsl:variable name="imgpath">
<xsl:choose>
- <!-- resources image dir -->
- <xsl:when test="starts-with(string(@src),'images/')">
- <xsl:value-of
- select="concat($imagesdir,substring-after(@src,'images'))"/>
- </xsl:when>
- <xsl:when test="contains(string(@src),'/images/')">
- <xsl:value-of
- select="concat($imagesdir,substring-after(@src,'/images'))"/>
- </xsl:when>
<!-- already absolute -->
<xsl:when
- test="contains(string(@src),':') or starts-with(string(@src),'/')">
+ test="contains(string(@src),':')">
<xsl:value-of select="@src"/>
+ </xsl:when>
+ <!-- absolute to servlet context -->
+ <xsl:when test="starts-with(string(@src),'/')">
+ <xsl:value-of
+ select="concat('cocoon:/',@src)"/>
</xsl:when>
<!-- relative to document -->
<xsl:otherwise>