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
* XmlSchema.cs, XmlSchemaAll.cs, XmlSchemaAnnotated.cs,
XmlSchemaAnnotation.cs, XmlSchemaAny.cs, XmlSchemaAnyAttribute.cs,
XmlSchemaAttribute.cs, XmlSchemaAttributeGroup.cs,
XmlSchemaAttributeGroupRef.cs, XmlSchemaChoice.cs,
XmlSchemaComplexContent.cs, XmlSchemaComplexContentExtension.cs,
XmlSchemaComplexContentRestriction.cs, XmlSchemaComplexType.cs,
XmlSchemaElement.cs, XmlSchemaGroup.cs, XmlSchemaGroupRef.cs,
XmlSchemaIdentityConstraint.cs, XmlSchemaImport.cs,
XmlSchemaInclude.cs, XmlSchemaKey.cs, XmlSchemaKeyref.cs,
XmlSchemaNotation.cs, XmlSchemaObject.cs, XmlSchemaRedefine.cs,
XmlSchemaSequence.cs, XmlSchemaSimpleContent.cs,
XmlSchemaSimpleContentExtension.cs,
XmlSchemaSimpleContentRestriction.cs, XmlSchemaSimpleType.cs,
XmlSchemaSimpleTypeList.cs, XmlSchemaSimpleTypeRestriction.cs,
XmlSchemaSimpleTypeUnion.cs, XmlSchemaUnique.cs,
XmlSchemaXPath.cs,
As to Compile() and Validate(),
- Added CompilationId and check it while compiling schema components.
- Code refactory. Replaced literal xmlns with XmlSchema.Namespace
- Replaced XmlSchemaInfo with compiling XmlSchema itself (XmlSchema
also has PSVI components inside it, so passing itself seems enough).
- Related to above change, IDCollection was moved to XmlSchema, and
blockDefault/finalDefault/blockResolved/finalResolved resolution
was changed to reference only to schema.BlockDefault/FinalDefault.
- The similar change has done against XmlSchemaForm related stuff.
- Changed compilation order of schema type definitions (it is
workaround). First it compiles types, and then it compiles others.
* XmlSchemaElement.cs : added ElementType PSVI contribution support.
svn path=/trunk/mcs/; revision=16435
* XmlSchemaAnnotation.cs : expect the correct closing tag on <appinfo>
and <documentation> elements. (patch by Peter Pentchev)
* XmlSchemaObjectEnumerator.cs : cast properly to XmlSchemaObject
instead of XmlSchema. (patch by Peter Pentchev)
svn path=/trunk/mcs/; revision=11699
* XmlSchema: The Read and Write methods are no more [MonoTODO] :)
* XmlSchemaAppInfo: Xml Markup is now being read.
* XmlSchemaDocumentation: Xml Markup is now being read.
* All: Unhandled attributes are being handled properly.
* All: Reordered the properties in all cs files to match with MS
Implementation. This was required since the order is importatnt
for the XmlSerializer.
svn path=/trunk/mcs/; revision=5322
* XmlSchemaReader: A Wrapper class around XmlReader with customized
methods to suit reading a schema.
* General: Implemented Read() method for the schema. There are only
a few minor bugs remaining.
svn path=/trunk/mcs/; revision=5200
* BUGS.txt: New file to keep track of bugs
* ALL: All classes are initialized exactly as in .NET except
1. inclusion of language attribute in schema
2. ComplexContent's Particle is initialized to null whereas .NET
to some internal implementation. IMO Null is more appropriate
* ALL: Changed the Compile methods to return the count of errors.
* ALL: Complile methods are almost complete. Pass 1453 of 3061 tests.
This number should shoot up if we write a parser to read the
Schema instead of using reflection (which is slower too)
svn path=/trunk/mcs/; revision=4926