W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > April 2012

Re: Type of documents flowing through ports

From: David Lee <dlee@calldei.com>
Date: Thu, 26 Apr 2012 02:57:47 +0000
To: Florent Georges <fgeorges@fgeorges.org>
CC: XProc Comments <public-xml-processing-model-comments@w3.org>
Message-ID: <D680A8E8-0D5B-4ED8-AAEA-4584049A47D9@calldei.com>
Interesting .    I wonder how I could apply that to xmlsh pipelines and functions ...
Although it borders on verbosity .. It is the "xquery way" so must be good.

Sent from my iPad (excuse the terseness) 
David A Lee

On Apr 25, 2012, at 5:42 PM, "Florent Georges" <fgeorges@fgeorges.org> wrote:

>  Hi,
>  I am not sure this has been notice yet for next version of XProc,
> but a lot of times, when I write steps aimed to be reused all accross
> the application (or as part of a library, so even more generic), I'd
> like to say that an input is optional.  Even no port at all has to be
> connected to in input or an output of my step (even though I'd like it
> to be primary for convenience...)
>  I such cases, I would like to make the connection optional.  An
> attribute optional="true" (or required="false" to be consistent with
> what already exists) would be very handy.
>  An pushing the concept a bit further, I think that being able to
> state the type of the document would help in a lot of cases to catch
> errors earlier.  Something like the XSLT "as" attribute (with
> occurrence constraints also allowed, like '?', '*' and '+'):
>    <p:input port="source" as="document-node(db:article)"/>
>  Without requiring validation, which requires more investment, like
> writing schemas, even for "being built so not entirely valid docs",
> this would catch the kind of errors when an unexpected document flows
> through an unexpected port...
>  What do you think?
>  Regards,
> -- 
> Florent Georges
> http://fgeorges.org/
> http://h2oconsulting.be/
Received on Thursday, 26 April 2012 02:58:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:28:28 UTC