W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2008

[Bug 5978] New: [FS] text adjustment of non-mixed complex types

From: <bugzilla@wiggum.w3.org>
Date: Thu, 21 Aug 2008 10:20:56 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-5978-523@http.www.w3.org/Bugs/Public/>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5978

           Summary: [FS] text adjustment of non-mixed complex types
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: jmdyck@ibiblio.org
        ReportedBy: tim@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


Consider a document:

<element-only-content>
  <the-only-element/>
</element-only-conent>

validated against a schema which contains a definition of element-only-content
s a complex type containing element-only content.

In the above document, I've deliberately included insignificant whitespace
inside the element-only-content element.

Do these insignificant whitespace nodes exist as text nodes when the document
is read?

>From XQuery 1.0 and XPath 2.0 Data Model (XDM):

"Otherwise, construction from a PSVI is the same as construction from the
Infoset except for the content property. When constructing the content
property, [element content whitespace] is not used to test if whitespace is
collapsed. Instead, if the resulting Text Node consists entirely of whitespace
and the character information items used to construct this node have a parent
and that parent is an element and its {content type} is not “mixed”, then the
content of the Text Node is the zero-length string."

which, if I understand it correctly, means that insignificant whitespace is
represented as text nodes with zero-length string content.

That means that in the above document, element-only-content contains three
nodes: <the-only-element /> and two text nodes.

Now consider the text in FS 8.1.7 Type adjustment

    * if the complex type is mixed, interleaves the type with a sequence of
text nodes and xs:anyAtomicType.

and the rule:

Otherwise, just extend the type by the built-in attributes.

statEnv |-  Type1 extended by BuiltInAttributes is Type2
statEnv |-  Type3 = Type2 & processing-instruction* & comment*
---------------------------------------------------------------
statEnv |-  Type1 adjusts to Type3

This says that the adjusted type of element-only-content does not include text
nodes.  Is this correct?


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 21 August 2008 10:21:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:53 GMT