[Mono-bugs] [Bug 324606] [regression] XPathDocument can' t read from XmlReader positioned at a child node

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Aug 26 20:58:23 EDT 2008


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

User mmorano at mikeandwan.us added comment
https://bugzilla.novell.com/show_bug.cgi?id=324606#c3


Mike Morano <mmorano at mikeandwan.us> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |mmorano at mikeandwan.us
             Status|RESOLVED                                        |REOPENED
         Resolution|FIXED                                           |
            Summary|XPathDocument can't read from XmlReader         |[regression] XPathDocument can't read from
                   |positioned at a child node                      |XmlReader positioned at a child node




--- Comment #3 from Mike Morano <mmorano at mikeandwan.us>  2008-08-26 18:58:21 MDT ---
This last change seems to have caused a regression for me.  I am experiencing
an issue when using the new version (r98446) of TMXPathDocumentBuilder2, and if
I downgrade to (r81158) everything works as expected.  The code I have is part
of a larger application, and works on ms.net, and mono prior to the revision
listed earlier.

My application is validating the XML against an XML Schema, and as it runs
through this process, an unhandled exception is raised.  However, if we comment
out the pieces that associate the XML Schema, so no xsd validation is being
performed, the document can be fully parsed without error.

A simplified test case is attached (xmltest.zip), based on the original test in
this bug report.  By default the test case tries to parse the document using
XSD validation, and will fail with the following exception:


Unhandled Exception: System.InvalidOperationException: Unexpected attempt to
validation state transition from Finished to Content was happened.
  at System.Xml.Schema.XmlSchemaValidator.CheckState (Transition expected)
[0x00000] 
  at System.Xml.Schema.XmlSchemaValidator.EndValidation () [0x00000] 
  at Mono.Xml.Schema.XmlSchemaValidatingReader.Read () [0x00000] 
  at Mono.Xml.XPath.DTMXPathDocumentBuilder2.Compile () [0x00000] 
  at Mono.Xml.XPath.DTMXPathDocumentBuilder2.Init (System.Xml.XmlReader reader,
XmlSpace space, Int32 defaultCapacity) [0x00000] 
  at Mono.Xml.XPath.DTMXPathDocumentBuilder2..ctor (System.Xml.XmlReader
reader, XmlSpace space, Int32 defaultCapacity) [0x00000] 
  at Mono.Xml.XPath.DTMXPathDocumentBuilder2..ctor (System.Xml.XmlReader
reader, XmlSpace space) [0x00000] 
  at System.Xml.XPath.XPathDocument.Initialize (System.Xml.XmlReader reader,
XmlSpace space) [0x00000] 
  at System.Xml.XPath.XPathDocument..ctor (System.Xml.XmlReader reader,
XmlSpace space) [0x00000] 
  at System.Xml.XPath.XPathDocument..ctor (System.Xml.XmlReader reader)
[0x00000] 
  at Test.Main () [0x00000] 


However, if you then just comment out lines 15-17 (that associates the schema
to the settings, and then run the code again, it completes successfully.


Thanks,
Mike


-- 
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