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

@select and document-properties #193

Closed
xml-project opened this issue Oct 10, 2017 · 3 comments · Fixed by #233
Closed

@select and document-properties #193

xml-project opened this issue Oct 10, 2017 · 3 comments · Fixed by #233
Assignees

Comments

@xml-project
Copy link
Member

The example @ndw provided in his mail to me raises another point with @select on p:with-input etc.:
Suppose I have a step which accepts say "text/plain" and I have an XML document containing a text node as child of a "section" element. Can I use
<p:with-input select="//section/text">
with the XML document as default readable port or context node (if you prefer)?

The problem is at which point we will say, that the document to arrive on the text step does not match the expected content type "text/plain". If we do it before the evaluation @select an error has to be raised because there its "application/xml". If we consider the result of @select (as we do to assess whether its a sequence or not), no error should be raised.

I think you can make up the same kind of example for any XDM defined type as value of @select.

I hope, I made my point clear. If not, please tell me so and I try to provide an elaborated example.

@ndw
Copy link
Contributor

ndw commented Oct 10, 2017

I think, practically, the input to the step has to be considered the result of evaulating the @select expression. We may need to say what conversions are allowed/required/standardized.

@xml-project
Copy link
Member Author

Can we close this or do we have to add some prose to the specs explicitly saying, that checking for the right content type has to be done after the "select" phrase is applied to the incoming document?

@ndw
Copy link
Contributor

ndw commented Oct 25, 2017

I've been leaving it open because it feels like the spec needs to be clear. I'll take a look at fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants