[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-users
Subject:    Validation error on valid document
From:       Reiner Beck <r.beck () m4com ! de>
Date:       2008-07-10 19:10:04
Message-ID: 48765E8C.5030909 () m4com ! de
[Download RAW message or body]

Hello list,

I get a validation error an a XML document, that is - at least according 
to other XML tools - valid. For example <oxygen/> reports the attached 
document as valid.

The schemas are stripped down to the bare minimum to reproduce the error.

The error can be reproduced by invoking the xerces example:
 > DOMPrint -v=always -n -s invalid.xml
Error at file "/data/xml/XMLSchemas/invalid/invalid.xml", line 9, column 16
   Message: Unknown element 'bb:Status'

Version: Xerces-C 2.8.0.
XML File and Schemas are attached.

Any help is appreciated!

Cheers
Reiner

["invalid.xml" (text/xml)]

<?xml version="1.0" encoding="UTF-8"?>
<XXX 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="aa schema1.xsd"
	xmlns="aa" xmlns:bb="bb">
	
	<Results>
		<bb:Activity>
			<bb:Status/>			
		</bb:Activity>
	</Results>
</XXX>

["schema1.xsd" (text/xml)]

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema 
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns="aa" targetNamespace="aa"
	xmlns:bb="bb"
	elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.25">

	<xs:import namespace="bb" schemaLocation="schema2.xsd"/>
	
	<xs:element name="XXX" type="TypeXX"></xs:element>
	
	<xs:complexType name="TypeXX">
		<xs:sequence>
			<xs:element name="Results">
				<xs:complexType>
					<xs:complexContent>
						<xs:extension base="bb:CategoryType"/>						
					</xs:complexContent>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>	
</xs:schema>

["schema2.xsd" (text/xml)]

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns="bb" targetNamespace="bb"
	elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.26">

	<xs:complexType name="CategoryType">
		<xs:choice>
			<xs:element name="Activity">
				<xs:complexType>
					<xs:complexContent>
						<xs:extension base="Type"/>
					</xs:complexContent>
				</xs:complexType>
			</xs:element>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="Type">
		<xs:sequence>
			<xs:element name="Status"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic