[Mono-bugs] [Bug 77688][Min] Changed - Different AttributeType
returned under Mono framework compared to Microsoft framework
for XMLSchema.xsd.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Mar 9 03:26:33 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by atsushi at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77688
--- shadow/77688 2006-03-02 13:53:24.000000000 -0500
+++ shadow/77688.tmp.27114 2006-03-09 03:26:32.000000000 -0500
@@ -1,13 +1,13 @@
Bug#: 77688
Product: Mono: Class Libraries
Version: 1.1
OS: unknown
OS Details:
-Status: NEW
-Resolution:
+Status: RESOLVED
+Resolution: NOTABUG
Severity: Unknown
Priority: Minor
Component: Sys.XML
AssignedTo: atsushi at ximian.com
ReportedBy: matt.ward.bugs at googlemail.com
QAContact: mono-bugs at ximian.com
@@ -160,6 +160,144 @@
looks like a bug in Microsoft's .NET 1.1 framework.
The mixed attribute is defined as:
<xs:attribute name="mixed" type="xs:boolean" use="optional"
default="false">
+
+------- Additional Comments From atsushi at ximian.com 2006-03-09 03:26 -------
+Conclusion ahead of all: Mono behavior is the best to reflect the
+correct schema components.
+
+This .NET 1.1 behavior is a bug, because *xs:boolean is not xs:boolean
+in this schema*. Type "boolean" in this schema is "defined" as to be
+derived from "anySimpleType".
+
+Taking it into consideration, when there is a definition like:
+
+ <xs:attribute name="mixed" type="xs:boolean" use="optional"
+default="false">
+
+this "xs:boolean" does not mean the exact type defined in W3C XML
+Schema Datatypes, but rather means explicitly defined "boolean" type
+in this XMLSchema.xsd
+
+(The exact definition should take precedence than W3C definition here.
+Otherwise no one can validate "modified" versions of XMLSchema.xsd -
+though XMLSchema.xsd is originally buggy as described later).
+
+Thus, the Datatype property of the corresponding XmlSchemaAttribute
+for "mixed" attribute in "complexType" is null, as explicitly shown in
+this NUnit test result under Mono.
+
+In that sense .NET 2.0 is kinda "better" than 1.1, but it is still
+buggy. It should not return xs:string as its type. The correct type is
+"anySimpleType".
+
+Q.E.D.
+
+BTW, the biggest reason why this test results differ between .NET 1.x,
+2.0 and Mono is because XMLSchema.xsd from W3C does not conform to W3C
+XML Schema structures specification, and this example code still try
+to get meaningful results from broken schema. It is like trying to get
+meaningful information from an XmlTextReader which has already
+reported a well-formedness error. So it makes almost no sense.
+
+Here are the messages from MS XmlSchema.Compile():
+
+Restriction of 'anySimpleType' is not allowed.
+The WhiteSpace constraining facet is prohibited for 'anySimpleType'.
+The WhiteSpace constraining facet is prohibited for 'anySimpleType'.
+The Pattern constraining facet is prohibited for 'anySimpleType'.
+The Pattern constraining facet is prohibited for 'anySimpleType'.
+The Pattern constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+The FractionDigits constraining facet is prohibited for 'anySimpleType'.
+The MinInclusive constraining facet is prohibited for 'anySimpleType'.
+The Pattern constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+Restriction of 'anySimpleType' is not allowed.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+Restriction of 'anySimpleType' is not allowed.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+Restriction of 'anySimpleType' is not allowed.
+The MaxInclusive constraining facet is prohibited for 'anySimpleType'.
+The MaxInclusive constraining facet is prohibited for 'anySimpleType'.
+The MinInclusive constraining facet is prohibited for 'anySimpleType'.
+The MinInclusive constraining facet is prohibited for 'anySimpleType'.
+The MinInclusive constraining facet is prohibited for 'anySimpleType'.
+The MinInclusive constraining facet is prohibited for 'anySimpleType'.
+The MaxInclusive constraining facet is prohibited for 'anySimpleType'.
+The MaxInclusive constraining facet is prohibited for 'anySimpleType'.
+The MaxInclusive constraining facet is prohibited for 'anySimpleType'.
+The MaxInclusive constraining facet is prohibited for 'anySimpleType'.
+The MinInclusive constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+The Pattern constraining facet is prohibited for 'anySimpleType'.
+The Pattern constraining facet is prohibited for 'anySimpleType'.
+The Enumeration constraining facet is prohibited for 'anySimpleType'.
+
+XMLSchema.xsd is also useless when you try to get post schema
+validation infoset (PSVI). For example, see the definition for xs:decimal:
+
+
+ <xs:simpleType name="decimal" id="decimal">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="totalDigits"/>
+ <hfp:hasFacet name="fractionDigits"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="total"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="true"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#decimal"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="decimal.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+It explicitly defines xs:decimal type as "anySimpleType". It does not
+expose numeric value as typed data. Also, due to this definition, it
+is not allowed to have numeric facets which is precisely reported by
+our implementation (those hfp:* elements are nothing: they never
+consists of W3C standards and they are actually ignored in MS
+System.Xml.Schema).
More information about the mono-bugs
mailing list