You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Jason Rizer <ja...@yahoo.com> on 2002/04/25 20:56:33 UTC
DTD Resolution Question
Hello,
First of all, I realize that this is slightly off
topic as it deals specifically with crimson and not
xerces, but I think it's really a JAXP question so I'm
going to post it here anyway :) Besides, I couldn't
find a crimson list.
I'm using a third party tool which includes jaxp.jar
and crimson.jar (I think that this is the jaxp 1.01
bundle) to perform a sax parse. Everything works find
when I supply it with XML input which doesn't specify
a DTD. If the XML I provide DOES specify a dtd, the
parse fails. I have the DTD in question, but I can't
figure out where to put it. If I were coding against
the parser directly I'd set an entity resolver, but
I'm not. Here is the relevent snippet of the third
party code:
SAXParserFactory factory =
SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true);
XMLReader myReader =
factory.newSAXParser().getXMLReader();
myReader.setContentHandler(this);
myReader.setErrorHandler(this);
myReader.parse(new InputSource(is));
Again, this is all code I can't modify. Here is the
relevent snippet of the offending xml document:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE XMI SYSTEM "CWM_1.0.dtd" [
<!ELEMENT ixafs (ixaftv)+ >
<!ATTLIST ixafs
n CDATA #REQUIRED
>
<!ELEMENT ixaftv EMPTY >
<!ATTLIST ixaftv
t CDATA #REQUIRED
v CDATA #REQUIRED
>]>
So, if anyone can give me any clue to where I should
put CWM_1.0.dtd I would greatly appreciate it. Thanks
in advance.
-Jason
__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org