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 3641 - xs:untypedAtomic promotable to *any* type?
Summary: xs:untypedAtomic promotable to *any* type?
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Jerome Simeon
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-30 16:56 UTC by Jens Teubner
Modified: 2007-02-19 21:49 UTC (History)
0 users

See Also:


Attachments

Description Jens Teubner 2006-08-30 16:56:39 UTC
Section 8.5 describes xs:untypedAtomic as promotable to *any* other type. This would render a query like

  declare function foo ($x as node()) { $x/. };

  let $a := <a>foo</a> return
    foo (fn:data ($a))

a type-correct query.  (The application of fn:data() to node $a will yield xs:untypedAtomic.  If this is promotable to any type, it is as well promotable to node(), which, of course, does not make sense here.)

I assume that xs:untypedAtomic was meant to be promotable only to *atomic* types.  So the respective judgment should read


  -------------------------------------------------------------------
   statEnv |-  xdt:untypedAtomic can be promoted to xs:anyAtomicType

The surrounding text should be corrected accordingly.
Comment 1 Jens Teubner 2006-08-30 18:48:12 UTC
Ooops!  That should of course read

                Type <: xs:anyAtomicType
  ------------------------------------------------------
   statEnv |-  xs:untypedAtomic can be promoted to Type

Sorry for the confusion.
Comment 2 Jerome Simeon 2006-09-19 14:33:07 UTC
I believe Jens is right that the rule he suggests to promote xs:untypedAtomic is missing and should be added.
- Jerome
Comment 3 Jerome Simeon 2006-09-26 13:54:38 UTC
Jens,
The XSLT and XML Query Working groups have adopted your proposal and
will make the corresponding changes in the next version of the formal
semantics documents.
Best regards,
- Jerome Simeon
on behalf of the XSLT and XML Query WGs
Comment 4 Jerome Simeon 2006-11-09 22:29:28 UTC
Reviewing changes that occurred in the last few months, I realized there seems to be a collision between the resolution of #3641 and the resolution of #2671. I believe the resolution for #2671 may take precedence, but that will should probably be reviewed again by the working groups.
- Jerome
Comment 5 Jerome Simeon 2006-11-09 22:30:22 UTC
For the record, and as a result of this collision, I am holding back on the corresponding changes for this bug until a final decision is made.
- Jerome
Comment 6 Jerome Simeon 2007-01-29 22:02:46 UTC
Jens,
The WGs reviewed that comment one more time, and decided the resolution for bug #2671 should take precedence, hence not adding the rule you suggest as it is dealt with by another operation in the FS document.
Regards,
- Jerome Simeon
On Behalf of the XSLT and XML Query working groups