- From: <Toman_Vojtech@emc.com>
- Date: Fri, 25 Sep 2009 03:12:50 -0400
- To: <xproc-dev@w3.org>
Hi Philip, You are right, err:XS0012 does not exist anymore. It used to be used in the older drafts of the specification: err:XS0012: It is a static error if the port given does not match the name of an input port specified in the step's declaration. My guess is that you get this error because of this: <p:xquery> <p:input/> <--- p:input with no port <p:input port="query"> ... You can't have a p:input without the @port attribute. If you want the p:xquery step to use the input of the main pipeline as the XQuery context item, you can either do: <p:xquery> <p:input port="source"> <p:pipe step="config2xml" port="source"/> </p:input> <p:input port="query"> ... or you can simply leave out the binding for the "source" input completely (because it is a primary input port on p:xquery, it will get connected to the input of the main pipeline automatically): <p:xquery> <p:input port="query"> ... -- And yes, Hendrik is right that you will have to either wrap your XQuery document in the c:query wrapper, or use p:data instead of p:document. Regards, Vojtech > -----Original Message----- > From: xproc-dev-request@w3.org > [mailto:xproc-dev-request@w3.org] On Behalf Of Philip Fennell > Sent: Thursday, September 24, 2009 5:36 PM > To: xproc-dev@w3.org > Subject: XS0012: Unknown error from Calabash > > When running this simple pipeline (see below) that pulls in a > text file and uses an XQuery to convert it to XML I got the > following message from Calabash: > > Error : Pipeline failed: err:XS0012: null Unknown error > > What's error XS0012? It is not listed in the Candidate Recommendation. > > > I used this pipeline: > > <?xml version="1.0" encoding="UTF-8"?> > <p:declare-step > xmlns:c="http://www.w3.org/ns/xproc-step" > xmlns:cx="http://xmlcalabash.com/ns/extensions" > xmlns:p="http://www.w3.org/ns/xproc" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xml:base="../" > exclude-inline-prefixes="xsi" > name="config2xml"> > > <p:input port="source"> > <p:data href="configs/config.properties" > content-type="text/plain"/> > </p:input> > <p:output port="result"/> > > <p:xquery> > <p:input/> > <p:input port="query"> > <p:document href="queries/config2xml.xqy"/> > </p:input> > <p:input port="parameters"> > <p:empty/> > </p:input> > <p:output/> > </p:xquery> > </p:declare-step> > > > On this input source: > > INPUT_PATH=data > INPUT_STRIP_PREFIX= > ID_NAME=#FILENAME > USE_FILENAME_COLLECTION=false > INPUT_ENCODING=UTF-8 > OUTPUT_COLLECTIONS= > THREADS=1 > CONNECTION_STRING=xcc://admin:admin@127.0.0.1:8008 > > > With this Query: > > xquery version "1.0" encoding "utf-8"; > > declare namespace c = "http://www.w3.org/ns/xproc-step"; > > <config> > {for $line in fn:tokenize(/c:data/text(), '\n') > return > element {fn:lower-case(fn:substring-before($line, > '='))} {fn:substring-after($line, '=')} > } > </config> > > > > Philip Fennell > Consultant, Information & Media > Mark Logic > Philip.Fennell@marklogic.com > www.marklogic.com > > > >
Received on Friday, 25 September 2009 07:23:19 UTC