Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format_document - optional <xml> tag? #24

Open
ArtemGr opened this issue Jul 2, 2015 · 3 comments
Open

format_document - optional <xml> tag? #24

ArtemGr opened this issue Jul 2, 2015 · 3 comments

Comments

@ArtemGr
Copy link

ArtemGr commented Jul 2, 2015

Would you consider making the <xml> tag generation in format_document optional?

When working with XML fragments the tag is not needed.

Right now one has to stream into a temporary buffer first (or something like that) to cut it out.

@shepmaster
Copy link
Owner

Do you mean the <?xml?> part? That's referred to as the preamble. My biggest concern would be a proliferation of output options and ensuring that the XML continues to be valid.

Could you share a bit more about your use case?

@ArtemGr
Copy link
Author

ArtemGr commented Jul 2, 2015

I see how the xml tag validity might be a concern in the presence of namespaces etc.

In my case the tag is generated elsewhere and then undergoes a bit of in-Rust enhancement, I know it's pretty basic and no validity concerns should arise.

But if working with XML fragments is inherently unsafe then I'll understand rejecting the idea.

@wimh
Copy link
Contributor

wimh commented Jul 12, 2016

Another use case for this would be a xslt library which supports <xsl:output method="xml" omit-xml-declaration="yes" />, see https://www.w3.org/TR/xslt#section-XML-Output-Method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants