Walt,

I think you need to make yourself an EntityResolver.  You create a class
(implements EntityResolver) that maps from the DTD reference to a local file
reference over which you have much better control.  When you parse the XML
file you tell the parser to use your entity resolver.

There are examples in the turbine source - see:
org.apache.turbine.services.intake.transform.DTDResolver.java

Cheers,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au

> From: Walt Armour <[EMAIL PROTECTED]>
> Reply-To: "Turbine Torque Users List" <[EMAIL PROTECTED]>
> Date: Tue, 27 Aug 2002 13:20:35 -0700
> To: Turbine Torque Users List <[EMAIL PROTECTED]>
> Subject: TorqueDataModelTask and cross-platform XML
> 
> 
> For our project we have done all of the work so far on Win2K.  I am now
> trying to bring it up on Linux.
> 
> The blocking hurdle I have is dealing with our XML files and their DTDs.  We
> initially specified the DOCTYPE tag using the SYSTEM attribute and a file://
> <file://>  URI specified for the DTD.  This of course won't work cross
> platform since it has filesystem specific pathing (e.g. C:).  I modified the
> reference to be relative without the file:// <file://>  scheme and this
> works fine for our XML validator but fails in TorqueDataModelTask (at line
> 313 of current cvs, in initControlContext at xmlParser.parsefile() ).  It
> appears that the underlying parser (SAX) wants this reference to be
> absolute.
> 
> I have looked through the code (gotta love
> http://jakarta.apache.org/turbine/torque/xref/org/apache/torque/task/TorqueD
> ataModelTask.html
> <http://jakarta.apache.org/turbine/torque/xref/org/apache/torque/task/Torque
> DataModelTask.html> ) and don't see anything obvious to answer this: is
> there any way to make the task (via SAX) ignore/not validate/not care about
> this reference?
> 
> Alternatively, does anyone have suggestions on how to make this work
> cross-platform without using network type schemes (e.g. http:// <http://> )?
> I've toyed with doing that but it would then require us to be either
> connected to the network when we build or that we have a webserver running
> locally whenever we build.  Both of those are restrictions we would prefer
> not to have.
> 
> 
> 
> --
> 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]>

Reply via email to