<?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>18654</bug_id>
          
          <creation_ts>2012-08-22 08:46:03 +0000</creation_ts>
          <short_desc>equality between anySimpleType and string</short_desc>
          <delta_ts>2012-09-21 16:10:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema Test Suite</product>
          <component>Sun Tests</component>
          <version>2006-11-06</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>needsAgreement</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Altova XML Developers">xml.dev</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          <cc>David_E3</cc>
          
          <qa_contact name="XML Schema Test Suite mailing list">public-xml-schema-testsuite</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72531</commentid>
    <comment_count>0</comment_count>
    <who name="Altova XML Developers">xml.dev</who>
    <bug_when>2012-08-22 08:46:03 +0000</bug_when>
    <thetext>In test &apos;Positive&apos; of group &apos;valueconstraint00901m1&apos; a fixed value constraint &quot;alpha beta&quot; of type &quot;xs:anySimpleType&quot; must be compared with the value &quot;alpha beta&quot; of an instance specified type definition &quot;xs:string&quot;. 

See http://www.w3.org/TR/xmlschema11-1/#cvc-elt:
5.2.2.2.2 If E&apos;s ·governing type definition· is a Simple Type Definition or a Complex Type Definition with {content type}.{variety} = simple, then the ·actual value· of E is equal or identical to D.{value constraint}.{value}. 

But the datatypes spec says: &quot;values from different primitive data spaces are made artificially unequal even if they might otherwise be considered equal&quot;.

xs:anySimpleType is a special data type, xs:string a primitive data type. So in my opinion they can&apos;t have equal or identical values.

But this is a little bit different for XSD 1.0 - see http://www.w3.org/TR/xmlschema-1/#cvc-elt:
5.2.2.2.2 If the {content type} of the ·actual type definition· is a simple type definition, then the ·actual value· of the item must match the canonical lexical representation of the {value constraint} value.

So in my opinion the expected result must be invalid for XSD 1.1, and valid for XSD 1.0.

Best regards,
Andreas Meissl</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74234</commentid>
    <comment_count>1</comment_count>
    <who name="David Ezell">David_E3</who>
    <bug_when>2012-09-21 16:10:09 +0000</bug_when>
    <thetext>(From Michael Sperberg-McQueen):
We&apos;re not yet quite sure how to resolve this. 
Since anySimpleType is not a primitive but a special type, the rule
quoted does not apply.  The use of xsi:type may make a difference
here, but so far the WG has not reached certainly on whether it does,
or how.
  
There is a rule in Structures 2.2.1.2 that says behavior of processors
is unconstrained when validation rules implicate lexical mapping for
types with undefined lexical mappings (like, for instance, the special
types); that may mean that the behavior of 1.1 processors is
unconstrained here, and the test case should be labeled accordingly.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>