Wanted: More context info for dynamic errors XD0006 and XD0007 #184

Open
gimsieke opened this Issue Dec 23, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@gimsieke
Contributor

gimsieke commented Dec 23, 2014

In complex pipelines, it is often difficult to track down the sources of dynamic errors. Calabash does not provide much context information. I don’t know which context info would be available at all during runtime. It would certainly be nice if the file/step names could be reported, as during static pipeline analysis.

Here’s an example that will produce XD0006:

<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:pipe port="secondary" step="xslt"/>
  </p:output>
  <p:xslt template-name="main" name="xslt">
    <p:input port="source"><p:empty/></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">
          <xsl:template name="main">
            <xsl:result-document href="doc1">
              <doc1/>
            </xsl:result-document>
            <xsl:result-document href="doc2">
              <doc2/>
            </xsl:result-document>
          </xsl:template>
        </xsl:stylesheet>
      </p:inline>
    </p:input>
  </p:xslt>
  <p:sink/>
</p:declare-step>

Remove the xsl:result-document instructions in the template to elicit XD0007.

Besides the ever annoying XD0007 and XD0006 errors, there are certainly other non-obvious errors that might benefit from a more detailed reporting (e.g., XD0001 when more than one document is created on the primary port of the XSLT step).

@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Feb 4, 2015

Owner

Yeah, it's pretty awful.

Owner

ndw commented Feb 4, 2015

Yeah, it's pretty awful.

ndw added a commit that referenced this issue Feb 5, 2015

ndw added a commit that referenced this issue Feb 5, 2015

ndw added a commit that referenced this issue Feb 5, 2015

ndw added a commit that referenced this issue Feb 5, 2015

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