DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7297>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7297

validation of schema included in document fails with improper error





------- Additional Comments From [EMAIL PROTECTED]  2002-03-21 19:16 -------
The case of included schemas reported earlier seems to be a specific case of a 
more general problem with <any>.  Here's another test schema:

---
<schema targetNamespace='http://www.fred.com'
    xmlns='http://www.w3.org/2001/XMLSchema'
    xmlns:root='http://www.fred.com'
    elementFormDefault='qualified'
    version='1.0.0'>

    <element name='root'>
        <complexType>
            <sequence maxOccurs='unbounded'>
                <element name='stuff'>
                    <complexType>
                        <sequence>
                            <any processContents='lax'/>
                        </sequence>
                    </complexType>
                </element>
            </sequence>
        </complexType>
    </element>
</schema>
---

Here's a test document:

---
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<root xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xsi:schemaLocation='http://www.fred.com ./Root.xsd'
    xmlns:root='http://www.fred.com'
    xmlns='http://www.fred.com'>
    <stuff>
        <fred>
            <goop value='TestValue'/>
        </fred>
    </stuff>
    <stuff>
        <fred>
            <gook value='TestValue'/>
        </fred>
    </stuff>
</root>
---

Parsing it with the code previously specified yields:

---
Parsing file 'Test2.xml.'Parse operation:  Error parsing file "D:\tim\work\Playg
round\XmlStuff\Test2.xml", line 13, column 38
   Message: Unknown element 'gook'; error = 0x2
---

In general, the parser complains about the first attribute or child element of 
whatever is included for the second element that the schema defines as having 
<any> content.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to