Bug / Issue Tracking Service
Bugzilla – Bug 8229
Frag: XPath Level 1's treatment of unqualified element names is dangerous
Last modified: 2010-03-17 11:31:02 UTC
The description of the XPath Level 1 expression language contains the following: "NOTE: If the element name is unqualified, i.e. appears without a namespace prefix, then the element name MUST be matched against a matching element name in the resource document, regardless of namespace bindings that are in effect, including default bindings. This allows implementations to simply match element names in the majority of cases. If namespace bindings are significant for all elements, then qualified names MUST be used." Oracle review comment: "this is asking for so much trouble. what if 2 elements in different namespaces have the same local name? haven't we learned anything from the failure that dos/windows case-insensitivity is?" It's unclear whether the "If namespace bindings are significant . . ." sentence applies to this case. In any case, requiring the client to know whether or not there are multiple elements in different namespaces with the same local name *before* they construct their expression creates a tighter coupling between the client and the exact resource representation than we seem to have in mind.
resolved by striking the note