Error with XLINK

I was having an issue with XPATH parsing when using different namespaces in my DOM Tree, actually the problem was coming from Emerald Tree. We can see the following comment in SimpleXMLWritter :

The current version does not provide built-in support for
namespaces. To create files using namespaces, you have to provide
"xmlns" attributes and explicitly add prefixes to tags and
attributes.

So to get correct xml, we should add the different namespaces manually. The problem is that I could not find really the support for such of things in Emerald Tree.

Here are some snippets of what we need :

Output of the converter :

<ns0:page xmlns:ns0="http://moinmo.in/namespaces/page" xmlns:ns1="http://www.w3.org/1999/xlink"><ns0:body><ns0:div><ns0:object ns1:href="uri:test" /></ns0:div></ns0:body></ns0:page>

Output of the XMLWritter from EmeraldTree :

<page><body><div><object xlink:href="uri:test" /></div></body></page>

However to a valid XML file we should get :

<page xmlns:xlink="http://www.w3.org/1999/xlink"><body><div><object xlink:href="uri:test" /></div></body></page>

I could not find exactly how to do it with emeraldTree, but I think I can find it tomorrow.

MoinMoin: ValentinJaniaut/GSoC/Diary/2010-06-07 (last edited 2010-06-08 09:44:51 by ValentinJaniaut)