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 5199 - Restrict scope of xs:alternative xpath expressions
Summary: Restrict scope of xs:alternative xpath expressions
Status: CLOSED INVALID
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-15 17:16 UTC by Pete Cordell
Modified: 2007-10-16 16:25 UTC (History)
0 users

See Also:


Attachments

Description Pete Cordell 2007-10-15 17:16:47 UTC
As currently drafted, databinding tools (and possibly streaming validating XML processors) will find selecting a type based on the contents of that type (as required by xs:alternative) difficult to implement.  

It is proposed that the xpath expressions in xs:alternative tests only rely on the attributes of an element.
Comment 1 Michael Kay 2007-10-15 17:45:28 UTC
Personal response: I believe that what you are asking for is already the case. See  3.12.4 rules 1 and 2.
Comment 2 Pete Cordell 2007-10-15 19:13:38 UTC
Thanks for pointing that out.  That seems OK.
Comment 3 Noah Mendelsohn 2007-10-16 16:25:41 UTC
Pete Cordell writes:

> It is proposed that the xpath expressions
> in xs:alternative tests only rely on
> the attributes of an element.

Michael Kay writes:

> Personal response: I believe that what
> you are asking for is already the case.
> See  3.12.4 rules 1 and 2.

Pete Cordell writes:

> Thanks for pointing that out.  That seems
> OK.

Pete:  this is actually a very useful comment.  Making the decision on how to restrict the XPath expressions, and indeed whether to limit them at all, was very controversial in the workgroup.   Getting feedback from users that having them unrestricted would have been a problem, and that you are pleased with the design as proposed, is in fact particularly useful.  Thank you!

Noah