Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 90454 invoked from network); 2 Apr 2004 21:15:09 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Apr 2004 21:15:09 -0000 Received: (qmail 54378 invoked by uid 500); 2 Apr 2004 21:14:41 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 54254 invoked by uid 500); 2 Apr 2004 21:14:40 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 54174 invoked from network); 2 Apr 2004 21:14:40 -0000 Received: from unknown (HELO smtp.uol.com.br) (200.221.11.59) by daedalus.apache.org with SMTP; 2 Apr 2004 21:14:40 -0000 Received: from Daniela (unknown [200.212.160.131]) by scorpion6.uol.com.br (Postfix) with SMTP id 2580D8CCD for ; Fri, 2 Apr 2004 18:14:39 -0300 (BRT) Message-ID: <033b01c418f7$65b388b0$6509020a@summa.com> From: "Daniela Pistelli Gomes" To: "Jakarta Commons Developers List" References: Subject: Re: Validator/Digester offline validation Date: Fri, 2 Apr 2004 18:13:47 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 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 Rob, I'm using ValidatorResource(InputStream[] is) final InputStream rules = Thread.currentThread().getContextClassLoader() .getResourceAsStream("validator-rules.xml"); final InputStream is = Thread.currentThread().getContextClassLoader() .getResourceAsStream("validation.xml"); return new ValidatorResources(new InputStream[] {rules, is}); Thanks Daniela ----- Original Message ----- From: "rleland@apache.org" To: "Jakarta Commons Developers List" Sent: Friday, April 02, 2004 6:09 PM Subject: Re: Validator/Digester offline validation > > If you use the ValidatorResources(InputStream is) instead of ValidatorResourcesInitializer(), > to read in the validator files, your Validator.xml will be validated for you. > > > -Rob > > > > -----Original Message----- > > From: Daniela Pistelli Gomes [mailto:daniela@summa-tech.com] > > Sent: Friday, April 2, 2004 08:41 PM > > To: commons-dev@jakarta.apache.org > > Subject: Validator/Digester offline validation > > > > Hi, > > > > I'm using commons-validator and commons-digester and I need to validate the validation.xml file > > without internet access and I don't want to remove the doctye tag. > > I knew that I can implement any EntityResolver and set this at Digester, but I don't have any Digester > > instance, my question is, how can I get any Digester instance (or if is possible set the EntityResolver > > by a Digest static method) and them set this Digest for Validator. > > > > At my Validator class I have > > > > private ValidatorResources initResources() throws IOException, SAXException { > > final InputStream rules = Thread.currentThread().getContextClassLoader() > > .getResourceAsStream("validator-rules.xml"); > > final InputStream is = Thread.currentThread().getContextClassLoader() > > .getResourceAsStream("validation.xml"); > > > > try { > > return new ValidatorResources(new InputStream[] {rules, is}); > > } finally { > > if (rules != null) { > > rules.close(); > > } > > > > if (is != null) { > > is.close(); > > } > > } > > } > > > > Thanks for your support > > > > Best Regards > > Daniela > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org