<< Back to previous view

[DXML-35] clojure.data.xml/indent should append a newline after the xml preamble Created: 18/Sep/16  Updated: 07/Dec/16

Status: Open
Project: data.xml
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Hans Hübner Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

clojure.data.xml 0.1.0-beta2



 Description   

Currently, indent and indent-str put the root element directly behind the preamble, without separating the two with a newline. This should be changed so that a newline is inserted.






[DXML-25] Emit Empty Elements using EmptyElementTag Created: 09/Jul/14  Updated: 07/Dec/16

Status: Open
Project: data.xml
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Alexander Kiel Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: enhancement, patch
Environment:

Does not apply


Patch: Code and Test

 Description   

Currently data.xml emits empty elements (elements without content) using start and end tags. The XML spec also allows special empty tags like <foo/>.

I need to serialize XML using such special empty tags because a device, I want to communicate with, does require empty tags. The device is just not able to parse XML messages using start and end tags.

I created a branch on GitHub where I implemented empty tags in the emit function. I'm not familiar how to create a patch. So for now here is the link to the compare view.

As I wrote in my commit message we should discuss, whether a option to the emit function would be a better solution.



 Comments   
Comment by Herwig Hochleitner [ 03/Oct/16 6:42 PM ]

I think, this is a worthwhile change, not because we want to support broken xml receivers, but because some xml dialects lean heavily on lots of attr-only tags for byte savings, even going so far as to encode whole polymorphic data structures in attr string values, as seen in svg.

For that reason, of not wanting to take on complexity arising from broken receivers, I'd vote against an emitter flag.

Would you be willing to sign a contributor's agreement and rebase your changes?





[DXML-22] Adding hiccup generation function for elements Created: 24/Feb/14  Updated: 07/Dec/16

Status: Open
Project: data.xml
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Chris Zheng Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

N/a



 Description   

This is for completeness really. See pull request https://github.com/clojure/data.xml/pull/10

I would like to:

  • generate an element using hiccup (already exists)
  • generate hiccup using an element (proposed)


 Comments   
Comment by Chris Zheng [ 28/Mar/14 7:22 AM ]

I'm hoping someone can at least give some feedback to this ticket.

Comment by Ryan Senior [ 28/Mar/14 7:53 AM ]

Hi Chris,

Thanks for the reminder on this. I'll have more time to dig in this weekend, but off the top of my head I think more will need to be done on this, both on implementation and on testing. I think what you have now won't work with comments or cdata. One way to flesh some of that out is to create round trip types of tests in src/test/clojure/clojure/data/xml/test_sexp.clj.





Generated at Fri Jan 20 03:54:10 CST 2017 using JIRA 4.4#649-r158309.