commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <si...@ecnetwork.co.nz>
Subject Re: [Digester] using Schema Validation
Date Wed, 28 Apr 2004 23:50:05 GMT
On Thu, 2004-04-29 at 08:45, Thyr wrote:
> Hello,
> 
> I have searched the mailing archive and found that Schema Validation
> using Digester is also a problem to others. But all the answers did not
> help me getting digester use my schema to validate the xml-file.

I would personally avoid using digester for schema validation at all.

The Digester class extends the sax DefaultHandler class, so I suggest: 
(a) create your SAXParser using the normal JAXP methods
(b) set up validation, schema language, enable namespaces, etc 
    for that parser using the normal JAXP methods
(c) set up digester's rules as normal
(d) call parser.parse(src, digester) to get the parser to process the
    input and pass the sax events to the digester.

This way all the parser configuration is done using the normal
parser APIs, and not Digester ones (and if your validation doesn't
work right, then it is nothing to do with digester).

Regards,

Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message