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

[xslt30] xsl:map and temporary output state #37

Open
michaelhkay opened this issue Feb 25, 2022 · 1 comment
Open

[xslt30] xsl:map and temporary output state #37

michaelhkay opened this issue Feb 25, 2022 · 1 comment

Comments

@michaelhkay
Copy link
Contributor

In §25.2, xsl:map and xsl:map-entry are not listed among the instructions that set temporary output state. I think this is an error; the immediately-preceding definition of temporary output states the intent "This state applies when instructions are writing to a temporary tree or any other non-final destination.", and a map is clearly a non-final destination.

@michaelhkay
Copy link
Contributor Author

I've had second thoughts on this. A transformation that delivers a map as its final output is really much the same as a transformation that delivers an XML tree as its final output; it wouldn't be right to ban use of xsl:result-document in such a transformation. We want to allow xsl:result-document the issue that led to the problem was disable-output-escaping when creating a text node in an entry in the map. The user really wanted a string in the map, not a text node, but they used xsl:value-of (and disable-output-escaping) through ignorance.

§26.2 of the XSLT 3.0 spec doesn't say what happens if you disable-output-escaping for a text node that's added to a map and then serialised using the JSON output method.

For that matter, XSLT 3.0 doesn't define the default value of the serialization parameter json-note-output-method. (I would suggest choosing it the same way as the default value of method.)

I'm inclined to add a rule that disable-output-escaping is ignored for text nodes within maps.

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
@michaelhkay and others