|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Simple suggestion for XSLT
"Laurent M." wrote:
> I was really trying to get to this:
>
> "C:\some\thing\some\thing\some\thing\IdontKnowAnymoreTheDepthOfThePath\This
> IsThePart.IAmLookingFor
You can do it with:
<xsl:template name="basename">
<xsl:param-variable name="path"/>
<xsl:choose>
<xsl:when test="contains($path, '\')">
<xsl:call-template name="basename">
<xsl:param name="path" expr="substring-after($path, '\')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$path"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
James
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








