You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Takahide Muramoto <mu...@flab.fujitsu.co.jp> on 2001/03/12 09:18:57 UTC

Validation and Namespaces

I write to this mailing list for the first time. Please answer to
my question.

Parsing the following XML file after setting two features by the
methods; setFeature("http://xml.org/sax/features/validation", true)
and setFeature("http://xml.org/sax/features/namespaces", false),
the SAXException, Attribute "xmlns:sax2A" must be declared for
element type "sax2A:root" is caught.

Next, Parsing the same file after setting two features by the
methods; setFeature("http://xml.org/sax/features/validation", true)
and setFeature("http://xml.org/sax/features/namespaces", true),
the same exception isn't caught.

In both cases, the same SAXException is caught, isn't it?


[Test Environment]
Product: Xerces-J
Version: 1.3.0
Platform: PC
OS: Windows 2000
Version(JDK): 1.2.2

[Sample XML file]
<?xml version="1.0"?>
<!DOCTYPE sax2A:root[
<!ELEMENT sax2A:root (sax2A:document)>
<!ELEMENT sax2A:document (#PCDATA)>
<!ATTLIST sax2A:document sax2A:attr1 CDATA #IMPLIED
                          sax2A:attr2 CDATA #IMPLIED>
<!ENTITY sax "ddd">
]>
<sax2A:root xmlns:sax2A=  "http://www.foo.com/test">
           <sax2A:document sax2A:attr1="0"
sax2A:attr2="&sax;">AAAAAAAA</sax2A:document>
           <?browser break?>
</sax2A:root>
---
Takahide Muramoto   ISA Lab, Fujitsu Laboratories LTD.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org