commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: [Validator] [Fwd: Validation XML DTD failure when offline]
Date Mon, 09 Sep 2002 09:06:47 GMT
From: "Erik Hatcher" <jakarta-commons@ehatchersolutions.com>
> 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/dom4j-user@lists.sourceforge.net/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 <jakarta-struts@ehatchersolutions.com>
> Reply-To: "Struts Developers List" <struts-dev@jakarta.apache.org>
> To: struts-dev@jakarta.apache.org
>
> 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:struts-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-dev-help@jakarta.apache.org>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>
>

__________________________________________________
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:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message