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 4264 - K2-ComputeConAttr-5 vs. K2-ComputeConAttr-35
Summary: K2-ComputeConAttr-5 vs. K2-ComputeConAttr-35
Status: CLOSED INVALID
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-19 12:04 UTC by Tim Mills
Modified: 2007-01-19 12:34 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2007-01-19 12:04:16 UTC
When in boundary space mode "strip", can the expected result both of these tests be correct?

If empty CDATA sections generate an empty sequence, then no content appears before the computed attribute and neither test should throw XQTY0024.

If empty CDATA sections generate an empty text node, then both tests should throw XQTY0024.

(:*******************************************************:)
(: Test: K2-ComputeConAttr-35                            :)
(: Written by: Frans Englich                             :)
(: Date: 2007-01-15T15:15:44+01:00                       :)
(: Purpose: Empty CDATA sections generate no text nodes. :)
(:*******************************************************:)
<elem><![CDATA[]]>{attribute name {"content"}}<alem/>
</elem>

(:*******************************************************:)
(: Test: K2-ComputeConAttr-5                             :)
(: Written by: Frans Englich                             :)
(: Date: 2007-01-15T15:15:44+01:00                       :)
(: Purpose: Ensure XQTY0024 is issued when content appears before computed attri
butes. :)
(:*******************************************************:)
<elem>
                <![CDATA[]]>
                {attribute name {"content"}}
</elem>
Comment 1 Michael Kay 2007-01-19 12:29:47 UTC
The empty CDATA section is a lexical notation for a sequence of zero characters within the element content. It's the same as writing nothing at all, except that the rules for determining boundary whitespace are determined before expansion of entity references and CDATA sections. For better or for worse, the definition is:

Boundary whitespace is a sequence of consecutive whitespace characters within the content of a direct element constructor, that is delimited at each end either by the start or end of the content, or by a DirectConstructor, or by an EnclosedExpr

and in K2-ComputeConAttr-5, the whitespace characters are not boundary whitespace because they are delimited at one end by a CDATA section, which is neither a DirectConstructor nor an EnclosedExpr.
Comment 2 Tim Mills 2007-01-19 12:34:09 UTC
Thanks.