Commit Graph
43 Commits
Author SHA1 Message Date
Atsushi Eno acdf48cf71 fix bug #6653: change xs component validation logic regarding recursion check.
Originally this implementation checked recursion based on RELAX NG-inspired
algorithm explained at http://www.thaiopensource.com/relaxng/simplify.html.

This works only for "simple" syntax, which premises that every <element> is
defined under top-level <define> element. XML Schema doesn't follow this
and could result in infinite loop like reported.

The latest REC-xmlschema-1 denotes the explicit rule on illegal recursion
on 3.8.6 (Model Group Correct) as:

2 Circular groups are disallowed. That is, within the {particles} of a group there must not be at any depth a particle whose {term} is the group itself.

... so, I simply replaced the checker with simple Stack.

(oh, and for old Stack I haven't bothered to replace non-generic collection
everywhere. XSD is as dead as System.Collection.)
2013-02-08 20:19:14 +09:00
Marek Safar df0eff5b03 Fix few obvious NREs 2011-10-24 10:11:41 +01: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 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 1d3440fc5d sanitizing MonoTODOs.
svn path=/trunk/mcs/; revision=67899
2006-11-15 11:31:25 +00:00
Atsushi Eno d4545913a0 Now we can safely set eol-style:native.
svn path=/trunk/mcs/; revision=67665
2006-11-10 10:28:24 +00:00
Atsushi Eno 56e9bba3ea This namespace is a horrible nest of mixed line endings :-(
svn path=/trunk/mcs/; revision=67664
2006-11-10 10:27:11 +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 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 906d303f75 2005-12-01 Atsushi Enomoto <[email protected]>
* XmlSchemaElement.cs : Fixed ambiguity detection logic so that
	  chameleon ##other (xs:any) does not block other "absent"
	  (empty targetNamespace) element. Fixed bug #76865.

	* XmlSchemaTests.cs : added testcase for #76865.


svn path=/trunk/mcs/; revision=53746
2005-12-01 04:46:45 +00:00
Gert Driesen c631bfb0eb * XmlSchema.cs: XmlElementAttribute, XmlAttributeAttribute and
DefaultValueAttribute corrections to match MS.NET.
* XmlSchemaAll.cs:
* XmlSchemaAnnotated.cs:
* XmlSchemaAnnotation.cs:
* XmlSchemaAppInfo.cs:
* XmlSchemaAttribute.cs:
* XmlSchemaAttributeGroup.cs:
* XmlSchemaChoice.cs:
* XmlSchemaComplexContent.cs:
* XmlSchemaComplexContentExtension.cs:
* XmlSchemaComplexContentRestriction.cs:
* XmlSchemaComplexType.cs:
* XmlSchemaDocumentation.cs:
* XmlSchemaElement.cs:
* XmlSchemaExternal.cs:
* XmlSchemaGroup.cs:
* XmlSchemaIdentityConstraint.cs:
* XmlSchemaImport.cs:
* XmlSchemaInclude.cs:
* XmlSchemaRedefine.cs:
* XmlSchemaSequence.cs:
* XmlSchemaSimpleContent.cs:
* XmlSchemaSimpleContentExtension.cs:
* XmlSchemaSimpleContentRestriction.cs:
* XmlSchemaSimpleType.cs:
* XmlSchemaSimpleTypeList.cs:
* XmlSchemaSimpleTypeRestriction.cs:
* XmlSchemaSimpleTypeUnion.cs:
* XmlSchemaXPath.cs:

svn path=/trunk/mcs/; revision=48074
2005-08-07 08:57:05 +00:00
Ben Maurer 0e8decdb37 remove svn:executable from .cs files
svn path=/trunk/mcs/; revision=46562
2005-06-27 15:51:40 +00:00
Atsushi Eno 97d56f4694 2004-12-04 Atsushi Enomoto <[email protected]>
* XmlSchemaObject.cs : added Parent.
	* XmlSchema.cs,
	  XmlSchemaElement.cs,
	  XmlSchemaAttribute.cs,
	  XmlSchemaAttributeGroup.cs,
	  XmlSchemaGroup.cs,
	  XmlSchemaComplexType.cs,
	  XmlSchemaSequence.cs,
	  XmlSchemaChoice.cs,
	  XmlSchemaAll.cs,
	  XmlSchemaIdentityConstraint.cs,
	  XmlSchemaComplexContent.cs,
	  XmlSchemaSimpleContent.cs,
	  XmlSchemaSimpleContentExtension.cs,
	  XmlSchemaSimpleContentRestriction.cs,
	  XmlSchemaComplexContentExtension.cs,
	  XmlSchemaComplexContentRestriction.cs,
	  XmlSchemaSimpleType.cs,
	  XmlSchemaSimpleTypeRestriction.cs,
	  XmlSchemaSimpleTypeList.cs,
	  XmlSchemaSimpleTypeUnion.cs : Fill Parent on Compilation.

	* XmlSchemaException.cs,
	  XmlSchemaInferenceException.cs,
	  XmlSchemaValidationException.cs : added SecurityPermissionAttribute.



svn path=/trunk/mcs/; revision=37094
2004-12-04 19:25:02 +00:00
Atsushi Eno 5a8d83435a 2004-11-25 Atsushi Enomoto <[email protected]>
* XmlSchemaElement.cs,
	  XmlSchemaComplexType.cs,
	  XmlSchema.cs,
	  XmlSchemaChoice.cs,
	  XmlSchemaSimpleType.cs,
	  XmlSchemaObjectTable.cs,
	  XmlSchemaObjectCollection.cs,
	  XmlSchemaCollection.cs,
	  : All changes are just for warning removal.



svn path=/trunk/mcs/; revision=36586
2004-11-26 02:47:17 +00:00
Atsushi Eno e0532e3019 2004-10-29 Atsushi Enomoto <[email protected]>
* XmlSchemaAttribute.cs : AttributeSchemaType could be determined on
	  compilation time. AttributeType is obsolete.
	* XmlSchemaElement.cs : ditto for ElementSchemaType and ElementType.

svn path=/trunk/mcs/; revision=35447
2004-10-29 12:21:38 +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 adb3e06e63 2004-07-23 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : Added internal XdtNamespace constant. don't fill
	  schemaset compoenents here.
	* XmlSchemaAttribute.cs : Implemented AttributeSchemaType.
	* XmlSchemaElement.cs : Implemented ElementSchemaType.
	* XmlSchemaSimpleType.cs : Added predefined simple types
	* XmlSchemaType.cs : Implemented GetBuiltInSimpleType().
	* XmlSchemaDatatype.cs : Allow Xdt namespaces too (not completed;
	  quick fix for GetBuiltInSimpleType()).

svn path=/trunk/mcs/; revision=31415
2004-07-23 16:07:03 +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
Ben Maurer bc37e00fc3 constify
svn path=/trunk/mcs/; revision=26464
2004-04-30 20:46:43 +00:00
Atsushi Eno 279ee7f9e6 2004-01-22 Atsushi Enomoto <[email protected]>
* BuiltInDatatype.cs : On parsing QName, we don't have to spend costs
	  on Add()ing parsed name to name table.
	* XmlSchemaUtil.cs : Added IsBuiltInDatatypeName().
	* XmlSchemaAttribute.cs, XmlSchemaComplexType.cs,
	  XmlSchemaElement.cs, XmlSchemaSimpleContentExtension.cs,
	  XmlSchemaSimpleContentRestriction.cs, XmlSchemaSimpleTypeList.cs :
	  Use the method above instead of Namespace string comparison.
	  (it will be required to validate schema for schemas.)
	* XmlSchemaComplexType.cs : Type Derivation OK (3.4.6) should also
	  treat null base type as anyType.  Derivation Valid Restriction
	  (3.4.6) should allow base type wildcard absense in case of anyType.

svn path=/trunk/mcs/; revision=22406
2004-01-22 16:31:31 +00:00
Atsushi Eno b8eda76bbd 2004-01-22 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : When we have schema A which includes schema B which
	  includes schema C (i.e. A->B->C), C components should be compiled.
	  Here, same URL inclusions are ignored.
	* XmlSchemaElement.cs : Hack for missing substitution-group fix.
	* XmlSchemaSimpleTypeContent.cs : make actualBaseSchemaType private
	  and initialize. This fixes bug #53178.
	* XmlSchemaSimpleTypeUnion.cs : Forgot to commit ;)

