[Bug 28448] New: dm:map-contains and timezones

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28448

            Bug ID: 28448
           Summary: dm:map-contains and timezones
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Data Model 3.1
          Assignee: ndw@nwalsh.com
          Reporter: josh.spiegel@oracle.com
        QA Contact: public-qt-comments@w3.org

Currently a map cannot contain among its keys both date/time values with a
timezone and date/time values without a timezone.  This rule is stated in FNO,
XQuery, and XDM.  But I don't think the definition dm:map-get specifies what
should happen if the $map argument contains keys without a timezone but the
$item argument has a timezone.  

Consider this query:

  let $without_tz := xs:dateTime('2015-04-08T01:30:00') 
  let $with_tz := adjust-dateTime-to-timezone($without_tz, implicit-timezone())
  return (
     $without_tz eq $with_tz,
     map:get(
       map{ $without_tz : 1 }, 
       $with_tz
     )
  )

I think this evaluates to (true, 1).  map:get finds an entry within the map
that has the same key value (based on fn:deep-equals).  That is, the values are
normalized using the implicit timezone on the dynamic context.  

However, I don't see how dm:map-get can behave this way since there is no
implicit timezone.  Should it raise an error or return the empty sequence?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 8 April 2015 20:42:22 UTC