Commit Graph
247 Commits
Author SHA1 Message Date
Atsushi Eno dc3a99c440 2010-06-14 Atsushi Enomoto <[email protected]>
* XmlDocument.cs : do not create XmlSchemaInfo instance every time
	  it validates a node.

	* XmlSchemaValidator.cs : limit validity initialization. In some
	  cases it failed to set Invalid.


svn path=/trunk/mcs/; revision=158867
2010-06-14 07:35:04 +00:00
Atsushi Eno f577f78eec 2010-06-14 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : fill Validity. Fixed bug #613682.


svn path=/trunk/mcs/; revision=158866
2010-06-14 06:55:54 +00:00
Atsushi Eno a5b5e8ce99 2010-03-15 Atsushi Enomoto <[email protected]>
* XmlSchemaComplexType.cs : quick fix for bug #584664. Fill base
	  content type particles in prior to filling its own.

	* XmlSchemaValidatorTests.cs : added test for bug #584664.

	* 584664b.xsd, 584664a.xml, 584664b.xml, 584664a.xsd: new test files
	  by Florian Haag.


svn path=/trunk/mcs/; revision=153559
2010-03-15 06:12:42 +00:00
Atsushi Eno a3e1748844 2010-02-16 Atsushi Enomoto <[email protected]>
* XmlSchemaComplexType.cs : in modern .NET, xs:anyType has the
	  appropriate qname.


svn path=/trunk/mcs/; revision=151803
2010-02-16 14:26:40 +00:00
Atsushi Eno eede1f63d3 2010-01-27 Atsushi Enomoto <[email protected]>
* XmlAtomicValue.cs: handle Decimal here to process xs:decimal as
	  a valid base type for simple types. patch by Luke Ravitch,
	  Fixed bug #557452.

	* XmlSchemaValidatorTests.cs : added test for bug #557452, by
	  Luke Ravitch.


svn path=/trunk/mcs/; revision=150280
2010-01-27 06:32:59 +00:00
Atsushi Eno 569db617bc 2010-01-26 Atsushi Enomoto <[email protected]>
* XmlSchemaComplexType.cs : validate base type first and then
	  validate particle. Patch by Jonas Larsson, fixed bug #502251.


svn path=/trunk/mcs/; revision=150194
2010-01-26 05:59:04 +00:00
Atsushi Eno 2f8435c724 2010-01-26 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs : when adding a schema with "", it seems treated
	  as if it were null. Fixed bug #571650.

	* XmlSchemaSetTests.cs : added test for bug #571650.


svn path=/trunk/mcs/; revision=150187
2010-01-26 02:19:40 +00:00
Atsushi Eno b330fc8e07 2009-05-19 Jonas Larsson <[email protected]>
* XmlSchemaUtil.cs, BuiltInDatatype.cs, XmlSchemaComplexType.cs:
	  Introduced new MS compatibility option by environment variable,
	  for bug #502115.


svn path=/trunk/mcs/; revision=134397
2009-05-19 14:43:55 +00:00
Atsushi Eno 2e31d6db16 2009-05-19 Atsushi Enomoto <[email protected]>
* XmlSchemaGroupRef.cs : when getting optimized particle, reset was
	  incomplete. Patch by Jonas Larsson. Fixed bug #502168.

2009-05-07  Jonas Larsson <[email protected]> 

	* XmlSchemaValidatorTests.cs : added test for bug #501666.


svn path=/trunk/mcs/; revision=134396
2009-05-19 14:30:11 +00:00
Atsushi Eno 1c400f6aa7 2009-05-11 Atsushi Enomoto <[email protected]>
* XmlSchemaComplexType.cs : make complex content type work like .NET
	  does. Patch by Jonas Larsson. Fixed bug #501814.

	* XmlValidatingReaderTests.cs : test for bug #501814 by Jonas
	  Larsson.


svn path=/trunk/mcs/; revision=133908
2009-05-11 17:37:07 +00:00
Atsushi Eno ce01d27dc2 2009-05-11 Atsushi Enomoto <[email protected]>
* XmlSchemaComplexType.cs : do not forget to clear attributes
	  before Compile(). Patch by Jonas Larsson. Fixed bug #501763.

	* XsdValidatingReaderTest.cs : test for bug #501763 by Jonas Larsson.


svn path=/trunk/mcs/; revision=133905
2009-05-11 17:12:26 +00:00
Atsushi Eno 8db721b50f 2009-05-07 Jonas Larsson <[email protected]>
* XmlAtomicValue.cs : support more type conversion. fixed bug #501666.

	* XmlSchemaValidatorTests.cs : added test for bug #501666.


