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

errorcode on doc-prop-005 #58

Closed
xml-project opened this issue Oct 8, 2018 · 5 comments
Closed

errorcode on doc-prop-005 #58

xml-project opened this issue Oct 8, 2018 · 5 comments

Comments

@xml-project
Copy link
Member

Currently test "doc-prop-005" is expected to fail with xqterr:XPTY0004 (which is an XPath error). But this is not the point.

To my reading this pipeline will never compile, because the primary input port of step "identity" is not bound. So XS0032 ("It is a static error if no connection is provided and the default readable port is undefined.") would be right, but miss the point of the test.

What did I miss?

@ndw
Copy link
Contributor

ndw commented Oct 8, 2018

Are we looking at the same test?

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:cx="http://xmlcalabash.com/ns/extensions"
                name="main"
                version="3.0">
  <p:output port="result"/>

  <p:variable name="a" select="3 + 4"/>

  <!-- this should fail, $a isn't a document -->
  <p:identity>
    <p:with-input port="source" select="p:document-properties-document($a)/p:document-properties/a"/>
  </p:identity>

</p:declare-step>

@xml-project
Copy link
Member Author

Yes. I think there should be a binding for primary port 'source' on p:identity.

At least my implementation says so, and it looks right to me: Unbound primary input port.

What did I miss?

@ndw
Copy link
Contributor

ndw commented Oct 8, 2018

I'm confused. how is the p:with-input port="source" not a binding for the primary input on p:identity?

@ndw
Copy link
Contributor

ndw commented Oct 8, 2018

Oh! Nevermind. I see. Yes, that looks broken. I propose that we add a p:empty.

@xml-project
Copy link
Member Author

👍

@ndw ndw closed this as completed in #59 Oct 9, 2018
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