- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Wed, 07 Jun 2006 11:02:57 +0100
- To: public-xml-processing-model-wg@w3.org
Hi Erik,
Erik Bruchez wrote:
> Jeni Tennison wrote:
> > I think there are two separate questions here:
> >
> > 1. Can components return as an output the same (unmodified) document
> > that it receives as input, or must it always copy any documents it
> > receives? It might be more efficient for implementations if
> > components like 'filter', 'union' and 'identity' didn't have to
> > create copies.
>
> I think this is an implementation detail.
>
> If not, what is the visible difference between copying and not
> copying?
Well, if you have:
<p:step name="tee">
<p:input href="a.xml" />
<p:output name="out1" label="out1" />
<p:output name="out2" label="out2" />
</p:step>
and then you do something along the lines of:
<p:when test="count($out1 | $out2) = 1">
...
</p:when>
then if out1 and out2 are *copies*, the test will fail (because the
documents don't have the same identity), whereas if they are
*references* to the same document then the test will succeed.
I think we should have copy semantics, such that the outputs of
components must be documents with new document identities. Efficient
implementations will work out a way of not actually copying entire
documents when they don't need to.
> > 2. Can a document sequence contain the same document twice?
>
> This can only be answered if you answer the following question: what
> is "the same document".
I mean can they have the same identity: in implementation terms, the
same object in memory.
Cheers,
Jeni
--
Jeni Tennison
http://www.jenitennison.com
Received on Wednesday, 7 June 2006 10:36:45 UTC