[FS] overlap in Formal and Core symbols

XQuery 1.0 and XPath 2.0 Formal Semantics
W3C Working Draft 20 February 2004

The Formal grammar and the Core grammar both define the following
non-terminals:
    AttributeName
    ElementName
    ItemType
    TypeName

Because the inference rules use symbols from both the Formal and Core
languages, this would seem to cause an ambiguity. Now, it's true that
the Formal and Core definitions of AttributeName are the same (both
simply derive QName). Similarly for ElementName. And it's also true that
ItemType doesn't occur in the inference rules (though are you certain it
won't in a future draft?). But TypeName has different Formal and Core
definitions (Formal allows AnonymousTypeNames, Core doesn't), and it
does occur in the inference rules, so I think there is an ambiguity
there. But regardless of whether there is or isn't a formal ambiguity,
there's presumably the opportunity for confusion, which could be removed
simply by renaming some symbols.

(Note that, in addition to the above symbols, the Formal and *XQuery*
languages also both define AttributeValue. However, because the
appearance of XQuery constructs in inference rules is fairly limited, I
suppose an ambiguity does not arise. But again, it would reduce the
chance of confusion if you renamed one of them.)

-Michael Dyck

Received on Wednesday, 21 April 2004 16:35:12 UTC