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

Serialization of XSLT results with/without disable-output-escaping #42

Open
xatapult opened this issue Jan 11, 2024 · 3 comments
Open

Comments

@xatapult
Copy link
Contributor

In the result of an XSLT stylesheet you can turn disable-output-escaping on (on <xsl:value-of.../>). Turning it on makes for instance > and < characters not to be serialized as &gt; and &lt; but as the characters themselves. This is useful if you have for instance a piece of XML in a string variable that you want serialized as XML, not as text.

However, serializing an XSLT result that uses this feature in an XProc pipeline does not retain this. Maybe we should do something about it.

@ndw
Copy link

ndw commented Jan 11, 2024

I don't think disable-output-escaping is the way forward. You should be able to do it more cleanly with character maps at serialization time.

@xatapult
Copy link
Contributor Author

Sure, but what if some text nodes have disable-output-escaping on and some have it off? Character maps are global...

@ndw
Copy link

ndw commented Jan 11, 2024

Yeah. You have to manage things a little more carefully. But disable-output-escaping can produce data models that can't be serialized. It exists now only for backwards compatibility reasons, processors aren't required to support it.

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

2 participants