- From: Alex Miłowski <alex@milowski.com>
- Date: Fri, 15 Apr 2016 10:52:03 -0700
- To: XProc WG <public-xml-processing-model-wg@w3.org>
On Fri, Apr 15, 2016 at 9:53 AM, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:
> Alex Miłowski writes:
>
>> 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()
>> ≫ $result
>
> I can't make sense of the above, I suspect precisely because of "we have
> three kinds [of uses of ordered lists]".
>
> So, please annotate the []s in the above example with PSE, PD and PB and
> send it again!
>
It could also be because of the inlined flow. They may nor may not be
more readable (as will all closure mechanisms).
$source → [$in] λ() [$out] { ... } →
[source=$out,stylesheet="stylesheet.xsl"] → xslt() ≫ $result
^PSE → ^PD λ() ^PD {} → ^PSE → xslt() ≫ ^PB
Does that help?
Feel free to suggest alternatives.
I was trying to mimic:
declare function x(...) as document() { ... };
but we have output ports as return values, options as function
parameters, and inputs from the current readable ports that need to be
declared.
--
--Alex Miłowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."
Bertrand Russell in a footnote of Principles of Mathematics
Received on Friday, 15 April 2016 17:52:32 UTC