xmlcalabash1 icon indicating copy to clipboard operation
xmlcalabash1 copied to clipboard

Wanted: More context info for dynamic errors XD0006 and XD0007

Open gimsieke opened this issue 10 years ago • 1 comments

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

gimsieke avatar Dec 23 '14 20:12 gimsieke

Yeah, it's pretty awful.

ndw avatar Feb 04 '15 01:02 ndw