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

Re: First draft of template note

From: Norman Walsh <ndw@nwalsh.com>
Date: Sun, 07 Nov 2010 13:11:22 -0500
To: public-xml-processing-model-wg@w3.org
Message-ID: <m2iq099f79.fsf@nwalsh.com>
Alex Milowski <alex@milowski.org> writes:

> Although possibly less clear, we can remove the pipe binding for the
> source if we re-order the sibling steps:
>
> <p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
>             xmlns:c="http://www.w3.org/ns/xproc-step"
>             name="main" version="1.0">
> <p:option name="username" required="true"/>
> <p:option name="password" required="true"/>
>
> <p:document-template>
>   <p:input port="template">
>     <p:inline>
>       <c:request method="POST" href="{/doc/request/@uri}"
>                  username="{$username}" password="{$password}">
>         { /doc/request/node() }
>       </c:request>
>     </p:inline>
>   </p:input>
>   <p:input port="parameters">
>     <p:pipe step="vars" port="result"/>
>   </p:input>
> </p:document-template>
>
> <p:in-scope-names name="vars"/>
>
> </p:pipeline>

I think that's *A LOT* less clear.

> I wonder if this problem of ordering will arise quite frequently and
> make binding of the source always required.  If we made the parameters
> port the primary port, we could do this:
>
> <p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
>             xmlns:c="http://www.w3.org/ns/xproc-step"
>             name="main" version="1.0">
> <p:option name="username" required="true"/>
> <p:option name="password" required="true"/>
>
> <p:in-scope-names name="vars"/>
>
> <p:document-template>
>   <p:input port="template">
>     <p:inline>
>       <c:request method="POST" href="{/doc/request/@uri}"
>                  username="{$username}" password="{$password}">
>         { /doc/request/node() }
>       </c:request>
>     </p:inline>
>   </p:input>
>   <p:input port="source">
>     <p:pipe step="main" port="source"/>
>   </p:input>
> </p:document-template>

No, I don't think we could. I think that the primary nature of a
parameter input port is independent of the primary nature of a normal
input port.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
www.marklogic.com

Received on Sunday, 7 November 2010 18:11:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 7 November 2010 18:11:57 GMT