- From: Norman Walsh <ndw@nwalsh.com>
- Date: Fri, 15 Apr 2016 12:10:17 -0500
- To: public-xml-processing-model-wg@w3.org
- Message-ID: <8737qmajd2.fsf@nwalsh.com>
Alex Miłowski <alex@milowski.com> writes:
> On a different topic, I was thinking that we need to treat inputs and
> outputs separately in the syntax when we declare flows and/or steps
> (they might just be the same thing and one is just a black box
> implementation).
>
> declare flow
> [$in as document()] myfilter($mode as xs:QName, $params as map())
> [$out as document()]
To my eyes, the use of [] both before and after the “function
signature” is very cluttered. I was trying to put them all in a single
[]; I simply used a “;” to separate inputs from outputs, though I
concede that’s going to lead to weirdness when there are only outputs:
[;$out].
> and so we get:
>
> xproc version = "2.0";
> inputs $source as document-node();
> outputs $result as document-node();
>
> [$source] → [$in] λ() [$out] { if (xs:decimal($in/*/@version) < 2.0)
> then [$in,"v1schema.xsd"] →
> validate-with-xml-schema() ≫ $out
> else [$in,"v2schema.xsd"] →
> validate-with-xml-schema() ≫ $out }
> → [$out,"stylesheet.xsl"] → xslt()
Per the previous message:
→ [port('out'),"stylesheet.xsl"] → xslt()
or
→ [@out,"stylesheet.xsl"] → xslt()
I think.
Be seeing you,
norm
--
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 512 761 6676
www.marklogic.com
Received on Friday, 15 April 2016 17:10:43 UTC