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 1615 - what types are permitted in document { Type }?
Summary: what types are permitted in document { Type }?
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows 2000
: P2 normal
Target Milestone: ---
Assignee: Jerome Simeon
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-15 00:17 UTC by Fred Zemke
Modified: 2005-09-06 13:01 UTC (History)
0 users

See Also:


Attachments

Description Fred Zemke 2005-07-15 00:17:46 UTC
2.4.2 Item types
Rule [49 (formal)] says 
DocumentType ::= "document" ( "{ Type? "}" )?

Do you really mean Type, or do you mean ElementType?
For example, I toyed with "document {empty}" as a type notation
denoting a document node with no children, or perhaps no 
elements as children.  However, I could not find any rules 
anywhere to define the meaning of this notation.  The closest
appears to be 8.2.3.1.2 "Kind tests", but this only defines the
semantics of normalizing a DocumentTest, and a DocumentTest only
permits an ElementTest as its argument.  I also toyed with
document { element p:o ? }, document { element p:o * }
and document { element p:o + } to mean a document node, all of whose
child elements are of type p:o, with different quantifiers 
specifying the number of occurrences of such child elements.
Another notation I considered was document { text } to mean a 
document node whose only child is a text node.
I could not find rules to specify the semantics of these type
notations either.
Comment 1 Jerome Simeon 2005-07-20 23:53:18 UTC
The data model allows document nodes containing several element nodes, text,
PI's and comments. So the intent is indeed to have document nodes accepting a
general type, with the restriction that there can never be attributes or
document nodes. This would be quite heavy to impose that restriction using the
grammar, but none of the inference rules can result in such a case so I think we
are ok on this.

The comment on the 'meaning of types' is more general and recorded as Bug 1616.

- Jerome
Comment 2 Jerome Simeon 2005-07-22 22:50:51 UTC
The working group believes the comment is addressed by the response in
additional comment #1, and that there is no change required to the document.

- Jerome Simeon
On behalf of the XML Query and XSL WGs