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 28699 - Editorial: Unary lookup examples assume arrays without saying so
Summary: Editorial: Unary lookup examples assume arrays without saying so
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 minor
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-26 15:02 UTC by Priscilla Walmsley
Modified: 2015-07-16 15:46 UTC (History)
2 users (show)

See Also:


Attachments

Description Priscilla Walmsley 2015-05-26 15:02:26 UTC
In the examples of the Unary operator, it says:


   let $x:= <node i="3"/> return ?($x/@i) does not raise a type error because the attribute is untyped.

   But let $x:= <node i="3"/> return ?($x/@i+1) does raise a type error because the + operator with an untyped operand returns a double.


This would only be true if the context item is an array, right?  It seems it could be appropriate for a map. 


Likewise for the example that says:

   ?(3.5) raises a type error because the parameter must be an integer.

Perhaps it should say:

   ?(3.5) raises a type error if the context item is an array because the parameter must be an integer.
Comment 1 Jonathan Robie 2015-06-09 16:21:35 UTC
You're right.  I will fix that.