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

namespace prefixes in c:error/@code must be declared #107

Closed
josteinaj opened this issue Jul 4, 2013 · 1 comment
Closed

namespace prefixes in c:error/@code must be declared #107

josteinaj opened this issue Jul 4, 2013 · 1 comment

Comments

@josteinaj
Copy link
Contributor

@josteinaj josteinaj commented Jul 4, 2013

To reproduce, run this:

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:c="http://www.w3.org/ns/xproc-step"
                version="1.0">

  <p:output port="result"/>

  <p:try>
    <p:group>
      <p:xslt>
        <p:input port="source">
          <p:inline>
            <doc/>
          </p:inline>
        </p:input>
        <p:input port="parameters">
          <p:empty/>
        </p:input>
        <p:input port="stylesheet">
          <p:inline>
            <xsl:stylesheet
              xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
              version="2.0">asdf</xsl:stylesheet>
          </p:inline>
        </p:input>
      </p:xslt>
    </p:group>
    <p:catch name="catch">
      <p:identity>
        <p:input port="source">
          <p:pipe port="error" step="catch"/>
        </p:input>
      </p:identity>
    </p:catch>
  </p:try>


</p:declare-step>

The output is this (calabash 1.0.9):

<?xml version="1.0" encoding="UTF-8"?>
<c:errors xmlns:c="http://www.w3.org/ns/xproc-step">
    <error xmlns="http://www.w3.org/ns/xproc-step"
           type="fatal-error"
           code="err:XTSE0120"
           href="file:/tmp/error-prefix-test.xpl">
               net.sf.saxon.trans.XPathException:
               No character data is allowed between
               top-level elements
    </error>
</c:errors>

Notice that the err prefix in /c:errors/c:error/@code is not declared.

@ndw
Copy link
Owner

@ndw ndw commented Jul 26, 2013

Good catch. Thanks.

@ndw ndw closed this Jul 26, 2013
josteinaj added a commit to daisy/xprocspec that referenced this issue Jun 27, 2014
ndw/xmlcalabash1#107 was fixed in calabash 1.0.11, so 1.0.11 or newer is now required for xprocspec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.