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 |
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>
</p:example>
<?xml version="1.0" encoding="UTF-8?> <p:example xmlns:p="something"> <p:elem>value</p:elem>
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 |