[Mono-bugs] [Bug 469317] XML schema validation fails when there are more than two schema documents on the same server

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 30 04:23:37 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=469317

User atsushi at ximian.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=469317#c1


Atsushi Enomoto <atsushi at ximian.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|XML schema validation fails |XML schema validation fails
                   |when ValidationType is set  |when there are more than
                   |to Schema                   |two schema documents on the
                   |                            |same server




--- Comment #1 from Atsushi Enomoto <atsushi at ximian.com>  2009-01-30 02:23:35 MST ---
It is rather about schema resolution and network MaxConnection settings. It is
rather a difference in implementation details. .NET likely has sloppy
implementation to read up the entire external DTD and then to parse it. We
process DTD in "streaming" way. Thus, first, xmldsig schema is read (in
streaming mode) from www.w3.org, which contains a reference to XMLSchema.dtd
from www.w3.org, which again has a reference to datatypes.dtd on (again)
www.w3.org.

So, there are more than two documents. And when it tries to get datatypes.dtd,
the XmlUrlResolver simply waits until timeout, and then treats as resource
error (which is ignored) and goes on parsing.

datatypes.dtd contains a definition for "simpleType", which is used in
XMLSchema.dtd line 112. Since it is followed by '|' and is expected to hold a
name while it does not hold anything as this external entity is not parsed
successfully, it contains an empty string and hence DTD reader fails to read a
valid name but gets '|'.

I doubt that it is better to fix this issue just for implementation detail
difference (it causes an ugly change in our XML implementation that dumps
decent streaming entity reader). You can workaround the issue by having more
than 2 maxConnection in your application config file, e.g:

<configuration>
<system.net>
<connectionManagement maxConnection="5">
</system.net>
</configuration>

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list