[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Stephen Colin (UK) wrote:
This 'elem' element is in no namespace.
This 'p:elem' element is in the namespace 'something'.
--
Re: [xsl] XPath matching elements with or without prefix by inherited namespace
Subject: Re: [xsl] XPath matching elements with or without prefix by inherited namespace From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Fri, 11 Jan 2008 16:02:02 +0100 |
Stephen Colin (UK) wrote:
How do I reliably match the "elem" element in both of the below documents:
<?xml version="1.0" encoding="UTF-8?> <p:example xmlns:p="something"> <elem>value</elem>
This 'elem' element is in no namespace.
</p:example>
<?xml version="1.0" encoding="UTF-8?> <p:example xmlns:p="something"> <p:elem>value</p:elem>
This 'p:elem' element is in the namespace 'something'.
With XPath 2.0 you can use *:elem to select elements with local name 'elem' in any namespace. With XPath 1.0 you can only use *[local-name() = 'elem']
--
Martin Honnen http://JavaScript.FAQTs.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XPath matching elements with , Stephen Colin (UK) | Thread | Re: [xsl] XPath matching elements w, David Carlisle |
Re: [xsl] Breaking up a large XML d, Eliot Kimber | Date | Re: [xsl] Breaking up a large XML d, Martin Honnen |
Month |
Keywords