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 3677 - [SCD] Numeric predicates confusing
Summary: [SCD] Numeric predicates confusing
Status: RESOLVED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: SCDS: XML Schema Component Designators (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Mary Holstege
QA Contact: XML Schema comments list
URL: http://lists.w3.org/Archives/Member/w...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-08 14:56 UTC by Mary Holstege
Modified: 2009-02-06 17:41 UTC (History)
0 users

See Also:


Attachments

Description Mary Holstege 2006-09-08 14:56:20 UTC
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.
Comment 1 Mary Holstege 2006-09-22 16:58:59 UTC
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.
Comment 2 Mary Holstege 2009-02-06 17:41:03 UTC
Fixed in Last Call draft http://www.w3.org/TR/2008/WD-xmlschema-ref-20081117/