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

Making select required in p:message #675

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

xml-project
Copy link
Member

No description provided.

@xml-project xml-project requested a review from a team as a code owner February 28, 2025 09:56
@xml-project xml-project requested a review from ndw February 28, 2025 09:57
Copy link
Contributor

@gimsieke gimsieke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a bit late to the party and not exactly about this particular change:

In XSLT, I often put other items than strings (elements, whole documents, until Saxon 10 also attributes) into the xsl:message/@select attribute. If it only allowed strings, I’d need to take care of serialization, sometimes type casting and concatenation myself.

What about accepting item()* for the select? And if we accept also an empty sequence, we need not make select required. It could be made implementation-defined what happens if the message content is empty: Does the processor write something like Message: then or nothing at all?

@ndw
Copy link
Collaborator

ndw commented Feb 28, 2025

@gimsieke 's point is a good one. Sigh. Everything is more complicated than you'd like. Choices:

  1. Make the select attribute item()*, add a serialization option and say that the items are serialized for output. Potentially simpler for users, but also a bit more complicated. And also a bit more like xsl:message
  2. Leave it as it is, make users write serialize() themselves.

I want the answer to be 2, but I have a feeling that the right answer is 1.

@xml-project xml-project merged commit 4aa9274 into xproc:master Feb 28, 2025
2 checks passed
@xml-project
Copy link
Member Author

@gimsieke Good point. For now using fn:serialize() should do a good job, doesn't it. So I would ask you to postpost this new feature to V next. Is this possible?

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.

3 participants