W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > March 2007

Extension element

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Thu, 22 Mar 2007 15:58:44 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <878xdpoxsb.fsf@nwalsh.com>
Murray asked for a pipeline that used an extension element for
something other than documentation.

Suppose I have a set of extension steps that can access some
proprietary database or server or something. In order to do that,
they need login credentials. Instead of requiring the author to
pass those credentials to every step, I adopt the convention
that the default credentials will come from an element with the
name <ex:credentials> in the pipeline:

<p:pipeline name="pipeline" xmlns:p="http://www.w3.org/2007/03/xproc"
<p:input port="stylesheet"/>
<p:output port="result"/>


<p:declare-step type="ex:read-database" ex:class="org.example.java.Class">
  <p:output port="result" sequence="no"/>

<ex:read-database name="dbread">
  <p:option name="database" value="userlist"/>

<p:xinclude name="xinc">
  <p:input port="source">
    <p:pipe step="dbread" port="result"/>

<p:validate name="valid">
  <p:input port="schema">
    <p:document href="http://example.com/path/to/schema.xsd"/>

<p:xslt name="xform">
  <p:input port="stylesheet">
    <p:pipe step="pipeline" port="stylesheet"/>


This example is a little silly because it always uses an extension
step, but suppose I'd been a little more clever and put it in choose.

                                        Be seeing you,

Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Thursday, 22 March 2007 19:59:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:42 UTC