Re: RE: Pollo: Editing XML files which have a DTD

Bruno Dumon <[email protected]> 13 Aug 2002 23:06:52 +0200
Newsgroups gmane.editors.pollo.devel
Message-ID <1029272816.26377.391.camel@yum>
On Tue, 2002-08-13 at 21:36, Scott Willy wrote:
> Bruno,
> 
> thank for the quick reply. For item 2) I understand the issues as you
> outlined. Thanks.
> 
> For item 1), I am not sure why Pollo cannot find the DTD? It is not on
> classpath. It is on path, but more relavent, it is in the same directory as
> the root document (i.e. the document which the DTD applies). For me there is
> a problem with the entity resolution process somewhere.

Now that I think of it, someone else reported the same error a while
back and I solved it then but forgot to commit the change. Note that the
error is still there, but that it doesn't give an exception now, but you
can see the error message in the status bar.

The problem is now that it looks for the DTD in pollo's working
directory, and not in the directory of the file.

Anyway, even if pollo (or in fact xerces) could read that DTD, it
wouldn't use it to validate the document, and pollo wouldn't use it
either (to fill the element lists etc.), so there's no sense in solving
that.

If we want the correct behaviour, we should:

- disable xerces' DTD loading since it is pure overhead.
- let pollo check for the doctype (if I recall correctly there's a
method on the DOM to get that)
- and use that doctype to load the DTD via MSV, so that pollo actually
makes use of it.
- but then we still don't support the internal DTD subset, but AFAIK we
could just append the internal subset to the external DTD (not
physically, but make it appear to MSV as it would be), but I need to
check the xml spec on that
- and to make everyone happy, also support catalog files

Anyhow, I think the most urgent priority is to disable the
xerces-dtd-loading, for which I think we'll need to switch to xerces 2.
I have in fact already done that once, but back then xerces didn't
support some dom level 3 api's pollo uses. I'll try to have another look
at it (in the weekend or so).

> 
> If I have time I will plunge into the code this weekend (but being a F1
> Grand Prix weekend time is short).
> 
> csw
> 



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31