[Home] [By Thread] [By Date] [Recent Entries]

Subject: Different Namespace Prefixes for Same Namespace URI
From: "Jeffrey Winter" <JeffreyWinter@xxxxxxx>
Date: Mon, 3 Mar 2003 13:14:15 -0500
Is there a standard mechanism for referencing
namespace URIs for use in an XPath expression 
instead of the namespace prefix?

I have a situation where I don't control the 
source document.  Normally I could get the value
of the <widget> element from this document:

  <content xmlns:foo="http://example.org/ns">
    <foo:widget>test</foo:widget>
  </content>

with

  <xsl:value-of select="/content/foo:widget"/>

But what happens if the namespace prefix isn't
"foo", but "bar" as in this document:

  <content xmlns:bar="http://example.org/ns">
    <bar:widget>test</bar:widget>
  </content>

Can the namespace be referenced via the URI in 
some manner, or is there another standard approach
to dealing with this issue?

Thanks

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


Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member