svn path=/trunk/mcs/; revision=22389
2004-01-22 09:26:02 +00:00
Atsushi Eno ccd5f38514 2004-01-21 Atsushi Enomoto <[email protected]>
* XmlSchema.cs :
	  - Removed extra property Language.  Fill substitution-group info
	    before ContentTypeParticle is computed.
	* XmlSchemaComplexType.cs : ContentType and ContentTypeParticle are
	  now computer before Validate() (to exclude 3.4.2 from 3.4.6
	  component constraint check).
	* XmlSchemaObject.cs, XmlSchemaParticle.cs :
	  Added CopyInfo() for cloning objects.
	* XmlSchemaObjectTable.cs :
	  Add() doesn't have to reject same named items.
	* XmlSchemaParticle.cs :
	  - Renamed internal class XmlSchemaParticleEmpty to EmptyParticle
	    (for ease of post compilation infoset comparison).
	  - GetMinEffectiveTotalRange() should return max occurs for element and
	    any.
	* XmlSchemaParticle.cs,
	  XmlSchemaAll.cs,
	  XmlSchemaAny.cs,
	  XmlSchemaChoice.cs,
	  XmlSchemaElement.cs,
	  XmlSchemaGroupBase.cs,
	  XmlSchemaGroupRef.cs,
	  XmlSchemaSequence.cs :
	  - Removed ActualParticle property.
	  - Added GetOptimizedParticle() to get ContentTypeParticle.
	  - ContentTypeParticle is now created as different object from
	    user-specified "Particle" property.
	  - Return Empty particle when model groups contains no Items.
	  - When Items contains exactly 1 item, return the item (unless it is
	    top level choice model group - it causes DBR problem).
	  - ValidateDerivationValidRestriction() and related WXS 3.9.6 DBR
	    check methods such as ValidateNSRecurseCheckCardinality() now
	    returns a bool value and avoids exceptions on each failure time.
	  - ValidateRecurse() now doesn't progress base particle incorrectly.
	    (it caused incorrect order-preserving-mapping error.)
	  - 3.9.6 Recurse, RecurseLax, MapAndSum are now treated as different.
	* XmlSchemaAll.cs : occurence validation shoud be done against values
	  after computation (ValidatedMaxOccurs).
	* XmlSchemaChoice.cs : When Items is empty, then invoke warning event.
	* XmlSchemaElement.cs :
	  - Consider referencedElement also for SubstitutionGroupElement.
	  - Removed SubstitutingChoice which is not in use.
	  - when it was targeted as substitution group by other elements, its
	    ContentTypeParticle should be substitution choice (see 3.9.6
	    Particle Valid (Restriction) term 2.1).
	  - Added FillsubstitutionElementInfo() (see XmlSchema.cs above).
	* XmlSchemaGroup.cs : Removed extra check on model group (because it
	  is impossible to specify non-model-group particle).
	* XmlSchemaIdentityConstraint.cs,
	  XmlSchemaKey.cs,
	  XmlSchemaKeyRef.cs,
	  XmlSchemaUnique.cs : Removed extraneous MonoTODO.
	* XmlSchemaSimpleContent.cs : Made actualSchemaType as internal.
	* XmlSchemaSimpleType.cs : Removed extraneous new Datatype property.
	* XmlSchemaSimpleTypeRestriction.cs : Renamed actualBaseSchemaType to
	  ActualBaseSchemaType.
	* XmlSchemaSimpleTypeList.cs, XmlSchemaSimpleTypeUnion.cs :
	  Removed unused actualBaseSchemaType code.
	* XmlSchemaType.cs : use recently introduced BaseXmlSchemaType.
	* XmlSchemaUtil.cs : Removed unused CheckLanguage().

