<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>17226</bug_id>
          
          <creation_ts>2012-05-28 16:01:43 +0000</creation_ts>
          <short_desc>[QT3TS] CastAs-UnionType-16</short_desc>
          <delta_ts>2015-07-09 15:40:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>josh.spiegel</cc>
    
    <cc>mike</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68227</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-05-28 16:01:43 +0000</bug_when>
    <thetext>This test uses the constructor function s:lowercaseName, but s:lowercaseName is not a generalized atomic type because it has a pattern facet.  Therefore the no such constructor function is available.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68230</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-05-28 16:15:13 +0000</bug_when>
    <thetext>s:lowercaseName is also used in

CastAs-UnionType-22
CastAs-UnionType-23
CastAs-UnionType-24</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68231</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-05-28 16:54:38 +0000</bug_when>
    <thetext>We now allow casting from string and untypedAtomic to any simple type other than the abstract types xs:anySimpleType and xs:NOTATION, with semantics equivalent to validation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68249</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-05-29 10:30:34 +0000</bug_when>
    <thetext>Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121906</commentid>
    <comment_count>4</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2015-07-09 11:47:38 +0000</bug_when>
    <thetext>Can you clarify why a constructor function is expected for s:lowercaseName?

http://www.w3.org/TR/xquery-30/#id-constructor-functions

&quot;For every generalized atomic type in the in-scope schema types (except xs:NOTATION and xs:anyAtomicType, which are not instantiable), a constructor function is implicitly defined.&quot;

[Definition: A generalized atomic type is a type which is either (a) an atomic type or (b) a pure union type ].

[Definition: A pure union type is an XML Schema union type that satisfies the following constraints: (1) {variety} is union, (2) the {facets} property is empty, .....

s:lowercaseName has facets so it isn&apos;t a pure union type or a generalized atomic type.  The test description is &quot;Constructor function for union type with facets&quot;.

Am I missing something?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121907</commentid>
    <comment_count>5</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2015-07-09 12:08:16 +0000</bug_when>
    <thetext>I may have found it in 4.11 Schema Import:

&quot;For each named user-defined simple type in the schema, schema import also adds a corresponding constructor function. &quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121914</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-09 13:25:05 +0000</bug_when>
    <thetext>Also F+O 18.5: For every user-defined simple type in the static context (See Section 2.1.1 Static Context XP31), there is a constructor function whose name is the same as the name of the type and whose effect is to create a value of that type from the supplied argument. 

But XPath 3.14.4 has it wrong: &quot;For every generalized atomic type in the in-scope schema types (except xs:NOTATION and xs:anyAtomicType, which are not instantiable), a constructor function is implicitly defined.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121918</commentid>
    <comment_count>7</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2015-07-09 15:40:29 +0000</bug_when>
    <thetext>Thanks.  I just noticed that bug 28915 already addresses this.  I am changing this test suite bug back to INVALID since the issue is in the specification.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>