Hi Henry,
 
Thanks for help. I used default handler but default handler eats Exception and does nothing. I see why now.
 
Thanks.
 
Bozhong
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 2:16 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: validating XML against local subset of DTD



Hi Bozhong,

     I assume the error is that the "author" attribute hasn't been declared.  When I try the sax.SAXCount sample with the -v option, I see the following error message:

[Error] blin.xml:7:37: Attribute "author" must be declared for element type "hello".

     Have you registered an ErrorHandler with the parser?  It's a very common problem people run into.  See FAQ #5:

http://xml.apache.org/xerces-j/faq-write.html#faq-5

     I hope that helps.

Thanks,

Henry
------------------------------------------------------------------------
Henry Zongaro      XML Parsers development
IBM SWS Toronto Lab   Tie Line 778-6044;  Phone (416) 448-6044
mailto:[EMAIL PROTECTED]

Please respond to [EMAIL PROTECTED]

To:        "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:        
Subject:        validating XML against local subset of DTD


Hello,

I try to use validating parser to do XML validation against
local subset of DTD, but it seems that XercesJ can't detect
error in following trivial document:

<!DOCTYPE hello [
                <!ELEMENT hello (#PCDATA)>
                <!ATTLIST hello
                version CDATA #FIXED "1.0"
>
]>
<hello version="1.0" author="blin"/>

If I open above document in XML spy, it will show error.
Do you have any idea why? Thanks.

Bozhong

Reply via email to