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

Subject: How to match namespaces instead of namespace prefixes ?
From: "Matt Adams" <mattad@xxxxxxxxx>
Date: Wed, 27 Oct 2004 10:14:08 +0100
As we know different XML documents could have different namespace prefixes
for the same namespace. E.g.:

doc1.xml:
<topelem xmlns:aaa="http://www.foo.com" xmlns:bbb="http://www.bar.com" ... >
...
<aaa:subelem bbb:myattr="1">
</topelem>

doc2.xml:
<topelem xmlns:xxx="http://www.foo.com" xmlns:zzz="http://www.bar.com" ... >
...
<xxx:subelem zzz:myattr="1">
</topelem>


Now I want to write a XSLT stylesheet which matches a subelem if the
prepended
namespace prefix belongs to the namespace "http://www.foo.com"
regardless which current namespace prefix is used.

How do I implement this ?

In other words I am searching for a function similar to

<xsl:copy-of select="searchprefixfor(http://www.foobar.com):subelem" />

Is there such a function?
Is there a workaround?

Thank you
Matt

--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm

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