W3C home > Mailing lists > Public > xproc-dev@w3.org > May 2009

Re: Calabash error with p:unwrap? Unwrapping the input's root element doesn't generate an error

From: Florent Georges <fgeorges@fgeorges.org>
Date: Sun, 10 May 2009 14:52:47 +0200
Message-ID: <ebaca5bf0905100552w152068ces6b83e68abd6a487b@mail.gmail.com>
To: "Costello, Roger L." <costello@mitre.org>
Cc: "xproc-dev@w3.org" <xproc-dev@w3.org>
2009/5/9 Costello, Roger L. wrote:

  Hi,

>    This step produces a single document;
>    if the document element is unwrapped,
>    the result might not be well-formed XML.

  If I am right, this sentence is because the result can
contain several elements, PIs and even text nodes.  That does
not match the definition of a well-formed XML document.  But
that matches the definition of a well-formed external parsed
entity <http://www.w3.org/TR/REC-xml/#wf-entities> if I am
right:

    [78]  extParsedEnt  ::=  TextDecl? content

  Maybe it would be worth adding this precision to the spec?

  BTW, that correspond to the definition of document node in
XDM <http://www.w3.org/TR/xpath-datamodel/#DocumentNode>.  I
am surprised to see that XProc bases its datamodel directly on
Infoset instead of using the higher level abstraction defined
in XDM (based itself on Infoset, oriented to XML processing
tools.)  Is there any particular reason behind that decision?

  As the spec says:

    This step produces a single document; [...] the result
    might not be well-formed XML.

and a document is defined as a well-formed document as defined
in Infoset, the processor should throw an error in order to be
conformant if I am right.

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/
Received on Sunday, 10 May 2009 12:53:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 10 May 2009 12:53:28 GMT