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


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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

Subject: RE: [docbook] Highlighting complete areas in DocBook

To avoid needing to customize tons of templates, I do the following for
that situation. This allows us to add role="highlight" to any element
and have it be highlighted yellow. This needs to be in a customization
layer that imports the docbook xsls because it relies on doing an

For html (assuming you have something like .remark{ background: yellow;
} in your css):

<xsl:template match="text()[ ancestor::*/@role = 'highlight' ] | xref[
ancestor::*/@role = 'highlight' ]" priority="10"><span

And for fo:

  <xsl:template match="text()[ ancestor::*/@role = 'highlight' ] | xref[
ancestor::*/@role = 'highlight' ]" priority="10">
	<fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format";


> -----Original Message-----
> From: Tobias Anstett [k15t.com] [mailto:tobias@k15t.com] 
> Sent: Saturday, March 07, 2009 2:57 PM
> To: docbook@lists.oasis-open.org
> Subject: [docbook] Highlighting complete areas in DocBook
> Hi together,
> is there a way to highlight docbook elements in a generic 
> way? I'd like to be able to put some extra attribute or pi to 
> any docbook element to highlight it e.g. set the background 
> color of a para (resulting fo:block) to red for PDF output. I 
> already had a look at the change highlighting documented at 
> http://www.sagehill.net/docbookxsl/Changebars.html, but 
> because i am using Apache FOP i need some other mechanism to 
> highlight docbook elements (and it childs) ranging from para, 
> admonition, programmlistings, table, etc. to table.
> Cheers, Tobias
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-help@lists.oasis-open.org

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