[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] shade contente of <note|caution|> elements in fop
In general, if you want to change the properties on an element for which there isn't an attribute-set defined in the stylesheet, you need to look through the templates for the one that handles that element. It will usually output an fo:block that contains the whole element. You need to use xsl:attribute immediately after the fo:block to add properties to it. Your xsl:attribute must occur before other output elements in order to be associated with the fo:block that precedes it. In your case, you also need to use an <xsl:if> or <xsl:choose> statement, testing to see if the element has the restricted attribute test="@security='restricted'". If so, then output the xsl:attribute for the background-color you want. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Jens Skripczynski" <skripi-lists@myrealbox.com> To: <docbook-apps@lists.oasis-open.org> Sent: Saturday, March 27, 2004 10:23 AM Subject: Re: [docbook-apps] shade contente of <note|caution|> elements in fop > Hi, > > still unhappy. I wanted to mark areas with a security tag. > So I have <note security='restircted></note> but also <sect1 > security="restricted"></sect1>. > > So I can distinguish between the stuff my friends know (unrestricted) > and my information. > > Hopefully you could give me a hint where to search for it > (to learn to help me myself). > > So in theorie i Need an xsl statement, that runs if it finds a match > with attribute security='restricted' (under fop). > (with various tags (sect2|note|...)). > > Currently I build my pdf files: > - profile/profile.xsl (to filter out unwanted tags) > - fo/docbook.xsl > - fop > > Since I use many tags the customization tags do not help too much, as I use > many tags and would have to add an additional layer for each tag. > > I could an xsl skript between profiling and the fop generation, but I do not > know how I can include plain fop code in a docbook file. > > So > <sect1 security="resctricted"> > <para> test </para> > </sect1 > > Should have > background-color: #E0E0E0 > padding: 0.1in > > Or is there a customization layer that matches all elemente with a profile > attribute ? > > Bob Stayton: > > There is no stylesheet parameter to shade the background of note elements in > > FO output. But it can be done with attribute-sets in a customization layer: > > > > <xsl:attribute-set name="admonition.properties"> > > <xsl:attribute name="background-color">#E0E0E0</xsl:attribute> > > <xsl:attribute name="padding">0.1in</xsl:attribute> > > </xsl:attribute-set> > > > > <xsl:attribute-set name="admonition.title.properties"> > > <xsl:attribute name="background-color">#E0E0E0</xsl:attribute> > > <xsl:attribute name="padding">0.1in</xsl:attribute> > > </xsl:attribute-set> > > Ciao > > Jens Skripczynski > -- > E-Mail: skripi-lists(at)myrealbox(dot)com > > /"\ > \ / > X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL > / \ > > > To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/. > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]