This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Originally raised in http://lists.w3.org/Archives/Member/w3c-xml-schema-wg/2006Aug/0016.html by Kohsuke Kawaguchi <Kohsuke.Kawaguchi@Sun.COM> - I'm confused with predicate. For example, when I read "4.2.3 element declaration", it says "prefix:name[n] where the [n] will be absent if the {scope} of the element declaration is global and may be absent if the value of n is 1" That seems to imply that if I write: "/~my:type//my:element", then this is treated identical as "/~my:type//my:element[1]", thus it would actually only match the first such element declaration below, and not both of them. <complexType name="type"> <sequence> <!-- two elements of the same name --> <element name="element" ... /> <element name="element" ... /> This goes against my intuition. Also, while it's reasonable to assume that the predicate is 1-origin after spending some time with this spec, I failed to find the explicit statement about whether predicate is 0-origin or 1-origin.
This is broken all right. The intention was to not make people write [1] when there was only one, but it is not stated correctly.
Fixed in Last Call draft http://www.w3.org/TR/2008/WD-xmlschema-ref-20081117/