"some scenario" I mean:
- There is a sequence with more than one elements in xsd,
- The second element is nillable and its type has content elements, and
- The corresponding XML element specifies xsi:nil='true'
Then it resulted in a validation error as if it were missing the required
content.
Since XmlAtomicValue is pretty much hidden in the implementation, there is
almost no way to verify how it should work. So the changes are all based on
assumption. Yet I added a test based on bug #12469.
There is still problem on processing *invalid* inputs. They have to be
rejected, but they pass.
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.)
This is not complete but it meets our current validation needs
(better than NIE). The missing stuff is still marked as
[MonoTODO] and [Cattegory("NotWorking")].
It is documented in MSDN and I could implement it.
For the actual implementation of object-to-string conversion, I could pick
up dead old XmlValueConverter class from pre-RTM .NET 2.0(!).
It is now added to the sources where applicable.
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.
Namespaces in nested external schemas have to be validated against
immediately-containing schema. If there is a schema A with urn:x
targetNamespace imports a schema B with urn:y targetNamespace which
in turn includes another schema C, then C must be validated its namespace
against B, not A.
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.
With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
* 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
* 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
* 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
* XmlSchemaComplexType.cs : validate base type first and then
validate particle. Patch by Jonas Larsson, fixed bug #502251.
svn path=/trunk/mcs/; revision=150194
* 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
* Various changes to support the non-XAP XmlSchema resolution on
the Moonlight build.
Major missing feature: WebRequest resolution.
svn path=/trunk/mcs/; revision=139246
* XmlSchemaUtil.cs, BuiltInDatatype.cs, XmlSchemaComplexType.cs:
Introduced new MS compatibility option by environment variable,
for bug #502115.
svn path=/trunk/mcs/; revision=134397
* 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
* 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
* 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
* XmlAtomicValue.cs : support more type conversion. fixed bug #501666.
* XmlSchemaValidatorTests.cs : added test for bug #501666.
svn path=/trunk/mcs/; revision=133903
* 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
* 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
* 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