svn path=/trunk/mcs/; revision=22323
2004-01-21 08:06:51 +00:00
Atsushi Eno d6ba3804b6 2004-01-13 Atsushi Enomoto <[email protected]>
* XmlSchemaSimpleTypeUnion.cs : The same reason as the previous patch.
	* XmlSchemaComplexType.cs : Now it handles ContentTypeParticle and
	  ContentType much more presise than before.
	* XmlSchemaElement.cs :
	  Simplified property handling for reference element.

svn path=/trunk/mcs/; revision=22024
2004-01-13 18:22:49 +00:00
Atsushi Eno 9815687aa9 2004-01-13 Atsushi Enomoto <[email protected]>
* XmlSchema.cs, XmlSchemaComplexType.cs, XmlSchemaElement.cs :
	  Invalid attribute should raise an error, not a warning.

svn path=/trunk/mcs/; revision=22014
2004-01-13 10:27:20 +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 1a7c6363d7 2004-01-08 Atsushi Enomoto <[email protected]>
* XmlSchemaElement.cs : Fixed incorrect unique particle attribution
	  check on ##other and target namespace element.

svn path=/trunk/mcs/; revision=21824
2004-01-07 17:58:48 +00:00
Atsushi Eno ad50df28e4 2003-10-25 Atsushi Enomoto <[email protected]>
* BuiltInDatatype.cs : XsdByte was incorrectly typed as byte, while
	  the correct binding is sbyte.
	* XmlSchemaAll.cs,
	  XmlSchemaChoice.cs,
	  XmlSchemaSequence.cs,
	  XmlSchemaGroupBase.cs : ActualParticle now considers pointlessness
	  described in WXS structures 3.9.6.
	  Added ValidateRecurse() to support 'Recurse' validation.
	* XmlSchemaComplexType.cs : Removed incorrect content type conformity
	  check.
	* XmlSchemaElement.cs : Implemented 'RecurseAsIfGroup' validation
	  described in WXS structures 3.9.6.  Fixed type derivation check to
	  do only if the base type is not anyType.
	* XmlSchemaSimpleTypeRestriction.cs : Should catch Regex()
	  construction exception. ValidateList... and ValidateNonList... was
	  in reverse.
	* XmlSchemaUtil.cs : Removed extra MonoTODO. Removed CheckToken().

