forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@indexgeo.com.au>
Subject Re: new demo document-v11
Date Mon, 13 May 2002 09:16:40 GMT
Steven Noels wrote:
> David Crossley wrote:
> > An interesting thing happened in Forrest today. I was enthused
> > with getting the FAQ started and went to commit. Silly me
> > had not updated first. Anyway, after 'cvs update' my build failed.
> 
> Could you be more precise? Where did it fail?

The error output from build docs is very obscure here, saying
only stuff like "String index out of range: 0" ... no help.
I gather that that is Xalan way of saying that "I was expecting
an href attribute and you did not provide one".

So i kept commenting-out bits of the document2html.xsl until i
found it. The match for the "jump" element was the culprit
because it was not dealing with the "anchor" attribute, only
the "href" attribute. The generated FAQ document had lots
of <jump anchor="faq-*"/> so as to jump to anchors within
the same document, i.e. no href attribute, so stylesheet fails.

I see that you have now changed faq2document.xsl
so that the jump element does not now have an "anchor"
attribute. This fixes it of course, but i think that it probably
limits whatever the jump element was intended for.

> > I tracked it down to your mods to document2html.xsl wherein
> > there is a new match for "jump".  Of course the generated FAQ
> > document is full of jump elements. Something breaks there,
> > probably due to the "action" attribute. I realise that
> > there is still
> > work required on the other stylesheets, e.g. faq2document.xsl
> > 
> > I was not sure which approach to take. Whether to hold back
> > on committing the FAQ stuff, or to simply comment out the match
> > for jump. I took the latter approach, assuming that it will not be
> > too long before we can fix it. I thought of just copying the matches
> > from the old document2html.xsl in Cocoon, but not sure what
> > your plans are.
> 
> I just treated jump, fork and link the same way - basically because I
> didn't really knew what the difference was ;-)

I have just added to document-v11.xml demo document to
attempt to further explain them. I do not see the need for the
jump element, as the link element already handles that too.

I wonder why you did not just copy the matches which were
working for the Cocoon document2html.xsl stylesheet. Probably
beacue of the jump|link|fork confusion.

Just found an interesting thing ... the previous document-v10
DTD did *not* have an "anchor" attribute for the jump element,
yet the Cocoon stylesheets were using an "anchor" attribute.
As you know, the faq.xml is transformed into a document-v10.
Due to the lack of xml validation facilities, the illegal anchor
attribute is overlooked.

> > I remember getting very confused by the jump element (and fork
> > and connect) when i started writing a big doc for Cocoon.
> > I wanted a little table-of-contents at the top to jump to relevant
> > sections below. So confused that i resorted to using simple
> > <link href="#anchor"> which worked OK.
> 
> Well, yes. I don't like the jump neither, and maybe building a TOC
> should be the concern of the stylesheet, and not the document author...
> right?

When i wrote the Entity Resolver document for Cocoon i wanted
some very explicit entries in the ToC, and not just all section titles.
I also wanted to add a little extra text for some Toc entries.
 http://xml.apache.org/cocoon/userdocs/concepts/catalog.html
So i do not think that automated ToC by the stylesheet would be
appropriate for all cases. If it was controlled by a stylesheet
parameter (generate-toc=false|true) then that could work.
 
> Anyway, I patched document2html and faq2document some
> more to bring them
> in line with the document-v11.dtd, please cross-check.

Apart from the "jump" uncertainty, all is looking good.
--David

Mime
View raw message