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

Re: Component interfaces

From: Rui Lopes <rlopes@di.fc.ul.pt>
Date: Wed, 11 Jan 2006 10:20:53 +0000
Message-ID: <43C4DC05.1030502@di.fc.ul.pt>
To: Norman Walsh <Norman.Walsh@Sun.COM>
CC: public-xml-processing-model-wg@w3.org


Norman Walsh wrote:
> I was struck last week by Alex's observation that in his
> implementation almost everything is a component. Then when I was
> thinking about iteration in reading the thread following Jeni's
> message, and it struck me that we could take the following approach:
> 
> Every component accepts as input a (possibly empty) set of parameters
> and a sequence of nodes. It produces as its result a sequence of
> nodes. Anything with that interface can be a component.
> 
> Then each component must describe what it does with its sequence of
> inputs. Some components, like XInclude or validation, can just perform
> their function on each node of input producing a corresponding node of
> output. 

We must be aware that by having a sequence of nodes, we must identify 
which node is processed by default. While with XInclude this is not 
needed, we do need it in XSLT processing (default document vs. secondary 
documents grabbed through the document() function).


> 
> Note that we can invent several namespaces if we want to, so that
> parameters can be expressed as attributes on the "component element"
> or passed to the component in a document in the "parameters"
> namespace. Similarly, we can (perhaps) reduce errors to "producing an
> output node in the 'error' namespace".

I agree, with a simple remark that maybe it should be useful to specify 
whether a parameter is required or optional.



Cheers,


Rui

Received on Wednesday, 11 January 2006 10:21:52 GMT

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