svn path=/trunk/mcs/; revision=19385
2003-10-25 15:54:50 +00:00
Atsushi Eno 3131a7917e 2003-10-23 Atsushi Enomoto <[email protected]>
* XmlSchemaAll.cs,
	  XmlSchemaChoice.cs,
	  XmlSchemaGroupBase.cs,
	  XmlSchemaSequence.cs : Now CompiledItems went to XmlSchemaGroupBase.
	* XmlSchemaAny.cs,
	  XmlSchemaElement.cs,
	  XmlSchemaGroupBase.cs,
	  XmlSchemaGroupRef.cs,
	  XmlSchemaParticle.cs,
	  XmlSchemaSequence.cs : Added ParticleEquals() method to compare
	  whether the particles are equal in the context of WXS part 1 - 3.9.6.
	* XmlSchemaAny.cs : Implemented ValidateDerivationByRestriction().
	* XmlSchemaAnyAttribute.cs : Removed extraneous lines and added my
	  responsibility on this class.
	  Added ValidateWildcardAllowsNamespaceName().
	* XmlSchemaAttribute.cs : Added ValidatedUse which holds post-
	  compilation value of "Use".
	* XmlSchemaAttributeGroup.cs,
	  XmlSchemaAttributeGroupRef.cs : Removed MonoTODO (same as some other
	  classes) since there is no more errors on attribute stuff ;-)
	* XmlSchemaComplexType.cs : complex content extension must block
	  derivation from any built-in primitive types.
	  Fixed wildcard derivation by restriction.
	  ValidateDerivationByRestriction() now checks attribute related
	  validity of DBR (derivation by restriction).
	  Now uses ParticleEquals() for particle DBR check.
	* XmlSchemaSequence.cs : Fixed to use CompiledItems instead of Items.

svn path=/trunk/mcs/; revision=19347
2003-10-23 16:01:27 +00:00
Atsushi Eno 8282466898 2003-10-01 Atsushi Enomoto <[email protected]>
* XmlSchemaAttribute.cs, XmlSchemaComplexType.cs, XmlSchemaElement.cs,
	  XmlSchemaGroupRef.cs, XmlSchemaSimpleContentExtension.cs,
	  XmlSchemaSimpleContentRestriction.cs, XmlSchemaSimpleTypeContent.cs,
	  XmlSchemaSimpleTypeList.cs, XmlSchemaSimpleTypeUnion.cs :
	  Fixed missing sub components check. It should fix soap stuff.
	* XmlSchemaAny.cs, XmlSchemaAttribute.cs,
	  XmlSchemaAttributeGroupRef.cs, XmlSchemaContent.cs :
	  Added my responsibility on them ;-)

svn path=/trunk/mcs/; revision=18463
2003-10-01 02:58:13 +00:00
Atsushi Eno c62c061680 2003-09-30 Atsushi Enomoto <[email protected]>
* Forgot to append 8/24/2003 ChangeLog.
	* BUGS.txt, BUGS-MS.txt : Appended additional bug info.
	* BuiltInDatatype.cs, ValidationHandler.cs, XmlSchema.cs,
	  XmlSchemaAll.cs, XmlSchemaAnnotation.cs. XmlSchemaAny.cs,
	  XmlSchemaAnyAttribute.cs, XmlSchemaAttribute.cs,
	  XmlSchemaAttributeGroup.cs, XmlSchemaAttributeGroupRef.cs,
	  XmlSchemaChoice.cs, XmlSchemaCollection.cs,
	  XmlSchemaComplexContent.cs, XmlSchemaComplexContentExtension.cs,
	  XmlSchemaComplexContentRestriction.cs, XmlSchemaComplexType.cs,
	  XmlSchemaContent.cs, XmlSchemaDatatype.cs, XmlSchemaElement.cs,
	  XmlSchemaException.cs, XmlSchemaGroup.cs, XmlSchemaGroupBase.cs,
	  XmlSchemaGroupRef.cs, XmlSchemaIdentityConstraint.cs,
	  XmlSchemaKey.cs, XmlSchemaKeyref.cs, XmlSchemaNotation.cs,
	  XmlSchemaObject.cs, XmlSchemaObjectTable.cs, XmlSchemaParticle.cs,
	  XmlSchemaReader.cs, XmlSchemaSequence.cs, XmlSchemaSimpleContent.cs,
	  XmlSchemaSimpleContentExtension.cs,
	  XmlSchemaSimpleContentRestriction.cs, XmlSchemaSimpleType.cs,
	  XmlSchemaSimpleTypeContent.cs, XmlSchemaSimpleTypeList.cs,
	  XmlSchemaSimpleTypeRestriction.cs, XmlSchemaSimpleTypeUnion.cs,
	  XmlSchemaType.cs, XmlSchemaUnique.cs, XmlSchemaUtil.cs,
	  XmlSchemaXPath.cs :

	  - Almost all classes are changed to implement schema component
	    constraints, and schema validation using XsdValidatingReader.
	  - better exception messages.
	  - More datatype support.
	  and so on.

