Subject: Re: [xsl] Overflow on building relative paths for one case only From: "Sam Byland" <shbyland@xxxxxxxxxxx> Date: Sat, 12 Jan 2008 09:50:03 -0800 |
^^^^^^^^^<xsl:template name="relativeUrl"> <xsl:param name="from"/> <xsl:param name="to"/> <xsl:variable name="samePath"> <xsl:choose> <!--<xsl:when test="starts-with($to,$from)">--> <xsl:when test="$to=$from"> <xsl:choose> <xsl:when test="contains(substring-after(substring-after($to,$from),'/'),'/')"> <xsl:value-of select="false()"/>
^^^^^^^^</xsl:when> <xsl:otherwise> <xsl:value-of select="true()"/>
^^^^^^^^^</xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="false()"/>
</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:choose> <xsl:when test="$samePath='false'">
^^^^^^^^^^^^^^^^^^^ If you change that last xsl:when to:
<xsl:when test="not($samePath)">
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Getting relative paths</title> </head> <body>/web_cabinet/folder1/folder2/folder3<br>/web_cabinet/folder1/folder2/linkingToDocument.doc<br></body> </html>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Overflow on building relative, Cynthia . Arangua | Thread | RE: [xsl] Overflow on building rela, Michael Kay |
Re: [xsl] XPath matching elements w, Abel Braaksma | Date | RE: [xsl] Overflow on building rela, Michael Kay |
Month |