[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Highlighting new contents
Hi Stefan, On Fri, 27 Apr 2012 12:24:20 +0200 Stefan Hinz <stefan.hinz@oracle.com> wrote: > [... highlight changes ...] > > I was thinking of adding a role attribute to the block level elements > that contain new stuff, and then processing it so that it comes out > as red text or in some other distinguishable way: > > <section role="new">, <para role="new">, etc. > > But I was wondering if there's a better way of doing this, for > example with a <new>...</new> wrapper that I happened to miss in the > list of available tags on > http://docbook.org/tdg/en/html/docbook.html. :-) Don't fiddle with role, there is the revisionflag[1] attribute exactly for this purpose. :) It can hold several values (added, deleted, changed, off) which you can use to highlight your changes. How to use it is described in Bob's chapter "Highlighting changes"[2]. It would be certainly more convenient to add the attribute automatically. Norman wrote the diffmk utility for this task which expects an old and a new version. It creates a DocBook file which just contains elements with revisionflag attributes and their respective values. I tried it, but it didn't work for me. Maybe things have changed now. To display your changes in your XHTML, use the changebars.xsl customization. It detects the revisionflags and creates a <span> tag and a class attribute. So you can style it with CSS. Details are described in Bob's book. Have fun! :-) ------------ [1] http://www.docbook.org/tdg/en/html/ref-elements.html#common.attributes [2] http://sagehill.net/docbookxsl/Changebars.html -- Gruß/Regards, Thomas Schraitle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]