[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK-APPS: Root filenames and onechunk revisited
Last week, Norm posted this response: >>>> / Martin Stemplinger <mstemplinger@gmx.de> was heard to say: | This just changes index.html (the default) to start_here.html. | I'd rather have the name from the id attribute like the other chunks. Dennis, I think, suggested setting root.filename to @id which will have that effect, but so will using the onechunk.xsl stylesheet. <<<< Okay, Norm, I'm confused. I tried using onechunk.xsl unmodified, but it named every file index.html. If my driver doesn't include both <xsl:param name="use.id.as.filename" select="1"/> and <xsl:param name="root.filename" select="@id"/> I get the wrong file name. With both parameters, I get the root element's ID attribute: <id>.html. If I leave out the root.filename parameter, I get index.html. If I leave out the use.id.as.filename parameter, I get a numbered filename that I can't explain (ar01.html). If I leave both off, I get index.html. The file onechunk.xsl calls chunk.xsl which calls chunk-common.xsl, which seems to say that I should--as Norm suggested--be getting the <@id>.html without the parameter mods in my driver. I'm using DocBook XML DTD 4.2 and DocBook-XSL-1.50.0. I don't mind having the lines in my driver, but Norm's note and what I'm seeing in chunk-common.xsl seem to suggest I shouldn't need the root.filename parameter setting. Although, I think it says I *do* need the use.id.as.filename parameter set to 1. Here's the chunk of chunk-common I'm looking at: <xsl:variable name="filename"> <xsl:choose> <xsl:when test="$dbhtml-filename != ''"> <xsl:value-of select="$dbhtml-filename"/> </xsl:when> <!-- if this is the root element, use the root.filename --> <xsl:when test="not(parent::*) and $root.filename != ''"> <xsl:value-of select="$root.filename"/> <xsl:value-of select="$html.ext"/> </xsl:when> <!-- if there's no dbhtml filename, and if we're to use IDs as --> <!-- filenames, then use the ID to generate the filename. --> <xsl:when test="@id and $use.id.as.filename != 0"> <xsl:value-of select="@id"/> <xsl:value-of select="$html.ext"/> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:variable> Anybody understand what's happening here? Thanks. Dennis Grace Information Developer IBM Linux Technology Center (512) 838-3937 T/L 678-3937 cell: (512)-296-7830 dgrace@us.ibm.com This sentence no verb.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC