I'm not changing the DTDs for my schema. XmlToAppData uses the SAX parser to parse the XML. The SAX parser requires (based on the errors I get) an absolute URI (not relative) before it will parse the XML. Without using a network-aware scheme (e.g. http://) I can find no way to specify an absolute URI that works for both Windows and Linux (because file system paths are specified completely differently).
On Windows I need a DOCTYPE entry like this (using an absolute URI): <!DOCTYPE root SYSTEM "file:///Q:/foo/bar/database.dtd"> On Linux I need one like this: <!DOCTYPE root SYSTEM "file:///dev/foo/bar/database.dtd"> I would prefer a relative one for both, like this (which should work since the XML is in the same directory): <!DOCTYPE root SYSTEM "database.dtd"> But SAX won't digest the relative one. One suggestion was to create my own EntityResolver (akin to DTDResolver) that would build the path properly depending on the OS it was running on. While looking into that possibility I hit the snag I mention below. To be honest, on further inspection, I'm not sure if even this will solve my problem. Any suggestions, hints, clues, etc. will be greatly appreciated. -----Original Message----- From: Stephen Haberman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 1:59 PM To: 'Turbine Torque Users List' Subject: RE: TorqueDataModelTask and cross-platform XML Why are you changing the DTDs of your XML schema? As far as I know, XmlToAppData should only be used for reading in schema files, and the shipped DTD resolver should work on both Linux and Windows/online and offline. I've had issues with it working offline; I'm not entirely sure what the issue was, but I think it got fixed as it now works for me (on Windows). - Stephen > -----Original Message----- > From: Walt Armour [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 28, 2002 2:59 PM > To: 'Turbine Torque Users List' > Subject: RE: TorqueDataModelTask and cross-platform XML > > Okay, that looks like the approach. The only hurdle I see so far is that I > can't figure out how to get torque to use my EntityResolver. > > In XmlToAppData.java it explicitly calls > DTDResolver().resolveEntity(publicId, systemId). > > Is there another piece that I'm not seeing? Or am I going to have to submit > a patch that will allow someone to provide their own EntityResolver at > runtime (perhaps an attribute on the Ant task that is then passed on down)? -- 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]>