svn path=/trunk/mcs/; revision=133903
2009-05-11 16:59:42 +00:00
Atsushi Eno fb729447e3 2009-04-22 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : quick fix for bug #496205. Reset xsi:type
	  and endelement.

	* XmlSchemaValidatorTests.cs : added test for bug #496192 and #496205.

	* 496192.xml, 496192.xsd : new test files.


svn path=/trunk/mcs/; revision=132351
2009-04-22 08:08:52 +00:00
Atsushi Eno 8a93fd5b62 bug # correction.
svn path=/trunk/mcs/; revision=132348
2009-04-22 05:44:56 +00:00
Atsushi Eno 0e439d038d 2009-04-22 Atsushi Enomoto <[email protected]>
* XmlQualifiedName.cs : added Parse() overload that is used for
	  xsd validation.

	* XmlSchemaValidator.cs, BuiltInDatatype.cs, XmlAtomicValue.cs:
	  use xsd-supported version of XmlQualifiedName.Parse().
	  Fixed bug #496205.


svn path=/trunk/mcs/; revision=132347
2009-04-22 05:43:28 +00:00
Sebastien Pouliot d37ae0362a 2009-04-21 Sebastien Pouliot <[email protected]>
* XmlSchema_2_1.cs: Add internal fields needed by S.R.S.dll


svn path=/trunk/mcs/; revision=132287
2009-04-21 16:39:44 +00:00
Atsushi Eno 19813940cf 2009-03-17 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : check identity constraints on default or
	  fixed attributes too.


svn path=/trunk/mcs/; revision=129532
2009-03-17 07:34:10 +00:00
Atsushi Eno 45e218154c 2009-03-16 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : check identities for untyped attributes.
	  Attribute keyfield test must adjust depth, or it never matches.
	  Missing braces for IgnoreIdentity test.


svn path=/trunk/mcs/; revision=129464
2009-03-16 16:13:56 +00:00
Atsushi Eno aff31f7ba1 2009-03-16 Atsushi Enomoto <[email protected]>
* XmlSchemaUtil.cs, XmlSchemaValidator.cs : predefined non-primitive
	  xml schema types now validate fixed values as expected.


svn path=/trunk/mcs/; revision=129443
2009-03-16 14:13:28 +00:00
Atsushi Eno 71b85d0b6f 2009-03-16 Atsushi Enomoto <[email protected]>
* BuiltInDatatype.cs, XmlSchemaDatatype.cs : some equality comparison
	  failed because it anyType is not used as singleton.


svn path=/trunk/mcs/; revision=129440
2009-03-16 12:47:49 +00:00
Atsushi Eno 015ecae5f8 2009-01-30 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : when xsi:nil is true, do not validate
	  text string. Fixed bug #469713.

	* XsdValidatingReader.cs : when xsi:nil is true, do not validate
	  text string.

	* XmlSchemaValidatorTests.cs : added test for bug #469713.


svn path=/trunk/mcs/; revision=125069
2009-01-30 11:14:22 +00:00
Atsushi Eno 4c6adc47ba 2009-01-30 Atsushi Enomoto <[email protected]>
* XmlSchemaElement.cs : to reference elementFormDefault, use its
	  ancestor, not the schema island root.


svn path=/trunk/mcs/; revision=125058
2009-01-30 08:13:06 +00:00
Atsushi Eno 3bfb4f73d0 2008-12-15 Atsushi Enomoto <[email protected]>
* XmlSchema.cs, XmlSchemaSet.cs : move substitutionGroup processing
	  from validation phase to post-subset-collection phase. It caused
	  inconsistent substitutionGroup processing among import and
	  schemaSet.Schemas(). Fixed possible XBRL schema processing.

	* XmlSchemaSetTests.cs : added test for Compile() after "duplicating"
	  call to Add() for such schemas that also have xs:import of the
	  same schema that causes errors on processing substitutionGroup.


svn path=/trunk/mcs/; revision=121509
2008-12-15 10:39:00 +00:00
Atsushi Eno 42e6fd4373 2008-12-09 Atsushi Enomoto <[email protected]>
* XsdValidatingReader.cs : skip text validation under xs:any.
	  Fixed part of bug #449512.

	* XmlSchemaValidator.cs : skip text validation under xs:any.

	* XmlValidatingReaderTests.cs : added test for validating mixed
	  element under xs:any.


