Re: [xsl] How to match namespaces instead of namespace prefixes ?

Subject: Re: [xsl] How to match namespaces instead of namespace prefixes ?
From: Emmanouil Batsis <Emmanouil.Batsis@xxxxxxxxxxx>
Date: Wed, 27 Oct 2004 12:20:01 +0300
Matt Adams wrote:

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 ?


You dont, as XSLT implements this for you. If you declare that namespace in your XSLT like xmlns:foobar="http://www.foo.com"; then your XPath expressions can be written using the foobar prefix. The prefixes used in the source document to be transformed are irrelevant.


hth,

Manos

Current Thread