data.xml

Namespaces support

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test

Description

Add support for both parsing and emitting namespace qualified tags and namespaces URI declarations.
It basically follows the underlying Java XML API in giving xmlns:foo attributes "special" treatment.

  1. roundtrip-documents.patch
    26/Mar/14 9:20 AM
    11 kB
    Herwig Hochleitner
  2. add-namespace-support.patch
    27/Mar/12 3:45 PM
    8 kB
    Carlo Sciolla
  3. add_namespaces.patch
    21/May/14 10:36 AM
    23 kB
    Paul Gearon

Activity

Hide
Ryan Senior added a comment -

I don't see a contributor agreement for you Carlo. Have you signed one? http://clojure.org/contributing

Show
Ryan Senior added a comment - I don't see a contributor agreement for you Carlo. Have you signed one? http://clojure.org/contributing
Hide
Gary Trakhman added a comment -

ping, is the patch still waiting for a signed CA?

Show
Gary Trakhman added a comment - ping, is the patch still waiting for a signed CA?
Hide
Ryan Senior added a comment -

Yes

Show
Ryan Senior added a comment - Yes
Hide
Robert Onslow added a comment -

Is this patch due reasonable soon?

Show
Robert Onslow added a comment - Is this patch due reasonable soon?
Hide
Andy Fingerhut added a comment -

Link to a design page with some ideas for XML namespace support in Clojure: http://dev.clojure.org/display/DXML/Fuller+XML+support

Show
Andy Fingerhut added a comment - Link to a design page with some ideas for XML namespace support in Clojure: http://dev.clojure.org/display/DXML/Fuller+XML+support
Hide
Herwig Hochleitner added a comment -

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
Show
Herwig Hochleitner added a comment - 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
Hide
Steve Suehs added a comment -

I could really use this. I'm tweaking poms and the xml headers with schema locations cause grief. If you are in Austin I'll buy you a beer.

Show
Steve Suehs added a comment - I could really use this. I'm tweaking poms and the xml headers with schema locations cause grief. If you are in Austin I'll buy you a beer.
Hide
Herwig Hochleitner added a comment -

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.

Show
Herwig Hochleitner added a comment - 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.
Hide
Paul Gearon added a comment -

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.

Show
Paul Gearon added a comment - 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.
Hide
Paul Gearon added a comment - - 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.

Show
Paul Gearon added a comment - - 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.
Hide
Martin Clausen added a comment -

Carlo has signed a CA and is on the contributor list. Hope this means this much needed patch can be accpeted.

Show
Martin Clausen added a comment - Carlo has signed a CA and is on the contributor list. Hope this means this much needed patch can be accpeted.

People

Vote (6)
Watch (5)

Dates

  • Created:
    Updated: