Michael,
Yes I am using sun's jdk
java version "1.4.1" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21) Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
(on solaris 2.8 (intel) but that shouldn't make much difference)
I thought the jdk just had the interface definitions, not anything implemented? If not, how do I override that and force it to use the xerces2 classes?
Thanks
Chris
Michael Rafael Glavassevich wrote:
Hi Chris,
It looks like you have a classpath problem, or some piece of code has set the org.xml.sax.driver property to org.apache.crimson.parser.XMLReaderImpl, because all I see are classes from the Crimson XML parser in your stack trace. You don't happen to be using Sun's JDK 1.4?
----------------------------- Michael Glavassevich [EMAIL PROTECTED] 4B Computer Engineering University of Waterloo
On Wed, 21 May 2003, Chris Cheshire wrote:
Hi,
Sorry if this is in the archives, but I they aren't available at the moment.
I am using xml files for my configuration files for an application and I do not want to have to set up a webserver to make the DTDs available, but I can't get the doctype reference to work properly. The dtd cannot reference an absolute path - it must reference the current directory. I am using JDOM (beta 8) and the xerces2.4.0 parser
In my XML files I have tried <!DOCTYPE config SYSTEM "something.dtd"> and got: Caused by: org.xml.sax.SAXParseException: Relative URI "reportgenerator.dtd"; can not be resolved without a base URI. at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182) at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3176) at org.apache.crimson.parser.Parser2.resolveURI(Parser2.java:2758) at org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2730) at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1129) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489) at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) ... 5 more
I have tried <!DOCTYPE config SYSTEM "file://some.dtd"> and got: Caused by: org.jdom.JDOMException: Error on line 3: External entity not found: "file://reportgenerator.dtd ".: reportgenerator.dtd at org.jdom.input.SAXBuilder.build(SAXBuilder.java:367) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:673) at com.bigredwire.reportgenerator.ReportGeneratorXMLConfig.parseConfiguration(ReportGeneratorXMLCo nfig.java:193) ... 3 more Caused by: java.net.UnknownHostException: reportgenerator.dtd at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182) at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2870) at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1167) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489) at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) ... 5 more
The only wayI can get the dtd to be found is by <!DOCTYPE config SYSTEM "file:///absolute/path/to/some.dtd">
I do not want to use this as it requires changing each dtd as it creates a reliance on a set directory structure, which I do not want.
How do I set the doctype to reference a DTD in the same directory as the xml file without giving an absolute pathname?
Thanks
Chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
