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 [email protected] > On Sep 10, 2021, at 13:19, Beth Van Wie <[email protected]> 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
