cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@indexgeo.com.au>
Subject Re: sitemap DTD
Date Fri, 26 Apr 2002 12:29:41 GMT
Bert Van Kets wrote:
> David Crossley wrote:
> >Bert Van Kets wrote:
> > > I have been updating the sitemap DTD, using the
> > > src\webapp\resources\entities\sitemap-v02.dtd file, and found that a 
> > lot of
> > > attributes and elements are missing.  ex. the logger attribute is not 
> > present.
> >
> >Beware. Note the comments in the top of the DTD, wherein
> >it says that the DTD has been reverse-engineered from
> >the *.xmap files at that time. Note also that the DTD is
> >deliberately lax, because it was just trying to document the
> >structure rather than set up strict validation rules. That was
> >seen as the first step.
> 
> I saw the mention and tried it in XMLSPy myself.  The result is 
> awful.  Attributes and child elements that are present are always set as 
> obligatory.  I would have to go through the whole list and adjust nearly 
> everything.  I'd rather reverse engineer by hand.

Woops, i should be more careful with words. I meant
reverse-engineered by hand. To do one of the previous
editing sessions, i used an XML validator to process each
*.xmap and watched what errors came up, then tweaked
the DTD to add the missing things.

I think that you mean "optional" rather than "obligatory".
Most elements have zero-or-more children and most
attributes are IMPLIED. If too much was obligatory, then
none of the sitemap.xmap files would have validated.
Yes everything does need adjustment.

> > > I did it to use this DTD in XMLSpy to see all the possible attributes and
> > > child elements of a given element.
> >
> >Great idea. At the time of the last revision, i was hoping
> >to sort it out, so that i could use a tool that reads a DTD and
> >automatically generates some user documentation. I also
> >expected that XML validation was a crucial component.
> >However, no-one seemed interested at the time.
> 
> With the new "documentation Manager" things might change ;-)
> 
> 
> > > Is there a specific reason why the DTD is out of sync with the current
> > > sitemap, apart from that fact that Cocoon doesn't use the DTD.
> >
> >It has always been out of sync. A few brave souls have tried
> >to update the DTD following on from some discussion item
> >on the list.
> >
> >It seems that all work must happen in the actual Java classes.
> >Design work, adding new elements and attributes, seems to
> >not happen in XML-land.
> >
> >On occasion this makes me wonder if there is too much
> >programmatic focus in Cocoon and not enough utilisation
> >of the magic of reliable XML. If the build process, and sitemap
> >generation process, started with a validation run then surely
> >the Java code could rely on that and so be more efficient.
> >
> > > Does anybody have a full up-to-date sitemap DTD?
> > >
> > > If it doesn't exist yet I will update my file using all the existing
> > > sitemaps in the current CVS HEAD and commit the new file.
> >
> >Please, please do. Other ways to verify the DTD would be
> >to compare with xdocs for generators, transformers etc. and
> >also with the various Javadocs. If you can manage some
> >tweaks to xdocs as you go, then that would be fantastic.
> 
> Doing my first real project in Cocoon I noticed a chronic lack of 
> up-to-date documentation regarding possible parameters, attributes, child 
> elements, ...

Yes, this is exactly what drove me to have a go at
the sitemap DTD.

> Whenever I found something I adjusted my local CVS copy with a "my docs" 
> section.
> Going through the API docs is indeed the best way of getting an up-to-date 
> DTD.  If I adjust the xdocs at the same time, we will have up-to date 
> docs.  The only problem that remains is that my day is only 24 hours long :(
> (come to think of it, my day is only 12 hours long, the other 12 belong to 
> my wife :-))

Yes, time is an issue for all of us keen types. We just do what
little bits we can, get it into CVS and someone else can build
upon it.

Bert, you remind me - i too have a wife - better go now :-)

> Anyway, I'll get cooking up the DTD and see where I go from there.
> 
> Bert


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message