RE: xquery validation and insignificant whitespace

Personal response:

You'll find the answer here, though it's rather cryptic:

http://www.w3.org/TR/xpath-datamodel/#const-psvi-text

If a processor chooses to use the standard method of constructing an XDM
document from a PSVI (it doesn't have to), then whitespace-only text nodes
in the content of an element with element-only content will be discarded.

Michael Kay
http://www.saxonica.com/
 

> -----Original Message-----
> From: public-qt-comments-request@w3.org 
> [mailto:public-qt-comments-request@w3.org] On Behalf Of Bill Patton
> Sent: 27 August 2007 18:50
> To: public-qt-comments@w3.org
> Subject: xquery validation and insignificant whitespace
> 
> 
> Dear Sirs,
> 
> How should xquery validation handle insignificant whitespace 
> in element-only content?  Should it strip whitespace from the 
> data model returned by validation or preserve it as I think 
> XML schema requires.
> 
> If the whitespace remains in the data model, operators such 
> as "instance of"
> and "typeswitch" will provide surprising results when used 
> with sequence types that don't expect interleaved whitespace.
> 
> The semantics for validation given in the formal semantics 
> document describes interleaved text nodes in mixed content 
> but does not seem to describe interleaved whitespace in 
> element-only content.
> 
> Bill Patton
> Cognetic Systens, Inc.
> (678) 533-4405
> www.cogneticsystems.com
> 
> 

Received on Monday, 27 August 2007 20:24:05 UTC