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 1262 - Typed value of empty element constructor:
Summary: Typed value of empty element constructor:
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Don Chamberlin
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-20 13:59 UTC by Jonathan Robie
Modified: 2005-05-04 23:43 UTC (History)
0 users

See Also:


Attachments

Description Jonathan Robie 2005-04-20 13:59:14 UTC
What is the typed value of an empty element constructor? What does
count(data(<e/>)) return?

<e/> is a direct element constructor. The rules that define the typed value and
string value for a direct element constructor are described in 3.7.1.3 Content,
5h and 5i. Although the data model explicitly says that for data model
construction, an empty element's string value is an empty string, this parallel
part of the XQuery spec does not.

We need to make this case explicit in the XQuery spec.
Comment 1 Jonathan Robie 2005-04-20 14:00:57 UTC
This is the change I suggest:

5.h. The string-value property is equal to the concatenated contents
of the text-node descendants in document order. <add>If there are no
text-node descendants, the string-value property is an empty
string.</add>
Comment 2 Don Chamberlin 2005-05-04 23:43:09 UTC
Jonathan,
Thanks for your comment. It has been accepted and implemented. With your 
concurrence, this comment is now closed.