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

Error when a variable is initialized with a namespace node #81

Closed
fgeorges opened this Issue Feb 19, 2013 · 1 comment

Comments

Projects
None yet
3 participants
@fgeorges

fgeorges commented Feb 19, 2013

Calabash throws an error when the select expression of a p:variable results in a namespace node, instead of getting its string value, which is the namespace URI (if I read the spec correctly). This as already be mentioned in #80. A simple repro is:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="1.0">
   <p:input port="source">
      <p:inline xmlns:ns="some-uri">
         <ns:doc>Hello world!</ns:doc>
      </p:inline>
   </p:input>
   <p:output port="result"/>
   <p:variable name="ns-uri" select="/*/namespace::ns"/>
   <p:identity/>
</p:declare-step>

The error is then:

$ java -jar /.../calabash.jar ns-bug.xproc
Feb 19, 2013 5:17:02 PM com.xmlcalabash.util.DefaultXProcMessageListener error
SEVERE: net.sf.saxon.s9api.SaxonApiException: Cannot create a namespace node (ns) whose parent is a document node
Feb 19, 2013 5:17:02 PM com.xmlcalabash.drivers.Main error
SEVERE: com.xmlcalabash.core.XProcException: net.sf.saxon.s9api.SaxonApiException: Cannot create a namespace node (ns) whose parent is a document node
Feb 19, 2013 5:17:02 PM com.xmlcalabash.drivers.Main error
SEVERE: Underlying exception: net.sf.saxon.s9api.SaxonApiException: Cannot create a namespace node (ns) whose parent is a document node
@vojtechtoman

This comment has been minimized.

Show comment
Hide comment
@vojtechtoman

vojtechtoman Feb 20, 2013

I have created a new test in the XProc test suite for this: http://tests.xproc.org/tests/required/variable-008.xml

vojtechtoman commented Feb 20, 2013

I have created a new test in the XProc test suite for this: http://tests.xproc.org/tests/required/variable-008.xml

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