Title: RE: DTD Resolution Question

Hi,

Probably your error handler specifies the complete path of the dtd that it was trying to look up. Check that first. Nevertheless, probably the parser is looking at the current working directory (from where process was launched) since the dtd you're specifying is relative i.e. in the current directory. An alternative is to set the system id on the parser to the a directory containing the dtd and all relative paths would be resolved based on that.

Hope that helps.

Pradeep

> -----Original Message-----
> From: Jason Rizer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 11:57 AM
> To: [EMAIL PROTECTED]
> Subject: 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Reply via email to