- From: Philip Fennell <Philip.Fennell@marklogic.com>
 - Date: Thu, 24 Sep 2009 08:36:14 -0700
 - To: "xproc-dev@w3.org" <xproc-dev@w3.org>
 
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 Thursday, 24 September 2009 15:33:28 UTC