svn path=/trunk/mcs/; revision=121093
2008-12-09 11:19:20 +00:00
Atsushi Eno ff8c76700f fix bug #435206.
svn path=/trunk/mcs/; revision=117232
2008-10-28 01:14:03 +00:00
Atsushi Eno 6b68299d0f fix bug #433774.
svn path=/trunk/mcs/; revision=117216
2008-10-27 23:57:04 +00:00
Atsushi Eno 65acaeb5a9 2008-09-09 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : do not try to validate CloseStartElement
	  when it should be skipped. Fixed bug #422581.

	* XmlSchemaValidatorTests.cs : added test for bug #422581.

	* 422581.xsd, 422581.xml : new files.


svn path=/trunk/mcs/; revision=112583
2008-09-09 13:20:23 +00:00
Jb Evain 24fddc33da sl2b2 update
svn path=/trunk/mcs/; revision=110955
2008-08-19 16:26:20 +00:00
Atsushi Eno b0e6ab7416 2008-06-13 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : fixed couple of olive regressions caused by
	  previous ProcessExternal() patches.


svn path=/trunk/mcs/; revision=105755
2008-06-13 05:37:59 +00:00
Atsushi Eno 1c769c9518 2008-06-06 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : indent (I slightly modified the previous patch
	  to expose the actual changes).


svn path=/trunk/mcs/; revision=105145
2008-06-06 10:15:03 +00:00
Atsushi Eno 13bc5269f3 2008-06-06 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : fixed bug #397612, patch by James Fitzsimons.
	  in ProcessExternal(), Make xs:import without schemaLocation work
	  fine as if it were with schemaLocation.

2008-06-06  James Fitzsimons <[email protected]>

	* XmlSchemaTests.cs: added test for bug #397612.
	* XmlSchemaAssertion.cs : make sure to close schema XmlReader.

2008-06-06  Atsushi Enomoto  <[email protected]>

	* importNamespaceTest.xsd, xsdimporttest.xml, importedNamespace.xsd:
	  new test files.



svn path=/trunk/mcs/; revision=105144
2008-06-06 10:07:22 +00:00
Atsushi Eno 6ae0c56558 2008-06-06 James Fitzsimons <[email protected]>
* XmlSchema.cs : Changed GetResolvedUri to return Uri in correct case
	  to make compatible with the Microsoft.NET framework.

	* XmlSchemaTests.cs: added test to support change to 
	  GetResolvedUri to return Uri in correct case
	  to make compatible with the Microsoft.NET framework.

2008-06-06  Atsushi Enomoto  <[email protected]>

	* resolveUriSchema.xsd : (actually I've incorrectly added it before
	  the actual test checkin) Fixed schemaLocation.


svn path=/trunk/mcs/; revision=105141
2008-06-06 07:39:58 +00:00
Atsushi Eno 5691ba237b 2008-02-19 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : Do recursively process xs:include inside included
	  schemas. Fixed bug #361818.

	* XmlSchemaTests.cs: added test for bug #361818.

	* 361818.xsd, 361818-2.xsd, 361818-3.xsd : new test files.

	* Makefile : extra distfiles (361818*.xsd).


