Commit Graph
37 Commits
Author SHA1 Message Date
Atsushi Eno 349c84032e Fix regression from 2cc36e3, missing BaseURI caused external schema resolution failure. 2013-08-15 22:09:49 +09:00
Atsushi Eno 2cc36e3331 Fix bug #13716 - use XmlSchemaSettings.XmlResolver to resolve schemas. 2013-08-08 21:38:47 +09:00
Martin Baulig 7d170f400d Sync parameter names with .NET. 2012-06-03 04:02:28 +02:00
Atsushi Eno 5de6693f16 Fix global schema component resolution issue in ids and identity constraints.
The old code cause incorrect duplicate ID errors when XmlSchemas is involved
(global components were not resolved correctly and it's not simple to make
minor fix).
This is part of bugfix #670945.
2011-05-24 13:02:37 +09:00
Atsushi Eno b523f411bd Multiple schemas in wsdl could share same SourceUri, so check more identity.
Part of bugfix #670945.
2011-05-09 19:09:19 +09: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 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 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 1d3440fc5d sanitizing MonoTODOs.
svn path=/trunk/mcs/; revision=67899
2006-11-15 11:31:25 +00:00
Konstantin Triger 44a8061934 cosmetic changes to enable compilation with MS 1.1 compiler
svn path=/trunk/mcs/; revision=63249
2006-08-02 13:35:43 +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
Atsushi Eno 6ccb305955 2006-07-27 Atsushi Enomoto <[email protected]>
* XmlSchema.cs, XmlSchemaSet.cs : some minor refactoring to make
	  Compile() simple two phase (i.e. CompileSubset() and Validate()).


svn path=/trunk/mcs/; revision=63028
2006-07-27 04:06:02 +00:00
Atsushi Eno 97c462eeae 2006-07-27 Atsushi Enomoto <[email protected]>
* XmlSchemaCollection.cs :
	  eliminated call to XmlSchema.CompileSubset(). Now XmlSchemaSet is
	  the only starter of the compilation.
	* XmlSchemaSet.cs : added targetNamespace check.

	* XmlSchemaSetTests.cs : added AddWrongTargetNamespace().


svn path=/trunk/mcs/; revision=63026
2006-07-27 02:58:28 +00:00
Atsushi Eno 6331ad5c79 2006-07-26 Atsushi Enomoto <[email protected]>
Refactoring compilation to make Compile() portable to
	XmlSchemaSet.Compile() and fix multi-schema bugs (not done yet)

	* XmlSchema.cs : 
	  Removed "root schema" concept from Compile().
	  Since nested inclusion does not result in an error, the role of
	  schemaLocationStack is identical to handledUris, thus removed it.
	  The handledUris does not have to be a field.
	  Moved NamedIdentities and IDCollections to XmlSchemaSet.
	  Renamed a Compile() which is called from XmlSchemaCollection and
	  XmlSchemaSet as CompileSubset(). Renamed private Compile() as
	  DoCompile().
	  public Compile() now internally creates a new XmlSchemaSet and
	  compiles the set.
	* XmlSchemaCollection.cs : now it hooks its schemaSet's validation
	  event handler and thus XmlSchemaSet does not need to check this
	  collection's event handler by itself.
	  XmlSchema.Compile() -> XmlSchema.CompileSubset().
	* XmlSchemaSet.cs :
	  Removed SchemaCollection which became unneccessary.
	  Added NamedIdentities and IDCollection.
	  XmlSchema.Compile() -> XmlSchema.CompileSubset().
	* XmlSchemaAttributeGroupRef.cs, XmlSchemaXPath.cs
	  XmlSchemaSimpleTypeList.cs, XmlSchemaComplexContentRestriction.cs,
	  XmlSchemaGroup.cs, XmlSchemaComplexContentExtension.cs,
	  XmlSchemaSequence.cs, XmlSchemaSimpleContentRestriction.cs,
	  XmlSchemaSimpleContentExtension.cs, XmlSchemaAny.cs,
	  XmlSchemaElement.cs, XmlSchemaNotation.cs, XmlSchemaAll.cs,
	  XmlSchemaComplexType.cs, XmlSchemaAnnotation.cs,
	  XmlSchemaAttributeGroup.cs, XmlSchemaSimpleTypeRestriction.cs,
	  XmlSchemaSimpleContent.cs, XmlSchemaGroupRef.cs,
	  XmlSchemaChoice.cs, XmlSchemaSimpleType.cs,
	  XmlSchemaIdentityConstraint.cs, XmlSchemaSimpleTypeUnion.cs,
	  XmlSchemaAnyAttribute.cs, XmlSchemaComplexContent.cs,
	  XmlSchemaAttribute.cs, XmlSchemaObject.cs :
	  removed XmlSchemaObject.IsCompiled(). Check compilation state by
	  comparing compilation ID directly.

	* XmlReader.cs :
	  For DTD validator, call to SetSchemas() makes no sense.
	* XmlValidatingReader.cs : now it internally holds old
	  XmlSchemaCollection instead of new XmlSchemaSet, to make
	  XmlSchemaSet.SchemaCollection unneccessary.
	  Removed SetSchemas() since it is now extraneous because of the
	  XmlReaderChange above.


svn path=/trunk/mcs/; revision=62988
2006-07-26 10:13:56 +00:00
Atsushi Eno 68c182e20c 2006-01-11 Atsushi Enomoto <[email protected]>
* XmlSchemaValidatingReader.cs : removed unused constructors.
	  Now it implements IXmlSchemaInfo. Use XmlSchemaType instead of
	  Object to represent schema types.

	* XmlSchemaAttribute.cs, XmlSchemaElement.cs : AttributeSchemaType
	  and ElementSchemaType were not working fine for anySimpleType.
	* XmlSchemaValidator.cs : When actual schema type was complex,
	  schema types was not filled correctly. Modified some extra comments.
	* XmlSchemaSet.cs, XmlSchemaType.cs : removed extra MonoTODOs.


svn path=/trunk/mcs/; revision=55371
2006-01-11 13:21:19 +00:00
Atsushi Eno df9a592c8c 2006-01-06 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs : Add() rollbacks IsCompiled to false.
	  Global components are not added when Add() is called.

	* XmlSchemaSetTests.cs : added AddRollbackIsCompiled(); Add() changes
	  IsCompiled to false.


svn path=/trunk/mcs/; revision=55151
2006-01-06 15:58:52 +00:00
Atsushi Eno 607ee5bf7b 2006-01-06 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs : reverted previous fix; it broke inclusions.

	* XmlSchemaSetTests.cs : reverted the patch, thus restore [Ignore].


svn path=/trunk/mcs/; revision=55146
2006-01-06 12:58:41 +00:00
Atsushi Eno fd4622ca84 2006-01-06 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs : Add() needs (consistent) namespace duplicate check.

	* XmlSchemaSetTests.cs : re-enabled test for Add() which was
	  inconsistent in beta versions.


svn path=/trunk/mcs/; revision=55145
2006-01-06 12:24:46 +00:00
Atsushi Eno 0b4965171d 2005-12-08 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs :
	  Turned out that it also has set_CompilationSettings.
	* XmlSchemaComplexType. : thus CompilationSettings is nullable, we
	  have to check its existence.

	* XmlSchemaSetTests.cs : added set_CompilationSettings tests.


svn path=/trunk/mcs/; revision=54098
2005-12-08 08:15:30 +00:00
Atsushi Eno 99c907944c 2005-12-08 Atsushi Enomoto <[email protected]>
* System.Xml.dll.sources : added XmlSchemaCompilationSettings.cs

	* XmlReaderSettings.cs : thanks to idiotic MS design,
	  AllowXmlAttributes is turned on by default.

	* XmlSchemaCompilationSettings.cs : new file.
	* XmlSchemaSet.cs : added CompilationSettings property.
	* XmlSchemaComplexType.cs : support for EnableUpaCheck.

	* XmlReaderSettingsTests.cs : (DefaultValue)
	  Added assertion label everywhere.
	* XmlWriterTests.cs : WriteNodeError is broken under MS.NET 2.0 (it
	  should cause an error).

	* XmlSchemaSetTests.cs : added CompilationSettings tests.


svn path=/trunk/mcs/; revision=54094
2005-12-08 06:56:12 +00:00
Gert Driesen b6157808b4 * XmlSchemaInference.cs: Is sealed in Beta 2.
* XmlSchemaInfo.cs: Added ContentType property.
* XmlSchemaObjectEnumerator.cs: No longer sealed in Beta 2.
* XmlSchemaSet.cs: No longer sealed in Beta 2. XmlResolver property
is now CLSCompliant.
* XmlConvert.cs: Renamed RoundTripKind to RoundtripKind.
* XmlDateTimeSerializationMode.cs: Renamed RoundTripKind to RoundtripKind 
to match .NET 2.0 Beta 2.
* XmlNodeReader2.cs: GetNamespacesInScope returns generic IDictionary
in .NET 2.0 Beta 2, and is explicit interface implementation.
* XmlTextReader.cs: GetNamespacesInScope returns generic IDictionary
in .NET 2.0 Beta 2.
* XmlTextReader2.cs: GetNamespacesInScope returns generic IDictionary
in .NET 2.0 Beta 2.
* XmlValidatingReader.cs: GetNamespacesInScope returns generic IDictionary 
in .NET 2.0 Beta 2.
* IXmlNamespaceResolver.cs: GetNamespacesInScope returns generic IDictionary 
in .NET 2.0 Beta 2.
* XmlNamespaceManager.cs: GetNamespacesInScope returns generic IDictionary 
in .NET 2.0 Beta 2.
* XmlNodeReaderImpl.cs: GetNamespacesInScope returns generic IDictionary in 
.NET 2.0 Beta 2.
* DTDValidatingReader.cs: GetNamespacesInScope returns generic IDictionary 
in .NET 2.0 Beta 2.
* XsltArgumentList.cs: No longer sealed in .NET 2.0.
* XsltException.cs: Message override is back in .NET 2.0 Beta 2.
* XmlMapping.cs: API compatibility fixes. Ctor is not protected in .NET 1.1. 
SetKey is not obsolete in .NET 2.0 Beta 2.
* XPathNavigator.cs: GetNamespacesInScope returns generic IDictionary
in .NET 2.0 Beta 2.
* XsdValidationReader.cs: GetNamespacesInScope returns generic IDictionary 
in .NET 2.0 Beta 2.
* XmlSchemaValidatingReader.cs: GetNamespacesInScope returns generic
IDictionary in .NET 2.0 Beta 2.
* SubtreeXmlReader.cs: GetNamespacesInScope now returns generic IDictionary.

svn path=/trunk/mcs/; revision=47974
2005-08-03 17:39:08 +00:00
Martin Baulig 58319196aa 2005-01-25 Martin Baulig <[email protected]>
* XmlSchemaSet.cs (XmlSchemaSet.XmlResolver): Mark this as
	not CLS-compliant to avoid a CS3025.

	* XmlSchemaType.cs (XmlSchemaType.ValueConverter): Mark this as
	not CLS-compliant to avoid a CS3025.


svn path=/trunk/mcs/; revision=39448
2005-01-25 01:02:08 +00:00
Atsushi Eno e38e165c6a 2004-12-26 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs : added Remove(), RemoveRecursive(), Reprocess().
	* XmlValueConverter.cs : implemented almost all the feature.
	* XmlSchemaSimpleType.cs : fixed some built-in types.
	* XmlSchemaType.cs : added ValueConverter property.



svn path=/trunk/mcs/; revision=38086
2004-12-26 16:37:32 +00:00
Atsushi Eno 103fb0642d 2004-12-15 Atsushi Enomoto <[email protected]>
* xsdtest.cs : added --v2 option that uses XmlReader.Create()
	  instead of XmlValidatingReader.

	* XmlFilterReader.cs : don't expect XmlReaderSettings of its source.

	* XmlSchemaValidatingReader.cs : xsi:* attributes are now handled via
	  XmlSchemaValidator.ValidateElement().
	  Removed some obsolete overrides.

	* XmlReader.cs :
	  Create() should assure NameTable!=null on creating XmlTextReader.
	  Now use XmlSchemaValidatingReader for all xsd validation.
	* XmlTextReader2.cs :
	  Don't use input reader's Settings. It is null.
	* XmlReaderSettings.cs : added XmlResolver.

	* XmlSchemaSet.cs : set default resolver. Clear components before
	  recompilation.
	* XmlSchemaValidator.cs :
	  SourceUri is System.Uri.
	  GetUnspecifiedDefaultAttributes() is allowed only when it is inside
	  start tag.
	  Added AddSchema().
	  Added duplicate attribute check.
	  Added ValidateElement() that takes xsi:* parameters.
	  (http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackId=7fc38ea1-c306-4fb7-8631-0e174b0ff3c6)
	  HandleXsiNil() now just takes string parameter.



svn path=/trunk/mcs/; revision=37782
2004-12-15 13:58:32 +00:00
Atsushi Eno 9a2a6c86f3 2004-12-08 Atsushi Enomoto <[email protected]>
* System.Xml.dll.sources : added XmlSchemaValidator.cs,
	  XmlValueGetter.cs and XmlSchemaValidationFlags.cs.

	* XmlException.cs : added SecurityPermissionAttributes.
	* XmlReaderSettings.cs,
	  XmlReader.cs : added ValidationFlags and removed obsolete ones.

	* XmlValueGetter.cs,
	  XmlSchemaValidationFlags.cs,
	  XmlSchemaValidator.cs : added.
	* XmlSchemaSet.cs : XmlResolver is now internally gettable.


svn path=/trunk/mcs/; revision=37398
2004-12-08 17:14:21 +00:00
Atsushi Eno 91d3a2d816 2004-11-24 Atsushi Enomoto <[email protected]>
* XmlSchemaDatatype.cs : added ParseValue() override.
	* XmlSchemaSimpleTypeList.cs,
	  XmlSchemaSimpleTypeUnion.cs : #if NET_2_0 some private fields,
	  just for eliminating warnings :(
	* XmlSchemaSet.cs : commented some fields currently not in use.
	  It is for eliminating warnings.
	* XmlSchemaSimpleTypeRestriction.cs : removed exception field name
	  to eliminate warning.
	* XmlSchemaException.cs : hasLineInfo is also runtime serialized now.



svn path=/trunk/mcs/; revision=36464
2004-11-24 10:39:29 +00:00
Atsushi Eno b1bf46a9d4 2004-11-17 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs : don't set TargetNamespace = "".



svn path=/trunk/mcs/; revision=36203
2004-11-17 09:08:23 +00:00
Atsushi Eno 288fb5c552 2004-11-08 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs : use NameTable when creating XmlTextReader.

svn path=/trunk/mcs/; revision=35809
2004-11-08 06:33:42 +00:00
Atsushi Eno 836675cffd 2004-11-05 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs : reduced extraneous XmlSchemaObjectTable creation.

svn path=/trunk/mcs/; revision=35779
2004-11-07 15:11:44 +00:00
Atsushi Eno e91b293dbc 2004-08-10 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : Replace XmlSchemaCollection with XmlSchemaSet that
	  used to maintain compiled schema state.
	  Simplified code a bit (Include processing).
	  Set IsCompiled = true only when successfully compiled.
	* XmlSchemaCollection.cs : Now it totally delegates its processing
	  to XmlSchemaSet. Removed unused methods.
	* XmlSchemaElement.cs : Added post-compiled information initializer
	  method, and call it before (re)Compile().
	* XmlSchemaSet.cs :
	  - Replaced internal store from Dictionary to List, since schema
	    resources for one target namespace can be more than one (that's why
	  - Schemas(string targetNamespace) returns ICollection).
	  - Now global schemaset members are added per schema addition (it is
	    more MS compatible than before).
	  - Use GetSafeNs() to do targetNamespace comparison correctly.

	  XmlSchemaSet looks still unstable, so it will be changed again.

	* XmlSchemaSimpleTypeRestriction.cs,
	  XmlSchemaSimpleTypeUnion.cs,
	* XmlSchemaUtil.cs : Consider xdt namespace.

svn path=/trunk/mcs/; revision=32143
2004-08-10 14:25:39 +00:00
Atsushi Eno c396b3e156 2004-07-13 Atsushi Enomoto <[email protected]>
* XmlSchemaBuiltInType.cs, XmlSchemaValidity.cs, XmlTypeCode.cs
	  : fixed annoying enum errors.
	* XmlSchemaCollection.cs : completely delegate to XmlSchemaSet.
	* XmlSchemaSet.cs : sealed classes. Use ListDictionary (avoid annoying
	  order preservation matter). NameTable null check for .ctor().
	  Fill GlobalAttributes, GlobalElements, GlobalTypes correctly.
	  Add(string, XmlReader) checks namespace conflicts, while
	  Add(XmlSchema) does not. Fixed Schemas() return type.

svn path=/trunk/mcs/; revision=31079
2004-07-13 13:42:32 +00:00
Duncan Mak 8fa6e766dd Add MIT license to System.XML.DLL
svn path=/trunk/mcs/; revision=30055
2004-06-21 18:07:31 +00:00
Atsushi Eno 01f2cf3765 2004-05-22 Atsushi Enomoto <[email protected]>
* IXmlSchemaInfo.cs,
	  IXmlType.cs,
	  XmlSchemaDatatypeVariety.cs,
	  XmlSchemaValidity.cs,
	  XmlTypeCode.cs,
	  XmlValueConverter.cs : added.

	* XmlSchemaInfo.cs : removed (.NET 1.2).

	* XmlSchemaBuiltInType.cs,
	  XmlSchemaSet.cs : updated.

svn path=/trunk/mcs/; revision=27883
2004-05-22 16:57:46 +00:00
Martin Baulig dfedf08d98 2004-04-22 Martin Baulig <[email protected]>
Renamed the `NET_1_2' conditional to `NET_2_0' in all files.

svn path=/trunk/mcs/; revision=25877
2004-04-23 02:24:02 +00:00
Atsushi Eno 69cb50914e 2004-01-13 Atsushi Enomoto <[email protected]>
* XmlSchemaObject.cs : Fixed error() not to set severity as Warning.
	* ValidationHandler.cs,
	  XmlSchemaSet.cs,
	  XmlSchemaCollection.cs : Throw exception only in case of errors.
	* XmlSchemaCollection.cs : Remove schema from schemaset if exist.
	  (It might not be good to use schemaset, but keep for a while)
	* XmlSchemaContent.cs,
	  XmlSchemaComplexContentExtension.cs,
	  XmlSchemaComplexContentRestriction.cs,
	  XmlSchemaSimpleContentExtension.cs,
	  XmlSchemaSimpleContentRestriction.cs,
	  : added GetBaseTypeName() and GetParticle() (not used yet).

svn path=/trunk/mcs/; revision=22013
2004-01-13 09:32:18 +00:00
Atsushi Eno 5c8e118b1c 2004-01-09 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs : implemented some members.
	* XmlSchemaCollection.cs : modified to use internal schema set (This
	  class provides more precise schema validation feature and will be
	  commonly used for XPathNavigator2).
	  Added .NET 1.1 .ctor() which takes XmlResolver.
	* XmlSchema.cs : fix related to above changes.
	  Use validation event handler on Read() at all required places.
	  Added .NET 1.1 .ctor() which takes XmlResolver.
	* XmlSchemaComplexType.cs : content type comparison was incorrect.
	  Renamed confusing method.
	* XmlSchemaElement.cs : don't use ContentTypeParticle in
	  CheckRecursion(), where that property might not be determined yet.
	* XmlSchemaGroupBase.cs : Modified ValidateRecurse() a bit (currently
	  no effect)
	* XmlSchemaGroupBase.cs,
	  XmlSchemaChoice.cs,
	  XmlSchemaAll.cs,
	  XmlSchemaSequence.cs : moved CheckRecursion to XmlSchemaGroupBase.
	* XmlSchemaObjectTable.cs : Fixed missing error info.
	* BUGS-MS.txt : Added info a bit.

svn path=/trunk/mcs/; revision=21880
2004-01-09 17:55:57 +00:00
Atsushi Eno 7da15068fd 2003-11-17 Atsushi Enomoto <[email protected]>
* XmlSchemaSet.cs, XmlSchemaBuiltInType.cs : Added .NET 1.2 classes
	  (for convenience of ObjectSpaces stubbing).

svn path=/trunk/mcs/; revision=20120
2003-11-17 17:51:35 +00:00