W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2001

Re: XSL FO and the generation of "change bars"

From: Ingram, Eugene <Eugene.Ingram@compaq.com>
Date: Wed, 29 Aug 2001 14:59:11 -0700
Message-ID: <86DF4B803DE4B64894B29036A783EAFB120DF5@cacexc02.americas.cpqcorp.net>
To: www-xsl-fo@w3.org
You wrote: "If there is some obvious way, then please tell me and I'll 
be suitable embarrassed.  If there is some non-obvious way, then I will 
be very pleased to learn how to accomplish this."

I have discovered the latter. :)

One of my tasks as a consultant for an XML project in the organization 
is to implement change bars.

I'm about to write HTML coding, which may display as HTML output rather 
than raw HTML code on the web newsgroup to which I'm replying. Those 
wanting to see the raw HTML code will need to display the Source in the 
browser (View, Source).

Each time an XML element is tagged by ArborText as "changed" (ALT-A in 
ArborText), this attribute is given to the tagged element:


Now it's a matter of writing an XSL style sheet that applies the 
following HTML code to all elements that are tagged as "changed" by 
ArborText. (Of course you can add any suitably named attribute such 
as changebars="yes" to any element using a text editor before using the 
style sheet.)

HTML code for change bars:

<!-- XSL Change Bars example by Eugene Ingram Jr (ingram@usa.net) -->

<P>To implement this example, assign an attribute (such as changebars)
each element in the XML file that has been changed. (In ArborText you
place the cursor on each changed paragraph, then press ALT-A to add an 
element "revisionflag" and mark it as "changed".) Then create an XSL 
stylesheet that applies the HTML tag called DIV to ONLY changed
closing /DIV immediately after each changed element, by formatting DIV

<DIV STYLE="position:relative;left:0px;border-right-style:solid;
<P>This is CHANGED element text such as found in a PARA element. Element

text can be one line or an entire paragraph. Change bars are applied to 
entire element. If element comprises a paragraph then the change bars 
appear to the left ('border-left-style') or the right
of each line in the paragraph. I have tested right and left instances of
code by pasting all commented text in this XML Change Bars example into
file "test.html", and opening file in the latest versions of Netscape
Explorer. The change bars display to the left of this paragraph.<P>

<P>Notice that the text outside the above tagged paragraph (which could
be an 
element comprising a paragraph of text in your XML file) does not
change bars.</P>

<!-- End of XSL Change Bars example -->

On Tue, 8 May 2001 02:01:13 -0400 (EDT) Jim Melton <jim.melton@acm.org> 
wrote (quoted part relevant to reply):

As some of you may know, I am responsible for producing a series of 
documents (the ISO SQL standard) that is frequently updated and
to a largish group of people for on-going development work.  Change bars

are essential to allow participants to readily see what has changed
about 2,000 pages of text.  I am currently producing these documents
DECdocument, but am in the process of converting them to XML, producing
via XSL FO (using RenderX's XEP product).

I do not immediately see how to implement change bars through XSLT and
FO.  Of course, I am capable of defining (in a DTD or Schema)
such as "Start a changebar section" and "End the current changebar 
section", as well as "At this point, indicate that something was
and I am happy to place such tags/elements at the appropriate places in
XML files as I edit them.  I am even reasonably confident of my ability
write XSLT to create XSL FO appropriately.  The problem is, of course, 
getting those tags/elements to result in change bars alongside the
of the page.

If there is some obvious way, then please tell me and I'll be suitable 
embarrassed.  If there is some non-obvious way, then I will be very
to learn how to accomplish this. If there is no known way, then I'll be 
disappointed ;^)
Received on Wednesday, 29 August 2001 17:59:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:09:53 UTC