xsl-list
[Top] [All Lists]

substring

2006-01-10 05:42:22
I would like to use substring-after on an element, but cannot figure out
the syntax. Here is the xml:

<key>Location</key>
<string>file://localhost/E:/Rap/2%20Pac/Greatest%20Hits%20Disc%201/03-Temptations.mp3</string>

Here is the xsl:

<location>
<xsl:value-of select="substring-after(child::*[preceding-sibling::* =
'Location'], 'file://localhost/'" />
</location>

I would like the end result to be:
<location>
E:/Rap/2%20Pac/Greatest%20Hits%20Disc%201/03-Temptations.mp3
</location>

This part - child::*[preceding-sibling::* = 'Location'] works well to grab
the <string> of out <key>Location</key>. It is the substring-after part
that I am having problems with.

Any help would be greatly appreciated.

Thanks,
Dan






--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>