forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Koberg" <...@koberg.com>
Subject RE: suggestion for dtd
Date Wed, 06 Nov 2002 15:19:42 GMT
Howdy,

> -----Original Message-----
> From: Jeff Turner [mailto:jefft@apache.org]
> Sent: Wednesday, November 06, 2002 7:15 AM
> To: forrest-dev@xml.apache.org
> Subject: Re: suggestion for dtd
>
>
> On Wed, Nov 06, 2002 at 06:51:09AM -0800, Robert Koberg wrote:
> > Hi guys,
> >
> > If the anchor is on the same page (for something like a table of
> contents) you
> > don't need to put IDs in your elements. You could use the xsl function
> > generate-id(). This function is guaranteed to return the same value
> for a node
> > whenever it is called in the XSL transformation.
>
> Each section already has a generated id, which is linked to by the
> in-page TOC.
>
> The problem is that generate-id() is not guaranteed to return the same
> value in different XSLT processors, or even in different invocations of
> the same processor.  If I point you to:
>
> http://xml.apache.org/forrest/your-project.html#N1014A
>
> as soon as someone regenerates the site, that URL is liable to break.

Well, I did say for links on the same page. If so, then this problem would not
occur.

>
> So it might be best to abandon generate-id() altogether, and
> auto-generate an @id from the section title.  An anchor like
> #advanced_customizations is also more descriptive than #N1014A

I like this more and am going to change the way I do TOCs to this. I like
descriptive URLs :). You can still use my template example and substitute some
xsl (a named template) that replaces spaces with underscores and removes things
that ID does not like (like a dot/period - or is this business logic :)

thanks,
-Rob

>
>
> --Jeff
>



Mime
View raw message