Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 29560 invoked from network); 28 Apr 2004 23:50:21 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 28 Apr 2004 23:50:21 -0000 Received: (qmail 24126 invoked by uid 500); 28 Apr 2004 23:49:59 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 24100 invoked by uid 500); 28 Apr 2004 23:49:59 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 24054 invoked from network); 28 Apr 2004 23:49:59 -0000 Received: from unknown (HELO unxcoms01.ecnetwork.co.nz) (202.135.116.201) by daedalus.apache.org with SMTP; 28 Apr 2004 23:49:59 -0000 Received: from serpent.ecnetwork.co.nz (serpent [202.135.190.10]) by unxcoms01.ecnetwork.co.nz (8.12.8/8.12.8) with ESMTP id i3SNo5vu023384 for ; Thu, 29 Apr 2004 11:50:05 +1200 Received: from pcjohns.ecnnz.ecnetwork.co.nz (unknown [202.135.190.30]) by serpent.ecnetwork.co.nz (Postfix) with ESMTP id 52CE91035 for ; Thu, 29 Apr 2004 11:57:59 +1200 (NZST) Subject: Re: [Digester] using Schema Validation From: Simon Kitching To: Jakarta Commons Users List In-Reply-To: <001601c42d61$cbcd17f0$6400a8c0@cnmark2> References: <001601c42d61$cbcd17f0$6400a8c0@cnmark2> Content-Type: text/plain Message-Id: <1083196204.10543.91.camel@pcsimon> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 29 Apr 2004 11:50:05 +1200 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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