Commit Graph
302 Commits
Author SHA1 Message Date
Eberhard Beilharz aa6842b2fc [Sys.Xml] Fix Novell bug #599689
This change fixes #599689
(https://bugzilla.novell.com/show_bug.cgi?id=599689) by making the
output of XmlSchemaException.ToString() match the output under .NET.
2014-02-27 16:33:08 +01:00
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
Atsushi Eno 874d3b1389 Fix bug #12035 - xsi:nil='true' was ignored in some scenario.
"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.
2013-08-08 01:00:10 +09:00
Atsushi Eno 72d14cca36 Fix bug #12469 - add more conversion methods to XmlAtomicValue.
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.
2013-08-07 18:54:03 +09:00
Atsushi Eno 19eac76e6e Fix regression in XmlSchemaValidator (bug #10245): collection misoperation due to parameter renaming. 2013-02-13 21:13:27 +09:00
Marek Safar 8063eb0963 Remove broken profile files 2013-02-12 10:19:10 +01:00
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
Atsushi Eno d763c6242f [xsd] compare attribute string values for enums in normalized form. Fixes bug #9835. 2013-01-30 00:25:35 +09:00
Wojciech Kotlarski 69b0edce31 System.XML: added null arguments validation for targetType and namespaceResolver in System.Xml.Schema.XmlSchemaDatatype.ChangeType methods 2012-06-27 16:31:20 +01:00
Wojciech Kotlarski d38eba96ec System.XML: Partial implementation of XmlSchemaDatatype::ChangeType
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")].
2012-06-27 15:53:25 +01:00
Wojciech Kotlarski 46bf99aa95 System.XML: Remove more NET_2_0 directives 2012-06-27 15:53:24 +01:00
Marek Safar d5d4b9c22b Fix some warnings 2012-06-08 12:48:08 +01:00
Martin Baulig 7d170f400d Sync parameter names with .NET. 2012-06-03 04:02:28 +02:00
Miguel de Icaza ae0feab435 Removal of NET_1_1 defines and some NET_2_0; Both defines are true these days in Mono, no versions prior to 2.0 are supported 2012-06-01 18:04:24 -04:00
Atsushi Eno 8062ba1e7b Fixed bug #3504 - implemented ValidateEndElement() var argument support.
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.
2012-03-09 23:52:34 +09:00
Atsushi Eno 09d3ef3aea Fill XmlSchemaInfo validity for attributes (some were missing). Part of bugfix #3504. 2012-03-09 21:51:19 +09:00
Marek Safar df0eff5b03 Fix few obvious NREs 2011-10-24 10:11:41 +01: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 761ef9d9cf Fixed orders in XmlSchemaObjectTable and got some S.R.Serialization tests working. 2011-05-11 16:34:45 +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 627c31320f Fixed xsd derived simpleType cast failures on uint. Fixed bug #676993. 2011-03-07 13:56:37 +09:00
Atsushi Eno 0d4ad4e387 Simple content restriction was not validated when it is in further reference.
Fixed bug #595947. It was complexType [base]-> complexType [base]-> simpleType.
2011-02-08 20:52:20 +09:00
Atsushi Eno b1be7755df For complexType simpleContent restriction, fill attributes from base type.
Part of bugfix #595947.
2011-02-08 18:31:49 +09:00
Atsushi Eno 051d9bd0de Make sure to clear compiled items. Fixes regressions appeared in WCF land. 2011-02-01 21:23:44 +09:00
Atsushi Eno 3df62f0850 Fix bug #661400 - fix complicated namespace resolution issue.
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.
2011-01-31 18:02:09 +09:00
Atsushi Eno 960484aa14 Use AttributeSchemaType as it is 2.0 API. This fixes incorrectly skipped type validation. 2010-11-30 00:09:13 +09:00
Atsushi Eno d0f2492f2b Handle more type conversion. 2010-11-30 00:08:40 +09:00
Jb Evain 0253e041a7 Enable the System.Xml build for monodroid 2010-09-08 18:48:29 +02:00
Raja R Harinath b293948fb7 EOL handling
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.
2010-07-25 20:17:39 +05:30
Atsushi Eno dc3a99c440 2010-06-14 Atsushi Enomoto <[email protected]>
* 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
2010-06-14 07:35:04 +00:00
Atsushi Eno f577f78eec 2010-06-14 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : fill Validity. Fixed bug #613682.


svn path=/trunk/mcs/; revision=158866
2010-06-14 06:55:54 +00:00
Atsushi Eno a5b5e8ce99 2010-03-15 Atsushi Enomoto <[email protected]>
* 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
2010-03-15 06:12:42 +00:00
Atsushi Eno a3e1748844 2010-02-16 Atsushi Enomoto <[email protected]>
* XmlSchemaComplexType.cs : in modern .NET, xs:anyType has the
	  appropriate qname.


svn path=/trunk/mcs/; revision=151803
2010-02-16 14:26:40 +00:00
Atsushi Eno eede1f63d3 2010-01-27 Atsushi Enomoto <[email protected]>
* 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
2010-01-27 06:32:59 +00:00
Atsushi Eno 569db617bc 2010-01-26 Atsushi Enomoto <[email protected]>
* XmlSchemaComplexType.cs : validate base type first and then
	  validate particle. Patch by Jonas Larsson, fixed bug #502251.


svn path=/trunk/mcs/; revision=150194
2010-01-26 05:59:04 +00: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
Miguel de Icaza 3fc2ac11bc 2009-08-01 Miguel de Icaza <[email protected]>
* Various changes to support the non-XAP XmlSchema resolution on
	the Moonlight build.    

	Major missing feature: WebRequest resolution.

svn path=/trunk/mcs/; revision=139246
2009-08-01 16:31:08 +00:00
Atsushi Eno b330fc8e07 2009-05-19 Jonas Larsson <[email protected]>
* XmlSchemaUtil.cs, BuiltInDatatype.cs, XmlSchemaComplexType.cs:
	  Introduced new MS compatibility option by environment variable,
	  for bug #502115.


svn path=/trunk/mcs/; revision=134397
2009-05-19 14:43:55 +00:00
Atsushi Eno 2e31d6db16 2009-05-19 Atsushi Enomoto <[email protected]>
* 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
2009-05-19 14:30:11 +00:00
Atsushi Eno 1c400f6aa7 2009-05-11 Atsushi Enomoto <[email protected]>
* 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
2009-05-11 17:37:07 +00:00
Atsushi Eno ce01d27dc2 2009-05-11 Atsushi Enomoto <[email protected]>
* 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
2009-05-11 17:12:26 +00:00
Atsushi Eno 8db721b50f 2009-05-07 Jonas Larsson <[email protected]>
* XmlAtomicValue.cs : support more type conversion. fixed bug #501666.

	* XmlSchemaValidatorTests.cs : added test for bug #501666.


svn path=/trunk/mcs/; revision=133903
2009-05-11 16:59:42 +00:00
Atsushi Eno fb729447e3 2009-04-22 Atsushi Enomoto <[email protected]>
* 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
2009-04-22 08:08:52 +00:00
Atsushi Eno 8a93fd5b62 bug # correction.
svn path=/trunk/mcs/; revision=132348
2009-04-22 05:44:56 +00:00
Atsushi Eno 0e439d038d 2009-04-22 Atsushi Enomoto <[email protected]>
* 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
2009-04-22 05:43:28 +00:00
Sebastien Pouliot d37ae0362a 2009-04-21 Sebastien Pouliot <[email protected]>
* XmlSchema_2_1.cs: Add internal fields needed by S.R.S.dll


svn path=/trunk/mcs/; revision=132287
2009-04-21 16:39:44 +00:00
Atsushi Eno 19813940cf 2009-03-17 Atsushi Enomoto <[email protected]>
* XmlSchemaValidator.cs : check identity constraints on default or
	  fixed attributes too.


svn path=/trunk/mcs/; revision=129532
2009-03-17 07:34:10 +00:00
Atsushi Eno 45e218154c 2009-03-16 Atsushi Enomoto <[email protected]>
* 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
2009-03-16 16:13:56 +00:00
Atsushi Eno aff31f7ba1 2009-03-16 Atsushi Enomoto <[email protected]>
* XmlSchemaUtil.cs, XmlSchemaValidator.cs : predefined non-primitive
	  xml schema types now validate fixed values as expected.


svn path=/trunk/mcs/; revision=129443
2009-03-16 14:13:28 +00:00