[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Problem with legalnotice link
Thanks for all the good info on this Mauritz. I think for complete control of the legalnotice filename, Bob's example could be updated where the new ln.or.rh.filename template is customized to something like the following: <xsl:param name="legalnotice.filename">legalnotice.html</xsl:param> <xsl:template name="ln.or.rh.filename"> <xsl:param name="node" select="."/> <xsl:param name="is.ln" select="true()"/> ... <xsl:if test="$is.ln"> <xsl:value-of select="$legalnotice.filename"/> </xsl:if> ... </xsl:template> -Ken On Thu, Feb 21, 2008 at 5:14 PM, Mauritz Jeanson <mj@johanneberg.com> wrote: > > -----Original Message----- > > From: Ken Morse > > > > > Thanks for pointing that out, Mauritz. The snapshot does work better, > > although not completely as expected. The snapshot does now generate an > > filename and an href that match; the difference is that the id of > > <legalnotice> no longer seems to be used -- a generated id is used > > even if the <legalnotice> id is set. > > > Yes, that behaviour is not properly documented anywhere. I'm sorry about > that. The filename is now computed as follows: > > 1. If a filename is given by the "dbhtml filename" processing instruction, > that filename is used. > > 2. If the legalnotice has an id/xml:id attribute, and if the > use.id.as.filename parameter != 0, the filename is the concatenation of the > id value and the value of the html.ext parameter. > > 3. If the legalnotice does not have an id/xml:id attribute, or if > use.id.as.filename = 0, the filename is the concatenation of "ln-", > auto-generated id value, and html.ext value. > > > > > On a somewhat related topic, I've tried using another option for > > controlling the chunk name for legalnotice as outlined in Bob > > Stayton's Book: > > http://sagehill.net/docbookxsl/LegalNotice.html#LegalnoticeFilename > > > > The direction says "...customize the template that matches the element > > in mode="chunk-filename" as follows..." and then it references a > > template: > > > > <xsl:template match="legalnotice" mode="chunk-filename"> > > > > I don't see the original version of this template anywhere in the > > distribution though > > > There is no original version of this specific template. Before DocBook XSL > 1.73.1, it was applied since there was an <xsl:apply-templates > mode="chunk-filename" select="."/> in the template with match="legalnotice" > and mode="titlepage.mode". > > But the "Filename of the legalnotice chunk" customization in Bob's book does > not work when using 1.73.1 or later, since legalnotices are no longer > processed using the "chunk-filename" mode. I introduced this change because > generation of separate legalnotices did not work with the nonchunking > stylesheets. > > /MJ
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]