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

Attempt to resolve issues surrounding text value templates #1138

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

ndw
Copy link
Contributor

@ndw ndw commented Feb 4, 2025

Fix #1131

  1. Make the backwards-incompatible change that TVTs are serialized as text, not XML, when they occur in content types that are not XML or HTML content types.
  2. Correct the examples, observing that special care has to be taken with quotes in JSON.
  3. Add explicit error (err:XD0052) for attempting to output a free-floating attribute node if the content type is not XML or HTML.

This one is ugly. We were very clear in the 3.0 spec that the serialization was XML, down to having examples that used it. But I persuaded myself that those examples would fail in the general case (because serialized XML could contain an unescaped double quote, making it an invalid JSON string) so this change is still an improvement.

I updated the example to show how to address this problem.

I decided to reuse err:XD0052 instead of adding err:XD0084 as I proposed in the issue. If we accept this PR, the tests in the test suite will need to be updated.

Fix xproc#1131

1. Make the backwards-incompatible change that TVTs are serialized as text, not
XML, when they occur in content types that are not XML or HTML content types.
2. Correct the examples, observing that special case has to be taken with quotes
in JSON.
3. Add explicit error (err:XD0052) for attempting to output a
free-floating attribute node if the content type is not XML or HTML.
@ndw ndw requested a review from a team as a code owner February 4, 2025 08:28
@ndw ndw merged commit 03b0fd1 into xproc:master Feb 4, 2025
2 checks passed
@ndw ndw deleted the iss-1131 branch February 4, 2025 18:36
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

Successfully merging this pull request may close these issues.

You can't serialize a free-floating attribute node
3 participants