Herwig Hochleitner
added a comment - 26/Mar/14 9:20 AM I've taken another stab at this. Attached roundtrip-documents.patch implements roundtripping, which means reading and writing xmlns attributes and namespaces as is.
Further improvements, that would fall into the scope of this ticket, but should be implemented on top of correct roundtripping, hence another ticket might be in order:

functionality for normalizing prefixes

rewriting prefixes

finding a minimal set of prefix names and/or default namespace, for given fragment

Good to hear that. I've implemented a walker to resolve names in namespaced xml and have the emitter assign the prefix of a resolved name. You can review / use at your own peril from here: https://github.com/bendlas/data.xml

Right now, I'm doing cleanup passes and trying to get feedback from the before pushing for change.

Herwig Hochleitner
added a comment - 01/Apr/14 4:41 AM Good to hear that. I've implemented a walker to resolve names in namespaced xml and have the emitter assign the prefix of a resolved name. You can review / use at your own peril from here: https://github.com/bendlas/data.xml
Right now, I'm doing cleanup passes and trying to get feedback from the before pushing for change.

I stupidly did this myself before realizing it was already done.
What is the current status? Still waiting on Carlo (since he's submitted a patch), looking to use Herwig's, or something else?

I wasn't totally happy with how I did it, since I used a binding for a parallel stack containing the current prefix->URI mappings. This was because QName prefixes are kept in the namespace of an element's keyword, but .writeStartElement and .writeAttribute need the URIs the prefix maps to, which wasn't being kept. It'd be nice to see if there's a better way.

Paul Gearon
added a comment - 21/May/14 12:53 AM I stupidly did this myself before realizing it was already done.
What is the current status? Still waiting on Carlo (since he's submitted a patch), looking to use Herwig's, or something else?
I wasn't totally happy with how I did it, since I used a binding for a parallel stack containing the current prefix->URI mappings. This was because QName prefixes are kept in the namespace of an element's keyword, but .writeStartElement and .writeAttribute need the URIs the prefix maps to, which wasn't being kept. It'd be nice to see if there's a better way.

Submitting this patch, since the process requires a patch file. Carlo has not responded about the contributor agreement for 2 years, and none of the other attempts have been submitted as patches (edit: I've now seen Herwig's emails and realize that this is active).

Other implementations may be better, but I need to get the ball rolling on this.

Paul Gearon
added a comment - 21/May/14 10:36 AM - edited Submitting this patch, since the process requires a patch file. Carlo has not responded about the contributor agreement for 2 years, and none of the other attempts have been submitted as patches (edit: I've now seen Herwig's emails and realize that this is active).
Other implementations may be better, but I need to get the ball rolling on this.

We will be merging in Herwig's implementation soon. We're still waiting on getting him commit rights to the data.xml repo, so for now you can find his implementation here: https://github.com/bendlas/data.xml. We're planning on merging that into a namespaces branch where we'll hopefully have a beta release soon.

Ryan Senior
added a comment - 03/Nov/14 6:42 AM We will be merging in Herwig's implementation soon. We're still waiting on getting him commit rights to the data.xml repo, so for now you can find his implementation here: https://github.com/bendlas/data.xml. We're planning on merging that into a namespaces branch where we'll hopefully have a beta release soon.