[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Controlling header color from the Makefile
Hi Gurra, On Friday 15 July 2005 12:08, Gurra Green wrote: > > How would I go about to control an attribute in a attribute set from > the command line? Is it possible to use stringparam for that purpose? As far as I know, this is not possible. You use xmllint, right? > What I really want to accomplish is to graphically distinguish internal > documents from non-internals, e.g. by having different colors in the > header and footer, and control that from the command line with some > kind of string param "internal.doc". If that stringparam is set, I > would like to have one set of attributes, if not set another. I am not > allowed to simply have a xsl:if on the top level of the file, > obviously... Something like the draft mode, controlling possibly many > different things, but primarilly the header/footer color currently. Right, xsl:if is not possible as top level element. However, you can insert a xsl:choose in the attribute set like this: <xsl:param name="internal.doc">1</xsl:param> <xsl:attribute-set name="your.attribute.name"> <xsl:choose> <xsl:when test="$internal.doc = '1'"> <!-- Insert here your xsl:attribute elements, if this parameter is set --> <xsl:attribute name="color">black</xsl:attribute> </xsl:when> <xsl:otherwise> <!-- Insert here your xsl:attribute elements, if this parameter is _not_ set --> <xsl:attribute name="color">blue</xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:attribute-set> Probably you must insert this code in other attribute sets as well. > I could split the driver file in two which include the main parts, and > from the command line select which file to use, but is there anyhting > better? Attribute sets are a bit hairy. ;) As far as I know, there is no better solution (except the above code.) Bye, Tom -- Thomas Schraitle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]