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

Re: Component interfaces

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Thu, 12 Jan 2006 10:35:02 -0500
To: public-xml-processing-model-wg@w3.org
Message-ID: <8764optq6x.fsf@nwalsh.com>
/ Alessandro Vernet <avernet@orbeon.com> was heard to say:
| 1) Should inputs/outputs be passed by position only (e.g. just one
| sequence), by name only, or by a combination of both?
|
| My take - If we draw a parallel between components and functions in
| most programming languages, function inputs (called parameters), in
| general have names. And I think this is a good practice. Instead of
| having the XSLT component take a sequence of 2 documents, where the
| first one is the stylesheet and the second one is the data on which
| the stylesheet should be applied, I prefer to the XSLT component to
| have two named inputs: "stylesheet" and "dataToTransform", each one
| possibly validated with a schema.

I prefer named parameters as well, but if we want to allow components
to be chained together, I think we have to allow for the possibility
that inputs won't be named.

We have a model for "positional parameters": a sequence of nodes.
We don't have a model for a map or hash of parameters and I'm loathe
to invent it if we can avoid it.

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM / XML Standards Architect / Sun Microsystems, Inc.
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Received on Thursday, 12 January 2006 15:35:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:46 GMT