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
XSL filter ignores "omit-xml-declaration" setting in stylesheets #403
Comments
Or rather, I will when GitHub starts cooperating with me. |
👍 (Out of curiosity, what are you using the XSL stylesheets for?) |
ghost
mentioned this issue
Mar 17, 2014
@simonsouth If the content is open or sanitized, I would love to see it. |
denisdefreyne
added a commit
that referenced
this issue
Mar 22, 2014
…t-xml-declaration Honor "omit-xml-declaration" in XSL stylesheets - issue #403
Fixed by #404. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Specifying
omit-xml-declaration="yes"
in an XSL stylesheet is supposed to suppress the XML declaration (<?xml ...?>
) at the top of the generated output. However, nanoc's XSL filter ignores this setting, which causes problems when the filter is used to generate XML fragments for inclusion in other layouts.The problem is the filter invokes Nokogiri in a way that returns an object representing the transformed XML. When the filter requests a string representation from the object a new XML declaration is naturally generated.
The solution is to change the filter so it fetches the raw output of the transformation, which will make omitted elements stay omitted.
This is another small fix I've made locally and I'll submit a pull request in a moment.
The text was updated successfully, but these errors were encountered: