BUGS-MS.txt 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. BUGS in MS Implementation of XmlSchema:
  2. 001. Does not allow duplicate values in lists for final* and block* attributes.
  3. For example "restriction restriction" is not allowed even though its a valid
  4. value for blockDefault.
  5. 002. Resets the minOccurs to 0 if maxOccurs="0", whereas it should raise an error.
  6. 003. Allows abstract="true" in the a localElement whereas it is not allowed.
  7. <?xml version="1.0"?>
  8. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xsdtesting" xmlns:x="http://xsdtesting" elementFormDefault="qualified">
  9. <xsd:element name="doc">
  10. <xsd:complexType>
  11. <xsd:sequence>
  12. <xsd:element name="elem1"/>
  13. <xsd:element abstract="true" name="elem2"/> <!--This element is not valid -->
  14. </xsd:sequence>
  15. </xsd:complexType>
  16. </xsd:element>
  17. </xsd:schema>
  18. 004. QName value constraint
  19. When xs:QName based type is specified to an attribute or element
  20. declaration, MS.NET fails to fill their {value constraints} (i.e.
  21. default or fixed value), even though they have those namespace
  22. declaration by XmlSerializerNamespaces.
  23. 005. derivation by extension of xs:all
  24. As it is discussed on w3c xmlschema-dev ML, MS System.Xml.Schema
  25. incorrectly allows <complexType><complexContent><extension><all>
  26. (i.e. XmlSchemaComplexContentExtension that contains XmlSchemaAll)
  27. whose base type contains non-empty particle. It is prohibited,
  28. because, as XML Schema structures 3.4.2 (complex content Schema
  29. Component) {content type} 2.3, complex content extension creates
  30. merged particles as a sequence, which never allows 'all' model group
  31. as its content.
  32. See: http://lists.w3.org/Archives/Public/xmlschema-dev/2002Oct/0156.html
  33. Below are incorrect W3C test suite in msxsdtest/complexType: ctH013.xsd,
  34. ctH019.xsd, ctH020.xsd, ctH021.xsd, ctH022.xsd, ctH023.xsd, ctJ001.xsd
  35. and in msxsdtest/ModelGroups: mgA016.xsd, mgO007.xsd (9 testcases).
  36. 006. xs:all minOccurs="0" not allowed
  37. W3C WXS Structures REC. says that model group xs:all is limited to have
  38. minOccurs=maxOccurs=1 in case of complexType's content type particle
  39. (see 3.8.6 All Group Limited), but this is corrected to allow
  40. minOccurs=0.
  41. (see E1-26 of http://www.w3.org/2001/05/xmlschema-errata#Errata1)
  42. Related msxsdtest is ParticlesEa022.xsd
  43. 007. Insufficient unique particle attribution of xs:any
  44. MS.NET allows <xs:choice><xs:any /><xs:element ... /></xs:choice>.
  45. Related msxsdtests are: ParticlesJd002.xsd, ParticlesJd003.xsd and
  46. ParticlesJd004.xsd.
  47. ParticlesIb001.xsd is also related, but it is not necessarily said as
  48. incorrect. Both elements are of the same type, so *in a sense* they are
  49. the same declaration. MSV, XSV and I stands different.
  50. 008. Occurence Range OK (3.9.6) incorrectly assessed
  51. Particles that have maxOccurs="0" looks simply ignored *before*
  52. evaluating particle restriction valid, but it might get incorrect
  53. result.
  54. <xsd:complexType name="foo">
  55. <xsd:complexContent>
  56. <xsd:restriction base="bar">
  57. <xsd:choice>
  58. <xsd:element name="e1" minOccurs="0" maxOccurs="0"/>
  59. <xsd:element name="e2"/>
  60. </xsd:choice>
  61. </xsd:restriction>
  62. </xsd:complexContent>
  63. </xsd:complexType>
  64. <xsd:complexType name="bar">
  65. <xsd:choice>
  66. <xsd:element name="e1"/>
  67. <xsd:element name="e2"/>
  68. </xsd:choice>
  69. </xsd:complexType>
  70. Related msxsdtest is groupG001.xsd.
  71. 009. derived list incorrectly allowed
  72. "Type Derivation OK" by list simple type of atomic simple type is
  73. incorrectly assessed, when the list's {item type definition} (not
  74. {base type definition} ) can be assessed as "Type Derivation OK". MSV,
  75. XSV and Xerces is not designed to allow such type derivation, and I
  76. think they are more correct than MS. That is, MS's schema engine is
  77. designed to use such schema typed class like:
  78. public class Foo { int notAList; }
  79. Normally validates such xml into this class:
  80. <Foo>1</Foo>
  81. MS validator consequently allows such instance like:
  82. <foo xsi:type="int_list_type">1 2 3</foo>
  83. But it cannot be validated into that class Foo.
  84. Related msxsdtests are elemT015.xsd and elemT022.xsd.
  85. 010. derived union incorrectly allowed
  86. Similar problem to No.9 above resides in xs:union. Derived union type
  87. from atomic type is not naturally allowed.
  88. Related msxsdtest is elemT014.xsd.
  89. 011. schema finalDefault with list and/or union
  90. In xs:schema, finalDefault = (#all | List of (extension | restriction)),
  91. but MS.NET failed to handle blockDefault='list' as an error.
  92. (union as well.)
  93. Related msxsdtest is stF034.xsd and stF036.xsd.
  94. 012. derived types cannot duplicate fixed facet
  95. If you have a facet like <xsd:minLength value="5" fixed="true" />, you should
  96. be able to have <xsd:minLength value="5" /> in restrictions of it, as long as
  97. the values are the same. MS says:
  98. "Base type has {fixed} equal to true."
  99. XML-Schema part2 Datatype, 4.3.2.1:
  100. "If {fixed} is true, then types for which the current type is the {base
  101. type definition} cannot specify a value for minLength other than
  102. {value}."
  103. Which implies that you can specify a value for minLength that is the same as
  104. {value}.
  105. 013. Some facets are incorrectly allowed for list simple type.
  106. As to structures spec 3.14.6 Derivation Valid (Simple) 2.2, only length,
  107. minLength, maxLength, pattern and enumeration are allowed. However, MS
  108. implementation allows whitespace (and possibly and so on).
  109. 014. Incorrectly disallowed mixed derivation with empty content from elementOnly
  110. When a complexType whose mixed='true' and -explicit content- is empty,
  111. is derived from a complexType whose {content type} is ElementOnly,
  112. MS.NET rejects such schema. But 3.4.2 (complex content Schema
  113. Component) especially 2.1 of {content type} does not say it is an error.
  114. Related msxsdtest: ctF008.xsd