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

Comments

Projects
None yet
2 participants
@xml-project
Contributor

xml-project commented Oct 8, 2018

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

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Oct 8, 2018

Contributor

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>
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

This comment has been minimized.

Show comment
Hide comment
@xml-project

xml-project Oct 8, 2018

Contributor

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?

Contributor

xml-project commented Oct 8, 2018

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

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Oct 8, 2018

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Oct 8, 2018

Contributor

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

Contributor

ndw commented Oct 8, 2018

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

@xml-project

This comment has been minimized.

Show comment
Hide comment
@xml-project

xml-project Oct 8, 2018

Contributor

👍

Contributor

xml-project commented Oct 8, 2018

👍

@ndw ndw closed this in #59 Oct 9, 2018

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