svn path=/trunk/mcs/; revision=18444
2003-09-30 19:17:56 +00:00
Atsushi Eno 02021a0c54 2003-08-02 Atsushi Enomoto <[email protected]>
* XmlSchema.cs :
	  - Changed missingElementTypeRefs from Hashtable to ArrayList.
	  - Added internal XmlSchemas for keeping imported schemas.
	  - Added private Compile() that takes the original rootSchema and
	    schema location stack for nested inclusion check.
	  - Added basic xs:import and xs:include support.
	  - Compile() is now aware of included XmlSchemaObject items.
	  - Changed Compile() to fill missing elements' types and that of
	    referencing elements.
	  - Read() now adds SourceUri property (although only to itself).
	* XmlSchemaCollection.cs : Implemented Add().
	* XmlSchemaCollectionEnumerator.cs :
	  Changed .ctor() to use schema collection as its argument.
	  Fixed Current to return hashtable's Value, instead of Current
	  (which returns DictionaryEntry).
	* XmlSchemaComplexType.cs :
	  Added internal static AnyType.
	  Compile() is now searches for its base type into other schemas.
	* XmlSchemaElement.cs : anyType is supported.
	  It now searches for type information after Compile().
	  SetReferedElementInfo() is now changed to SetSchemaType().
	* XmlSchemaObjectTable.cs :
	  It had problems similar to schema collection. Now it uses internal
	  class XmlSchemaObjectTableEnumerator to support GetEnumerator().
	* XmlSchemaParticle.cs : added internal class XmlSchemaParticleEmpty
	  and internal static Empty.

svn path=/trunk/mcs/; revision=17000
2003-08-02 06:31:47 +00:00
Atsushi Eno 4afc5cdaf6 2003-07-21 Atsushi Enomoto <[email protected]>
* XmlSchema.cs, XmlSchemaElement.cs :
	  added internal MissingElementTypeRefs and support for refering
	  element's elementType.

svn path=/trunk/mcs/; revision=16467
2003-07-21 02:25:08 +00:00
Atsushi Eno d51892ae10 2003-07-19 Atsushi Enomoto <[email protected]>
* 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
2003-07-19 18:40:45 +00:00
Ajay kumar Dwivedi b0729d1659 2002-06-18 Dwivedi, Ajay kumar <[email protected]>
* 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
2002-06-18 10:47:40 +00:00
Ajay kumar Dwivedi d22745d614 2002-06-14 Dwivedi, Ajay kumar <[email protected]>
* General: Fixed a few more Bugs

svn path=/trunk/mcs/; revision=5280
2002-06-14 10:42:02 +00:00
Ajay kumar Dwivedi 74f114a665 2002-06-10 Dwivedi, Ajay kumar <[email protected]>
* 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
2002-06-10 08:36:16 +00:00
Ajay kumar Dwivedi ac520c1140 2002-05-25 Dwivedi, Ajay kumar <[email protected]>
* 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
2002-05-25 00:02:55 +00:00
Duncan Mak e3d5655992 2002-04-26 Duncan Mak <[email protected]>
* ValidationHandler.cs: New file.

	* XmlSchemaInfo.cs: New file.

	* *.cs: More updates from Ajay.

svn path=/trunk/mcs/; revision=4075
2002-04-26 21:39:13 +00:00
Duncan Mak bbca9ecade 2002-03-27 Duncan Mak <[email protected]>
* *.cs: Updates from Ajay Dwivedi <[email protected]>.

svn path=/trunk/mcs/; revision=3383
2002-03-27 02:06:09 +00:00
Miguel de Icaza aa2c54ee1f Add System.Xml.Schema from Ajay
svn path=/trunk/mcs/; revision=3216
2002-03-19 15:27:27 +00:00