[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Highlighting new contents
Thanks, Thomas! (And thanks Paul and David!)I knew I was missing something. Now guess what a Google search for "highlighting changes in DocBook" brought up? D'uh.
We're after a "one-time markup", by the way, so revisionflag is exactly what I was looking for.
Thanks much for the quick feedback. Cheers, Stefan On 27.04.2012 12:58, Thomas Schraitle wrote:
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
-- Cheers, Stefan Hinz <stefan.hinz@oracle.com>, MySQL Documentation Manager Phone: +49-30-82702940, Fax: +49-30-82702941, http://dev.mysql.com/doc ORACLE Deutschland B.V.& Co. KG Registered Office: Riesstr. 25, 80992 Muenchen, Germany Commercial Register: Local Court Of Munich, HRA 95603 Managing Director: Jürgen Kunz General Partner: ORACLE Deutschland Verwaltung B.V. Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Register Of Chamber Of Commerce: Midden-Niederlande, No. 30143697 Managing Directors: Alexander van der Ven, Astrid Kepper, Val Maher
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]