xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Jensen <kjen...@ellora.com>
Subject Namespace problems in Xerces-J 1.2.2.
Date Sun, 03 Dec 2000 17:55:51 GMT

In Xerces 1.2.2 all my XML documents that use Namespaces are
not parsing correctly. This was not a problem in Xerces 1.2.1.

To illustrate the problem I created a schema that contains
a single element, NSTest, that requires empty content.

I ran DOMFilter with an NSTest.xsd that declares the xmlns:xsd
namespace and refers to schema types using the xsd prefix.
The instance document NSTest.xml produces errors when validated
against this version of NSTest.xsd.

*** NSTest.xml ***

<?xml version="1.0" encoding="UTF-8"?>
<NSTest 
	xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="NSTest.xsd"/>

*** NSTest.xsd with the 'xsd' namespace defined. ***

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">
	<xsd:element name="NSTest">
		<xsd:complexType content="empty"/>
	</xsd:element>
</xsd:schema>


*** DOMFilter output with validation turned on and 'xsd' namespace
defined. ***

NSTest.xml:
<NSTest xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="NSTest.xsd">
[Error] NSTest.xml:5:2: Element type "NSTest" must be declared.


I then modified NSTest.xsd to remove the xmlns:xsd namespace
declaration and ran DOMFilter again. This time NSTest.xml
parsers without any errors.

*** DOMFilter output with validation turned on and 'xsd' namespace
defined. ***

NSTest.xml: <NSTest
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="NSTest.xsd">


I don't know if this is just me or if anyone else is having
problems parsing documents with schemas that use namespaces.

Any help will be much appreciated.

Thanks,

Keith

Keith Jensen
Ellora Software Inc. (an e-MEDx company)
www.e-medx.com
978-784-1153 (w)
978-784-1158 (fax)

Mime
View raw message