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 1618 - the formal type notation for element is ambiguous
Summary: the formal type notation for element is ambiguous
Status: CLOSED FIXED
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 01:07 UTC by Fred Zemke
Modified: 2005-09-27 08:41 UTC (History)
0 users

See Also:


Attachments

Description Fred Zemke 2005-07-15 01:07:52 UTC
2.4.2 Item types
The following formal type notation is ambiguous: 
"element nillable of type foo:bar".  Is this an element whose
name is nillable and type is foo:bar (and not nillable), or 
is this an element of unspecified name whose type is foo:bar
and nillable?  One easy way to fix this would be to move the
keyword "nillable" to a context where it cannot be mistaken for
a name, for example, following TypeReference rather than 
preceding it.  Thus rule [34 (Formal)] would be
TypeSpecifier ::= TypeReference Nillable?
Another way to fix it would be to say that ElementName must be
quoted, ie, change rule [9 (Formal)] to
ElementName ::= '"' QName '"'
Or, following my suggestion that the grammar should have
no defaults, make the element name mandatory (either a 
QName or an asterisk, say).
Comment 1 Jerome Simeon 2005-07-20 21:58:48 UTC
That is a good catch.

We used to use an asterisk, so that might be the more natural
choice:

element * of type TypeName           (: a wildcard element :)
element * nillable of type TypeName  (: a nillable wildcard element :)
element nillable of type TypeName    (: an element with name 'nillable' :)
element nillable nillable of type TypeName (: a nillable element with name
'nillable :)

- Jerome
Comment 2 Don Chamberlin 2005-07-22 16:59:58 UTC
Fred,
On July 22, 2005, the Query Working Group decided to resolve this comment by 
accepting Jerome's proposal to use an asterisk as a "wild card" for an element 
name. Since this was one of your suggested solutions, we assume that you will 
find this resolution acceptable. If you have any further input on this issue, 
you may reopen the comment.
Regards,
Don Chamberlin