Re: [xml-dev] XPath and prefix bindings

From
Fraser Goffin <>
To
Date
2012-08-15T20:01:39Z
ID
<>
Thread
Re: [xml-dev] XPath and prefix bindings
Thanks Andrew, you're right I did miss the NS1 declaration on the
Evens element, however even when added I still get the same error ?

Fraser.

On 15 August 2012 19:44, Andrew Welch <> wrote:
>> <dis:Numbers xmlns:dis="urn:numbers">
>>         <NS1:Odds xmlns:NS1="urn:numbers">
>>                 <NS1:One>1</NS1:One>
>>                 <NS1:Three>3</NS1:Three>
>>                 <NS1:Five>5</NS1:Five>
>>         </NS1:Odds>
>>         <NS1:Evens>
>>                 <NS1:Two>2</NS1:Two>
>>                 <NS1:Four>4</NS1:Four>
>>                 <NS1:Six>6</NS1:Six>
>>         </NS1:Evens>
>> </dis:Numbers>
>
>> If however I add the declaration for NS1 to the root element the XPath
>> locates the node with no problem
>
>> What am I mis-understanding here ?
>
> It's not namespace well formed because the NS1 prefix on Evens isn't
> mapped... as you say moving the declaration so that it's in scope for
> NS1:Evens fixes the problem.
>
>
> --
> Andrew Welch
> http://andrewjwelch.com