W3C home > Mailing lists > Public > xproc-dev@w3.org > September 2009

Re: XS0012: Unknown error from Calabash

From: Hendrik Wermser <hendrik.wermser@googlemail.com>
Date: Thu, 24 Sep 2009 19:35:29 +0200
Cc: "xproc-dev@w3.org" <xproc-dev@w3.org>
Message-Id: <A4F10892-8D61-4492-AE29-44E940DD454D@googlemail.com>
To: Philip Fennell <Philip.Fennell@marklogic.com>
Hi Philip,

I don't know about the error and why it is one that isn't listed on  
the candidate recommendation, but  <p:document href="queries/ 
config2xml.xqy"/> won't work unless you wrap the query inside an  
<c:query> element because XQuery is not valid xml. Use <p:data>  
instead and be sure to give content-type="text/plain" just like with  
the properties file.

Hope that resolves the issue.

Regards

Hendrik


Am 24.09.2009 um 17:36 schrieb Philip Fennell:

> 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 Tuesday, 29 September 2009 14:59:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 29 September 2009 14:59:11 GMT