Subject: RE: getting the namespace prefix
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 19 Mar 2004 15:28:46 -0000
|
There may be more than one prefix bound to a given namespace URI, but
name(namespace::*[.=$uri][1])
will give you the first one.
Alternatively use substring-before(name(.), ':')
Michael Kay
# -----Original Message-----
# From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
# [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Munna D
# Sent: 19 March 2004 12:42
# To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
# Subject: getting the namespace prefix
#
# Hi,
# 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
# --
# _______________________________________________
# Get your free email from http://www.iname.com
#
#
# XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
#
#
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|