[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Controlling header color from the Makefile
Thank you, gentlemen Schraitle and Stayton! Excellent solution! Will be implemented immediately. br Gurra >From: Thomas Schraitle <tom_schr@web.de> >To: docbook-apps@lists.oasis-open.org >Subject: Re: [docbook-apps] Controlling header color from the Makefile >Date: Fri, 15 Jul 2005 21:06:27 +0200 > >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 > >--------------------------------------------------------------------- >To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org >For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > _________________________________________________________________ Winks & nudges are here - download MSN Messenger 7.0 today! http://messenger.msn.co.uk
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]