Re: XS0012: Unknown error from Calabash

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 UTC