Subject: [xsl] local-name of attribute values From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 15 Feb 2002 10:27:18 +0100 (MET) |
Hello everybody, I have an attribute base="ns:type" and want to get the local name of the value, i.e. "type" in this case. Obviously this is the substring after ':'. If there is base="type" then it is the whole string. A single XPath expression for this could be concat(substring(substring-after(@base,':'), 1 div contains(@base,':')), substring(@base, 1 div not(contains(@base,':')))) (see http://www.dpawson.co.uk/xsl/sect2/N6461.html#d58e628 for an explanation) Does anybody know a shorter XPath 1.0 solution? (I need this as an expression for xsl:key) Cheers, Oliver /-------------------------------------------------------------------\ | ob|do Dipl.Inf. Oliver Becker | | --+-- E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx | | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker | \-------------------------------------------------------------------/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Newbie: SECOND POST - Hel, DPawson | Thread | Re: [xsl] local-name of attribute v, Jeni Tennison |
[xsl] Newbie: SECOND POST - Help!!, Rob Collyer | Date | Re: [xsl] sorting numbers, Jeni Tennison |
Month |