This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2682 - Whitespace text nodes stripped from source document
Summary: Whitespace text nodes stripped from source document
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.4
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Carmelo Montanez
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-09 10:01 UTC by Michael Kay
Modified: 2006-06-22 12:59 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2006-01-09 10:01:34 UTC
Test Parenexpr-19 should simply return a copy of the input document. In fact,
however, it returns a copy of the input document with whitespace text nodes removed.

I think there are many other tests suffering from the same problem. At present I
handle this using a comparator that ignores whitespace text nodes in the result
(with a comment that this has been done). At the very least, I think results
should be published with and without whitespace stripping, or the catalog should
say whether whitespace stripping on the source document is required. In fact,
however, I think that according to the data model spec, whitespace stripping in
this case is incorrect if the standard "construction from an InfoSet" is used.
In the mapping from the InfoSet, whitespace text nodes are discarded only if the
[element content whitespace] property is true, and this will only be the case if
there is a DTD.

Other tests showing this problem (in most cases I only did careful checking of
the first one in each group; the others are listed because they displayed the
same symptoms):

Axes085
NodeTest003/4/5
unabbreviatedSyntax-4/5/8/10/11/12/13/20/21/22/24/25/26/28/29/30/31
abbreviatedSyntax-2/3/5/6/14/16/17/18/19/20/21/24
filterexpressionhc1/4/5
fn-union-node-args-002/3/5/7/9/10/11/15/16
fn-intersect-node-args-011/15/16
fn-except-node-args-003/017
ForExpr005
WhereExpr004
ReturnExpr004
orderDecl-4/5/6/7/21/22
extexpr-6
position-1/3/4/5/6/7/8/9/10/13-18/20-22
last-1/3/4/5/8/9/10/13-18/20-22
ancestor-11/12/13
ancestorself-11/12/13

Michael Kay
Comment 1 Michael Kay 2006-01-09 14:47:12 UTC
Also affects

ForExprType038/039
Comment 2 Carmelo Montanez 2006-01-23 20:09:43 UTC
Michael et all:

There may be other tests that are affected by this.  I will try and find a way
to automate findig those tests.  For the time I corrected all the identified
ones from the NIST side.  Assigning the bug to ravindranath as this
affects some of his tests as well.

Thanks,
Carmelo
Comment 3 Michael Kay 2006-01-23 21:14:19 UTC
There was actually a certain amount of automation in the way I produced the
list: if my test driver finds a discrepancy, it tests to see if the discrepancy
is in whitespace text nodes only, and if so, it tries running the test again
with whitespace stripping applied to the source document. However, as I
mentioned, it also involved some manual checking and I did this only for a
couple of tests in each group.
Comment 4 Ravindranath (Ravi) Chennoju 2006-02-11 00:13:12 UTC
Fixed following test output:
fn-union-node-args-002/3
fn-intersect-node-args-011
fn-except-node-args-003/017

Did not find any white space problems with the following:
fn-union-node-args-5/7/9/10/11/15/16
fn-intersect-node-args-015/16
fn-except-node-args-017
Comment 5 Ravindranath (Ravi) Chennoju 2006-02-11 00:14:34 UTC
Closed by mistake. Reopening and assigning to Andrew.
Comment 6 Carmelo Montanez 2006-02-16 14:39:53 UTC
All:

All issues pertaining this particular bug seems fixed.  I will go ahead and 
close it fixed for the sake of time.

Thanks,
Carmelo
Comment 7 Carmelo Montanez 2006-02-16 20:13:11 UTC
Some test cases are still not fixed.  I will take a look a this once more.

Carmelo
Comment 8 Andrew Eisenberg 2006-03-09 20:08:18 UTC
We believe that all are done but the following:

ForExpr005
WhereExpr004
ReturnExpr004
orderDecl-4/5/6/7/21/22
Comment 9 Carmelo Montanez 2006-04-05 16:53:34 UTC
Michael:

Thanks.  Corrected all the missing whitespaces.  Please close bug when able to verify.

Thanks,
Carmelo
Comment 10 Jinghao Liu 2006-04-07 00:26:07 UTC
All;

For ForExpr005, we should NOT have get whitespace text node in front of <Deny>.  The expect result should be:
===============
<Deny>
							<security>
								<right>Read</right>
							</security>
							<user>system\Toshiko</user>
						</Deny>

instead of 
===============
						<Deny>
							<security>
								<right>Read</right>
							</security>
							<user>system\Toshiko</user>
						</Deny>

Thanks
Jinghao

> Michael:
> Thanks.  Corrected all the missing whitespaces.  Please close bug when able to
> verify.
> Thanks,
> Carmelo

Comment 11 Carmelo Montanez 2006-04-07 19:08:26 UTC
Mike et all:

Looks like this was all taken care of.  I am marking the bug as fix.

Thanks,
Carmelo