This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Prefix -> Namespace Resolution
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 15 Jul 2002 14:49:31 +0100
- Subject: RE: [xsl] Prefix -> Namespace Resolution
- Reply-to: xsl-list at lists dot mulberrytech dot com
Sure, this is what the namespace axis is for.
<xsl:value-of select="namespace::*[name()=$prefix]"/>
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of
> Christopher Dix
> Sent: 15 July 2002 13:59
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] Prefix -> Namespace Resolution
>
>
> Is there a way to determine the namespace URI associated with
> a given prefix while processing a document? I realize that
> namespace-uri will give me the URI if I have an element. In
> my case, I have an attribute value that is a Qname, and I
> need to determine what the URI is for that value. For example:
>
> <doc xmlns:x="http://someuri.org/">
> <foo myAttribute="x:myVal"/>
> </doc>
>
> In the course of processing, I will discover the value of
> myAttribute for element foo, and I need to determine the
> namespace URI associated with prefix x. I appreciate any
> help you can give me.
>
> Thanks,
> Chris Dix
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list