svn path=/trunk/mcs/; revision=96159
2008-02-19 15:59:12 +00:00
Atsushi Eno d89e9691ac 2008-02-19 Atsushi Enomoto <[email protected]>
* XsdWildcard.cs : block extra compilation and made compilation reset.
	  This somehow fixed bug #360541.

	* XmlSchemaAny.cs : block extra compilation in anyTypeContent.

	* XmlSchemasTests.cs : new test file (for bug #360541).

	* System.Xml_test.dll.sources: added XmlSchemasTests.cs.


svn path=/trunk/mcs/; revision=96115
2008-02-19 04:02:53 +00:00
Atsushi Eno ea43bd0eb7 2008-02-04 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : added couple of null argument check.
	  Do not depend on XmlSchemaInfo to retrieve attribute value (it
	  could be null).
	  Do not practically validate attribute when it is not in validating
	  state (i.e. inside xs:any). Fixed bug #358408.

	* XmlSchemaValidatorTests.cs : new. Test for bug #358408.

	* 358408.xsd : new test file.

	* System.Xml_test.dll.sources : added XmlSchemaValidatorTests.cs.
	* Makefile : extra distfiles (358408.xsd).


svn path=/trunk/mcs/; revision=94729
2008-02-04 08:49:05 +00:00
Sebastien Pouliot 2fc499a546 2008-01-12 Sebastien Pouliot <[email protected]>
* XmlSchemaInference.cs: Fix infinite recursion in TypeInference
	property getter. Found by Gendarme.


svn path=/trunk/mcs/; revision=92753
2008-01-12 16:35:52 +00:00
Atsushi Eno b265ee6b99 2007-11-12 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : XmlValueGetter actually needs string value
	  to validate against a restricted simple type (beyond ParseValue()). 
	  Fixed bug #339934.

	* XsdValidatingReaderTests.cs : added test for #339934.

	in Test/System.Xml.Schema/standalone_tests:
	* Makefile : now we try both default and 2.0 profile tests (i.e.
	  "make run-test" and "make PROFILE=net_2_0").
	  For 2.0, use XmlReader.Create().


svn path=/trunk/mcs/; revision=89432
2007-11-12 00:55:56 +00:00
Atsushi Eno 34694574b3 2007-11-05 Atsushi Enomoto <[email protected]>
* XmlSchemaSimpleTypeRestriction.cs : implemented value-space
	  comparison for enumerations. Actually it is hybrid (it also
	  tries literal-space comparison first). Fixed bug #322457 and
	  #322458.

	  When there is a literal-space match, sometimes you cannot try to
	  get TypedValue even if it is valid due to double.Parse() overflow.


svn path=/trunk/mcs/; revision=88894
2007-11-05 17:38:38 +00:00
Atsushi Eno 64499b7d35 2007-09-27 Atsushi Enomoto <[email protected]>
* XmlAtomicValue.cs :
	  Added ToString(). Public API metadata completion.


svn path=/trunk/mcs/; revision=86508
2007-09-27 15:40:06 +00:00
Atsushi Eno b6cbab331e 2007-08-02 Atsushi Enomoto <[email protected]>
* XmlSchemaComplexType.cs,
	  XmlSchemaComplexContentRestriction.cs :
	  in Validate(), every descendant item in complexType must be first
	  validated before getting GetOptimizedParticle(), or it could result
	  in wrong content particle. Fixed bug #82010.

	* XsdValidatingReaderTests.cs : test for bug #82010.

	* 82010.xsd, 82010.xml : new test files.

	* Makefile : extra distfiles (82010.xml/.xsd).


svn path=/trunk/mcs/; revision=83272
2007-08-02 09:21:06 +00:00
Atsushi Eno 2b16027631 2007-08-02 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : another extra whitespace rejection.
	  Fixed another issue reported on bug #82183.

	* XsdValidatingReaderTests.cs : another test posted on bug #82183.


svn path=/trunk/mcs/; revision=83264
2007-08-02 07:10:22 +00:00
Atsushi Eno 97eb3b6ec2 2007-07-25 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : do not reject whitespaces in elementOnly
	  content model. Fixed bug #82183.

	* XsdValidatingReader.cs : reject more whitespaces in empty model
	  element.


svn path=/trunk/mcs/; revision=82652
2007-07-25 09:31:38 +00:00
Atsushi Eno 5be9aab4de 2007-07-17 Atsushi Enomoto <[email protected]>
* XsdValidatingReader.cs : Process empty and element-only contents
	  differently along with the spec 3.4.4 Element Locally Valid (Complex 
	  Type) 2.3 (and 2.1 respectively). Itchy specification indeed.
	  This demanded not a few internal changes. Fixed bug #82099.

	* XmlSchemaValidator.cs : dependent changes to 
	  XsdParticleValidationState. Changed ValidateWhitespace() to do
	  the same as we do in XsdValidatingReader.

	* XsdValidatingReaderTests.cs : added test for bug #82099.


svn path=/trunk/mcs/; revision=82098
2007-07-17 13:36:31 +00:00
Atsushi Eno 0208465123 2007-04-24 Atsushi Enomoto <[email protected]>
* XmlSchema.cs XmlSchemaGroup.cs XmlSchemaAny.cs XmlSchemaElement.cs
	  XmlSchemaNotation.cs XmlSchemaComplexType.cs
	  XmlSchemaAttributeGroup.cs XmlSchemaSimpleType.cs
	  XmlSchemaIdentityConstraint.cs XmlSchemaAnyAttribute.cs
	  XmlSchemaRedefine.cs XmlSchemaAttribute.cs :
	  avoid incorrect compilation of included schemas, fixed bug #81360.
	  more fix for wrong targetNamespace propagation within current
	  processing model. Replaced ParentIsSchema field with a property.

	* XsdValidatingReaderTests.cs : added test for bug #81360.

	* 81360.xsd, 81360inc1.xsd, 81360inc2.xsd : new test files.

	* Makefile : added distfiles.


svn path=/trunk/mcs/; revision=76184
2007-04-24 12:40:40 +00:00
Atsushi Eno 70e354c8b4 2007-04-24 Atsushi Enomoto <[email protected]>
* XmlSchema.cs XmlSchemaSimpleTypeList.cs
	  XmlSchemaComplexContentRestriction.cs XmlSchemaGroup.cs
	  XmlSchemaComplexContentExtension.cs XmlSchemaSequence.cs
	  XmlSchemaSimpleContentRestriction.cs
	  XmlSchemaSimpleContentExtension.cs
	  XmlSchemaElement.cs XmlSchemaAll.cs XmlSchemaComplexType.cs
	  XmlSchemaAttributeGroup.cs XmlSchemaSimpleTypeRestriction.cs
	  XmlSchemaSimpleContent.cs XmlSchemaChoice.cs
	  XmlSchemaSimpleType.cs XmlSchemaIdentityConstraint.cs
	  XmlSchemaSimpleTypeUnion.cs XmlSchemaRedefine.cs
	  XmlSchemaComplexContent.cs XmlSchemaAttribute.cs
	  XmlSchemaObject.cs : set parent component in prior to compilation,
	  bringing Parent to 1.x as internal. Moving toward fixing #81360.


svn path=/trunk/mcs/; revision=76163
2007-04-24 06:59:52 +00:00
Atsushi Eno 387066605d 2006-12-11 Atsushi Enomoto <[email protected]>
* XmlSchemaIdentityConstraint.cs : give conflicting component in
	  the error message.
	* XmlSchemaElement.cs : When resolving "ref" and "substitutionGroup",
	  It should use XmlSchema.FindElement() instead of XmlSchema.Elements
	  so that it does not miss external components.
	* XmlSchemaSet.cs, XmlSchema.cs : now in one XmlSchemaSet
	  compilation, make sure to not handle the same schema twice even
	  at the schema level.


svn path=/trunk/mcs/; revision=69293
2006-12-11 05:33:38 +00:00
Atsushi Eno 623b56116c 2006-10-27 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : it must also be fixed for method signature
	  change.
	* XmlSchemaSimpleTypeRestriction.cs : on .NET 2.0, use 
	  IXmlNamespaceResolver for XmlSchemaValidator.

	* XsdValidatingReaderTests.cs : the previous test raises different
	  exception in 2.0.


svn path=/trunk/mcs/; revision=67032
2006-10-27 16:17:11 +00:00
Atsushi Eno acfc823f15 2006-10-27 Atsushi Enomoto <[email protected]>
* XsdValidatingReader.cs : Fixed bug #79650. Enumeration facet was
	  not validated for attributes. Also, simple type restriction should
	  require namespace manager to resolve QNames.

	* XmlSchemaSimpleTypeRestriction.cs : for facet validation, it should
	  use namespacemanager. Though the change is not perfect, thus I
	  disable this change for now.

	* XmlValidatingReaderTests.cs : added bug #79650 case.

	* 79650.xsd : added test for bug #79650.

	* Makefile : added 79650.xsd to dist file.


svn path=/trunk/mcs/; revision=67031
2006-10-27 15:12:25 +00:00
Atsushi Eno 2b937a1e9b 2006-07-27 Atsushi Enomoto <[email protected]>
* XmlSchema.cs, XmlSchemaSimpleTypeList.cs,
	  XmlSchemaSimpleContentRestriction.cs, XmlSchemaUtil.cs,
	  XmlSchemaSimpleContentExtension.cs, XmlSchemaElement.cs,
	  XmlSchemaComplexType.cs, XmlSchemaSimpleTypeRestriction.cs,
	  XmlSchemaSimpleTypeUnion.cs, XmlSchemaAttribute.cs :
	  Finally fixed bugs around cross-referencing importing schema 
	  components (namely, #77489 and #78220) by resolving referenced
	  components via new internal Find[Element|Attribute|AttributeGroup|
	  SchemaType] methods in XmlSchema.

	* XmlSchemaSetTest.cs : added bug #77489 case.
	* XmlSchemaCollectionTests.cs : removed NotWorking from #77820 case.


svn path=/trunk/mcs/; revision=63042
2006-07-27 15:15:12 +00:00
Atsushi Eno 325b2d777c 2006-07-27 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : set ValidationEventHandler to XmlSchemaSet only
	  when the argument event handler is not null.
	  Validate() is internal to open it to XmlSchemaSet.
	* XmlSchemaSet.cs : removed extraneous "handler" field and method
	  "OnValidationError". Now ValidationEventHandler just works since
	  we don't have to care about XmlSchemaCollection's event (it just
	  reuses XmlSchemaSet's event now).
	  Split Compile() process to collect components first, and to
	  validate next.


svn path=/trunk/mcs/; revision=63041
2006-07-27 14:46:58 +00:00