
November 12th, 2011, 03:00 AM
|
|
Contributing User
|
|
Join Date: Nov 2011
Posts: 46
Time spent in forums: 2 h 51 m 59 sec
Warnings Level: 10
Number of bans: 2
Reputation Power: 1
|
|
|
If you want to get the relative path, you have to use it in conjunction with resolve-uri(.) with some string manipulation. Like this.
<xsl:variable name="abs-path" select="unparsed-entity-uri('image')" />
<xsl:variable name="ref-path" select="replace(resolve-uri(.),'(^.*/)[^/]*$','$1')" />
<xsl:variable name="rel-path" select="substring-after($abs-path,$ref-path)" />
Now, the variable rel-path should hold the desired relative path to the image. (I assume the xsl-engine in use supports well the regex, replace() and substring-after().)
|