Xpointer and namespace

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Xpointer and namespace

Marc.Benimeli
Hi,

Can somebody explain this behaviour ?

I have a .XPL where I do stuff like that :

<p:processor name="oxf:xslt">
        <p:input name="data" href="#my_data#xpointer(root/*)"/>
        ....
</p:processor

my_data :
<root>
    <L1>
        <L2>
        </L2>
    </L1>
<root>

If I put a namespace in the root element like :
xmlns="http://My_Namespace" it doesn't work.
But if there is no namespace or one of this kind :
xmlns:mn="http://My_Namespace" it works.

Marc



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xpointer and namespace

Erik Bruchez
Administrator
[hidden email] wrote:

> Hi,
>
> Can somebody explain this behaviour ?
>
> I have a .XPL where I do stuff like that :
>
> <p:processor name="oxf:xslt">
> <p:input name="data" href="#my_data#xpointer(root/*)"/>
> ....
> </p:processor
>
> my_data :
> <root>
>     <L1>
>         <L2>
>         </L2>
>     </L1>
> <root>
>
> If I put a namespace in the root element like :
> xmlns="http://My_Namespace" it doesn't work.
> But if there is no namespace or one of this kind :
> xmlns:mn="http://My_Namespace" it works.
Easy one. By using:

   xmlns="http://My_Namespace"

You are putting all the elements of your document in the
"http://My_Namespace" namespace.

By using no namespace or:

   xmlns:mn="http://My_Namespace"

you are not changing the namespace of the elements.

If you put your elements in a namespace, you have to qualify the
elements in your path expression, for example:


<p:input name="data" xmlns:mn="http://My_Namespace"
href="#my_data#xpointer(/mn:root/*)"/>

-Erik



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws