-
Notifications
You must be signed in to change notification settings - Fork 7
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
Content-types of ports "source" and "result" on p:insert: Allow text documents? #583
Comments
Isn't an XML document that contains just a text node a, uh, text document? How did that get into the step without tripping over the constraint on Do we want to allow (I'm in favor, I'm just trying to see if we've covered all the bases.) |
Sorry for being not precise: I am talking about XProc 3.1, where a text document is allowed on port "insertion".
The result is a document node with one text node. So it should be, as you said, a text document. But the signature of p:insert is:
|
I agree that we should add Tangentially, I'm wondering what the result of your
The only way that can happen is if you delete the root node, as you're doing in the example above. I suppose, technically, the result of that deletion is a completely empty document, not a document containing exactly one text node. But I think I assume that it becomes a text document. And then it wouldn't be allowed on the |
Fix #583 by allowing the result to be text
I think there is an edge case, where the result of p:insert can be a text document. If the document on port "source" is an XML document which contains just a document node (no element nodes), and then I insert a text document, I think I should get a text document.
But the current specification says, port "result" on p:insert is either XML or HTML.
Proposal: Add "text" to the possible content types of port "result".
Does this make sense?
The text was updated successfully, but these errors were encountered: