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.
* 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
* 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
* 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
* 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
* XmlSchema.cs, XmlSchemaSet.cs : some minor refactoring to make
Compile() simple two phase (i.e. CompileSubset() and Validate()).
svn path=/trunk/mcs/; revision=63028
* 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
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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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