Re: Component interfaces

On Jan 16, 2006, at 14:08, Erik Bruchez wrote:
> A solution to the "XQuery" debate would then consist in the processing
> model allowing passing arbitrary sequences of *items*, not
> *nodes*. This would put a strong dependency on XDM, of course, but
> would also make the XML processing model very much in sync with XSLT
> 2.0 and XQuery 1.0. You could pass your XQuery document as simply as
> by passing an xs:string.

Right, this has been discussed in another thread. The downside of  
allowing arbitrary DM sequences of atoms is that you now have a  
pipeline language that can do absolutely anything :) A pipeline for  
such a model would only be XML in that it might have some specific  
abilities for dealing with XML data, but it would also be able to  
perform entire complex processes that would never see anything that  
can be serialised as an XML document.

Also what happens if you input a sequence of ints to something that's  
an "old school" XML processor? How do you degrade such a sequence so  
that it can usefully be input into a component that only has a notion  
of nodes?

> > (possibly document nodes containing only a text node child, though
> > that might be bending it too much).
> Ouch. I don't think you will find that such a thing is allowed in any
> W3C spec. In particular:
> 1. In XML 1.1, you find that the document production has exactly one
>    element production [2].
> 2. In the infoset [3], you find that a "document information item"
>    must contain "exactly one element information item".

I didn't say it was a good idea, I was merely pointing out that it  
might be an option (if we want to limit the inputs to be documents),  
though I don't like it. I think that upon closer inspection you'll  
find that there do exist synthetic documents which correspond to this  

   Document doc = domImpl.createDocumentNS(null, null);
   doc.appendChild(doc.createTextNode("All alone!"));

Yes it's rather aberrant, but it exists. You can't serialise this  
into a WF document, but you can have it in memory and pass it around.

> I think the best thing here is to not think in terms of *nodes*, but
> in terms of *items*, as per the XDM [1].

As I've said in another email, I wouldn't want to reject this option  
but it needs to be simple and interoperable with nodes-only  
components. I would suggest that someone (who isn't me :) take an  
action item to detail the impact it would have in various scenarios,  
and perhaps offer a strawman.

Robin Berjon
    Senior Research Scientist

Received on Monday, 16 January 2006 13:57:45 UTC