commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Steelman" <JSteel...@incomm.com>
Subject [Digester] How to digester.register(String publicId,String entityURL) for local dtd file?
Date Thu, 16 Jun 2005 04:13:52 GMT
Digester's documentation shows the following as an example of how to
tell Digester where to find a local copy of a dtd, in this case a Struts
config file:
URL url = new URL("/org/apache/struts/resources/struts-config_1_0.dtd");
digester.register("-//Apache Software Foundation//DTD Struts
Configuration 1.0//EN", url.toString());
For a Struts file that begins with these 2 lines:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
       "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
              "http://struts.apache.org/dtds/struts-config_1_2.dtd">

Now, in my case, for an xml file that starts with these 2 lines:
<?xml version="1.0"?>
<!DOCTYPE cardActionVendor SYSTEM "cardActionVendor.dtd">
Apparently SYSTEM and PUBLIC differ and I'm not sure how to go about it
in this case. How would you do the equivalent to tell Digester where to
find the local copy? If I drop a copy of the dtd into the directory
where Java is executing, it works, but I need to specify a different
directory either relative or absolute.

Thanks,
Jon


---------------------------------------------------------------------
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