W3C home > Mailing lists > Public > xproc-dev@w3.org > April 2010

Catching parameters passed in

From: Chelsea Valentine <chelseavalentine@gmail.com>
Date: Thu, 15 Apr 2010 10:45:33 -0500
Message-ID: <g2x2b433e041004150845ja56f550eo160604ce756a9123@mail.gmail.com>
To: xproc-dev@w3.org
Hi all,

I am wanting to pass in a parameter and file path/name. The parameter
passed in would identify the file type and a choose statement would
select the correct <when> path based on that parameter value.

What I don't know is how to catch a parameter when it is passed in.
Any help is greatly appreciated.

The basic structure would be:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="myPipeline"
version="1.0">
    <p:input port="source"/>
    <p:output port="result"/>

    <p:choose name="convertToPrepModel">
        <p:when test="[test parameter passed in]">
            <!-- subpipeline //-->
            <p:xslt name="convertToPrepModelTransformation">
                <p:input port="source"/>
                <p:input port="stylesheet">
                    <p:document href="stylesheet.xsl"/>
                </p:input>
                <p:input port="parameters" sequence="true">
                    <p:empty/>
                </p:input>
            </p:xslt>
        </p:when>
        <p:otherwise>
             <p:xslt name="convertToPrepModelTransformation">
                <p:input port="source"/>
                <p:input port="stylesheet">
                    <p:document href="stylesheet.xsl"/>
                </p:input>
                <p:input port="parameters" sequence="true">
                    <p:empty/>
                </p:input>
            </p:xslt>
        </p:otherwise>
    </p:choose>

....
</p:declare-step>
Received on Friday, 16 April 2010 07:28:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 16 April 2010 07:28:32 GMT