OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Creating Styles for an Attribute


Hi Beth,

With XSLT, you can match on just the attribute.

For example:

<xsl:template match=â@docâ>â..</xsl:template>

You may need to select different actions (for example if the element is a block vs. an inline element), but you probably wonât need to duplicate the code for every element.

You can also match multiple elements with the same match attribute, for example:

<xsl:template match=âpara[@doc=âFATâ] | row[@doc=âFAT']â/>â</xsl:template>

I hope that helps,
Dick Hamilton
-------
XML Press
XML for Technical Communicators
http://xmlpress.net
hamilton@xmlpress.net



> On Sep 10, 2021, at 13:19, Beth Van Wie <beth.vanwie@raute.com> wrote:
> 
> Hello,
>  
> Iâm trying to customize the Docbook stylesheets so my profiling attributes will produce colored text when I build the document without profiling. I currently have stylesheets that pull out the profiled information as needed, and I want to create a new stylesheet that uses the same attributes, does not profile, and colors the profiled sections.
>  
> I currently use the attribute doc=ââ to profile my documents.
>  
> For example:
>  
> <para doc=âFATâ> </para>
> <step doc=âSATâ> </step>
>  
> I commonly profile the following elements: para, row, step, procedure, section, table, figure, lists (different kinds of lists), and others.
>  
> I was able to write a stylesheet that would do this for a para element, and for a para element inside a step element, but the way I am doing it, I will have to write a new template for each element. Is there a way I can write one template to cover every time I use doc=ââ?
>  
> Thank you,
>  
> Beth
>  
>  
> Sent from Mail for Windows



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]