Pipeline for 5.18

This pipeline accepts a "uri" document on the source port, uses that URI
to construct a (brain-dead simple) query against a database, runs that
query, and styles the result.

<p:declare-step name="main" version="1.0"
                xmlns:c="http://www.w3.org/ns/xproc-step"
                xmlns:ml="http://xmlcalabash.com/ns/extensions/marklogic"
                xmlns:p="http://www.w3.org/ns/xproc">
<p:input port="source">
  <p:inline>
    <uri>/2003/08/20/fungus</uri>
  </p:inline>
</p:input>
<p:output port="result"/>
<p:input port="parameters" kind="parameter"/>

<p:declare-step type="ml:adhoc-query">
   <p:input port="source"/>
   <p:input port="parameters" kind="parameter"/>
   <p:output port="result" sequence="true"/>
   <p:option name="host"/>
   <p:option name="port"/>
   <p:option name="user"/>
   <p:option name="password"/>
   <p:option name="content-base"/>
   <p:option name="wrapper"/>
</p:declare-step>

<p:template>
  <p:input port="template">
    <p:inline>
      <c:xquery>
        doc("/production{string(/uri)}.xml")
      </c:xquery>
    </p:inline>
  </p:input>
  <p:input port="source">
    <p:pipe step="main" port="source"/>
  </p:input>
</p:template>

<ml:adhoc-query host="localhost" port="8404" user="admin" password="password"/>

<p:xslt>
  <p:input port="stylesheet">
    <p:document href="essay.xsl"/>
  </p:input>
</p:xslt>

</p:declare-step>


                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 413 624 6676
www.marklogic.com

Received on Thursday, 26 April 2012 13:21:27 UTC