Re: What do an empty document mean ?

On 5/5/07, Norman Walsh <ndw@nwalsh.com> wrote:
>
> / Innovimax SARL <innovimax@gmail.com> was heard to say:
> | Dear,
> |
> | There is many places where an "empty document" can appear....but what
> | does it mean and what are the use case
> |
> | 1) by construct
> | 2) by deleting all the nodes
> | 3) in a sequence, generate by for-each
> |
> | ?? do I have here a sequence of "empty-document" ??
>
> In each case, it means that any step that reads the port in
> question will receive zero documents.
>
> For each step, I think we need to describe clear semantics for
> receiving zero documents on each of its input ports.
>
> At first glance:
>
> A.1.1 Count [proposed]
>
> Produces a count of 0.
>
> A.1.2 Delete
>
> Produces an empty sequence.


[1] I would say an error, since this component doesn't deliver sequence as
output, unless we say it does output a sequence

A.1.4 Escape Markup
>
> Produces an empty sequence.


Idem [1]

A.1.5 Head
>
> Produces an empty sequence.
>
> A.1.6 Identity
>
> Produces an empty sequence.
>
> A.1.7 Insert
>
> Produces an empty sequence.


I would say it is impossible. Since insert must have a document as input
(non empty), and insert (non empty) document, we should always have a non
empty document as result
More over it doesn't output a sequence


A.1.8 Label Elements
>
> Produces an empty sequence.


Idem [1]

A.1.10 Matching Documents
>
> Produces an empty sequence.
>
> A.1.11 Namespace Rename
>
> Produces an empty sequence.


Idem [1]

A.1.12 Rename
>
> Produces an empty sequence.


Idem [1]

A.1.13 Replace
>
> Produces an empty sequence.


Idem [1]

A.1.14 Set Attributes
>
> Error.


Idem [1] (?? why do you agree only on this one ??)


A.1.15 String Replace
>
> Produces an empty sequence.


Idem [1]

A.1.16 Store
>
> Does nothing or error.


Agreed

A.1.17 Tee [proposed]
>
> Produces an empty sequence.
>
> A.1.18 Tail
>
> Produces an empty sequence.
>
> A.1.19 Unescape Markup
>
> Produces an empty sequence.


Idem [1]

A.1.20 Unwrap
>
> Produces an empty sequence.


Idem [1]

A.1.21 Wrap
>
> Produces <wrapper/> if the match was on the document element, otherwise
> produces an empty sequence.


Idem [1]

A.1.22 XInclude
>
> Produces an empty sequence.


Idem [1]

A.1.23 XSLT
>
> Error.


Agreed (but why  only that one ?)

A.2.1 HTTP Request
>
> Error?
>
> A.2.2 Relax NG Validate
>
> Error.
>
> A.2.3 XML Schema Validate
>
> Error.
>
> A.2.4 XSLT 2.0
>
> Error unless template-name is specified.
>
> A.2.5 XSL Formatter
>
> Error.
>
> A.2.6 XQuery 1.0
>
> Error.
>
>

My position is that sequence="no" is EXACTLY one document (1 and only 1)
sequence="yes" implies 0 or more documents

Mohamed


-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 8 72 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Saturday, 5 May 2007 12:25:47 UTC