xsl-list
[Top] [All Lists]

RE: getting the namespace prefix

2004-03-19 06:22:51


I know we can get the local name of an element with the 
local-name() function, and the namespace-uri with the 
namespace-uri() function, however, given the namespace uri, 
is there a way I could find out the namespace prefix used for 
a particular element? ie, say I know that the namespace uri 
for a particular element or set of elements is 
"http://purl.org/atom/ns#";, is there a way to > pick up the 
namespace prefix used on those elements? Thanks, Munna

Yes,

 <xsl:value-of select="substring-before(name(),':')"/>


cheers
andrew

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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