forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject Re: [Patch] tweaks to DTDs and XML
Date Sat, 09 Feb 2002 08:30:04 GMT
Stefano Mazzocchi wrote:
> David Crossley wrote:
> > Hi Stefano, my usual thing when i start out on an XML
> > project is to validate one of the existing XML documents
> > to be sure that the infrastructure is set up properly.
> Yeah, I didn't do that... because I knew that somebody else
> would have done it :)

Please do not rely on that.

> I know, I know, call me captain lazy butt :)

Well i will kick it now and then :-) Sorry, i know that we are
all busy and some fundamental things get overlooked.

Perhaps that is my role in life. It seems that everywhere i go
in XML-land, people are over-looking fundamental infrastructure
issues, which leads to serious problems down the track. I see
people publishing DTDs that they have not actually used, and
i get horrified.

I am not having a shot at you Stefano - just a general gripe.
On the cocoon-dev list i am having trouble getting people to
consider validation issues.

Anyway, i think that it is important to get these issues sorted
out early in the life of Forrest. 

> > There are some issues with Forrest, but i have sorted
> > most of them out and attach a collection of patches
> > forrest-patch.tar.gz ...
> > 
> > 2) modified schemas/catalog
> > - Fixed typo ... IOSdia.pen => ISOdia.pen
> yeah, good eye

Actually no, my eye missed it. It was only when i tried
to validate changes.xml that it came up. This was the
first issue raised by the validating parser.

That is my main point. It is so easy to make blunders
when authoring XML instances or when designing DTDs.
One cannot rely on the eye (or even on editing tools)
and must use a validating parser.

> > There are a couple of other things that i do not have
> > time to address. Here is what my xml parser says ...
> > --------
> > /usr/local/cvs/xml-forrest/schemas/DTD/document-v11.dtd [352:19] : Error: duplicate
declaration for element 'note'
> > /usr/local/cvs/xml-forrest/schemas/DTD/document-v11.dtd [486:34] : Fatal error:
> > content model not correctly delimited
> > reading entity developers: developers.xml
> > /usr/local/cvs/xml-forrest/changes.xml [18:11] : Error: an IDREF attribute refers
to the ID 'SF' which is not present in the document
> > --------
> Hmmm, weird. What parser are you using?

Since before XML days i have been using James Clark's
SP/nsgmls. It provides very useful error messages, reports
line numbers better, and does some magic to take earlier
messages into account. That has now evolved into
OpenSP at

However, the messages that i provided above are from
another nice parser called xmlvalid at

I find that i often need two separate parsers to nail the
difficult errors, though OpenSP usually does the trick.

Here is what OpenSP says when validating the current
changes.xml ...
document-v11.dtd:352:35:E: element type "note" already defined
document-v11.dtd:488:30:E: delimiter "|" invalid: only data tag group,
model group, element token, "#PCDATA", "#ALL", "#IMPLICIT" and
token separators are allowed for

changes.xml:6:0:W: generic identifier "warning" used in DTD but not defined
changes.xml:6:0:W: generic identifier "img" used in DTD but not defined
changes.xml:6:0:W: generic identifier "body" used in DTD but not defined
changes.xml:6:0:W: generic identifier "li" used in DTD but not defined
changes.xml:6:0:W: generic identifier "connect" used in DTD but not defined
changes.xml:13:15:X: reference to non-existent ID "SF"

I am not sure why those 5 Warnings about the DTD are being
referred to as coming from line 6 of changes.xml (perhaps
because changes-v11.dtd includes document-v11.dtd).

That last error may be because the developers.xml is
included as an external entity. I am not familiar enough with
IDREF to say.

Sorry, i cannot help out more with the actual DTD errors.

View raw message