- From: <Toman_Vojtech@emc.com>
- Date: Tue, 3 Aug 2010 10:13:14 -0400
- To: <xproc-dev@w3.org>
Paul, That Calabash is complaining is actually correct. Calumet makes a number of Calumet-specific steps available by default, without needing to import any library. That means that Calabash does not know the declaration of emx:message in your pipeline. On the other hand, because the pipeline imports the Calabash extension library, Calumet has enough information about the declaration of cx:message. I think the best solution for the moment is to use the use-when attribute instead of p:choose: <emx:message p:use-when="...Calumet..."> <p:with-option name="message" select="concat('collection : ',$file)"/> </emx:message> <cx:message p:use-when="...Calabash..."> <p:with-option name="message" select="concat('collection : ',$file)"/> </cx:message> Another way to make the step work in Calabash would be to import the Calumet extension library. The only problem with that is that the library is available only in the Calumet JAR... I think we should make it available as a separate file as well, so that you can use it with other XProc processors. Regards, Vojtech > -----Original Message----- > From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On Behalf Of > Paul Hermans > Sent: Tuesday, August 03, 2010 10:44 AM > To: xproc-dev@w3.org > Subject: using messages depending on XProc processor > > Trying to send messages for debugging reasons, depending on the processor > used: > > <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" > xmlns:wts="http://www.w3.org/XML/2004/xml-schema-test-suite/" > xmlns:c="http://www.w3.org/ns/xproc-step" > xmlns:cx="http://xmlcalabash.com/ns/extensions" > xmlns:emx="http://www.emc.com/documentum/xml/xproc" > xmlns:xlink="http://www.w3.org/1999/xlink" xpath-version="1.0" > name="generatereport" > version="1.0"> > ... > > <p:variable name="product" select="p:system-property('p:product-name')"/> > <p:import href="http://xmlcalabash.com/extension/steps/library-1.0.xpl"/> > > ... > > <p:choose> > <p:when test="contains($product,'Calumet')"> > <emx:message> > <p:with-option name="message" > select="concat('collection : ',$file)"/> > </emx:message> > <p:identity/> > </p:when> > <p:when test="contains($product,'Calabash')"> > <cx:message> > <p:with-option name="message" > select="concat('collection : ',$file)"/> > </cx:message> > <p:identity/> > </p:when> > <p:otherwise> > <p:identity/> > </p:otherwise> > </p:choose> > > In Calumet I do get the messages as expected: > "collection : file:/C:/Users/paul/XSD2SCH/msMeta/Additional_w3c.xml" > > XML Calabash however throws the error > > SystemID: C:\Users\Paul\XSD2SCH\MSXSD2SCH.xpl > Engine name: Calabash XProc > Severity: error > Description: XS0044 : Unexpected step name: emx:message It is a static > error if any element in the XProc namespace or any step has element > children other than those specified for it by this specification. In > particular, the presence of atomic steps for which there is no visible > declaration may raise this error. > URL: http://www.w3.org/TR/xproc/#err.S0044 > > Something in my code or something to report on the Calabash issue list? > >
Received on Tuesday, 3 August 2010 14:14:44 UTC