whitespace after validation

Bug #866386 reported by Vinayak R. Borkar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Matthias Brantner

Bug Description

SchemaImport/FLWORExprSI/ForExprType038
SchemaImport/FLWORExprSI/ForExprType039

Tags: schema
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

The title is not correct anymore. There is quite a tricky bug in the two tests now. Other people also ran into that problem (see http://www.w3.org/Bugs/Public/show_bug.cgi?id=5534).

Our result:
<InterleaveType xmlns="http://typedecl">
<integer>10</integer>
<decimal>20</decimal>
</InterleaveType>

Expected Result:
<InterleaveType xmlns="http://typedecl"><integer>10</integer><decimal>20</decimal></InterleaveType>

The whitespaces should have been stripped when reading the input document during schema
validation, because InterleaveType has element-only content.

Revision history for this message
Cezar Andrei (cezar-andrei) wrote :

XQ XP Datamodel Spec: http://www.w3.org/TR/xpath-datamodel/ is probably what we're looking for:

6.7.4 Construction from a PSVI

For Text Nodes constructed from the [schema normalized value] of elements, content contains the value of the [schema normalized value].

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.

Revision history for this message
Cezar Andrei (cezar-andrei) wrote :

Fixed with rev 7719. Tests are passing.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.