I'm posting this over here in case anyone could look into this and
perhaps fix Validator if it needs it.
Thanks,
Erik
-------- Original Message --------
Subject: Re: [Validator] [Fwd: Validation XML DTD failure when offline]
Date: Mon, 9 Sep 2002 14:22:19 +0100
From: "James Strachan" <[EMAIL PROTECTED]>
Reply-To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
<005e01c257e0$3b5e6cd0$[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
Digester has a method register(String publicUD, String entityURL) which
allows DTDs to be registered with a Digester so that it can load DTDs from
local URLs to work in offline mode and avoid unncessary network
communication.
I don't know Commons Validator code base but it sounds like maybe Validator
needs to use this method and include the DTD in its jar?
James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Erik Hatcher" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 12:37 PM
Subject: Re: [Validator] [Fwd: Validation XML DTD failure when offline]
> James - thanks... and yes, I understand the entity resolver thing.
>
> But my main question is, how can do I get that working for Validator, as
> its using Digester and such to validate and its beyond my direct control
> as thats under the hood of the Struts Validator plugin and into the
> Commons Validator code.
>
> I'm hoping there is some way to control this from the outside. For
> example, Struts ActionServlet has the local DTD's to resolve against and
> sets that up appropriately for struts-config.xml - but now I'm in
> Validator-land.
>
> Ideas?
>
> Thanks,
> Erik
>
>
> James Strachan wrote:
> > From: "Erik Hatcher" <[EMAIL PROTECTED]>
> >
> >>I posted this to struts-dev with no reply. Any takers here? How can I
> >>get validation.xml validation to work against a local DTD rather than
> >>remote?
> >
> >
> > This is a very common FAQ with XML. The trick is to supply your own
> > EntityResolver to load the DTD from wherever you like, local file
system,
> > classpath or whatever.
> >
> >
http://www.mail-archive.com/[email protected]/msg00829.html
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
> >
> >
> >>Thanks,
> >>Erik
> >>
> >>
> >>-------- Original Message --------
> >>Subject: Validation XML DTD failure when offline
> >>Date: Thu, 05 Sep 2002 12:33:25 -0400
> >>From: Erik Hatcher <[EMAIL PROTECTED]>
> >>Reply-To: "Struts Developers List" <[EMAIL PROTECTED]>
> >>To: [EMAIL PROTECTED]
> >>
> >>Deploying to an app. server (JBoss) that when not connected to the
> >>internet I get this:
> >>
> >>12:28:16,975 ERROR [STDERR] [INFO] ValidatorPlugIn - -Loading
validation
> >>rules file from '/WEB-INF/validation.xml'
> >>12:28:17,058 ERROR [STDERR] java.net.UnknownHostException:
> >>jakarta.apache.org
> >>12:28:17,059 ERROR [STDERR] at
> >>org.apache.crimson.parser.Parser2.fatal(Parser2.java:3108)
> >>12:28:17,061 ERROR [STDERR] at
> >>
> >
> >
org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2796)
> >
> >>12:28:17,061 ERROR [STDERR] at
> >>org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1155)
> >>12:28:17,063 ERROR [STDERR] at
> >>org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
> >>
> >>
> >>What can I do to get local DTD resolution to work? The strange thing
> >>was that the app. "worked fine", but validation was not enabled, which
> >>threw me for a loop.
> >>
> >>I know I don't have to put the DTD definition at the top of the
> >>validation.xml, and that would probably get things working, but thats
> >>not a solid solution. I'm generating my validation.xml from the code I
> >>contributed to XDoclet (now in its official codebase, BTW) and that
does
> >>internal validation during the build process to ensure the dynamically
> >>generated validation.xml is valid - and I'd hate to have to strip that
> >>out to deploy.
> >>
> >>Thanks,
> >>Erik
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >
> > <mailto:[EMAIL PROTECTED]>
> >
> >>For additional commands, e-mail:
> >
> > <mailto:[EMAIL PROTECTED]>
> >
> >>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >
> > <mailto:[EMAIL PROTECTED]>
> >
> >>For additional commands, e-mail:
> >
> > <mailto:[EMAIL PROTECTED]>
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Everything you'll ever need on one web page
> > from News and Sport to Email and Music Charts
> > http://uk.my.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>