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: Fri, 31 Aug 2001 13:41:52 -0700
Message-ID: <86DF4B803DE4B64894B29036A783EAFB1720FC@cacexc02.americas.cpqcorp.net>
To: www-xsl-fo@w3.org
Cc: "'Dave Pawson'" <daveP@dpawson.freeserve.co.uk>
With thanks to my manager who critiqued the change bars as to placement on
browser page, width, etc., I have revised the example of change bars
implementation in my previous reply to this topic.

The following revision might help design an XSL style sheet that uniformly
maintains change bars on the outer boundary of a double-sided document. (I
gather that is what you meant by "non-binding" side?) Copy and paste the
below code within the first and last comments to a blank .html text file
(i.e., name it "test.html") then open the file in any browser (Netscape/IE).

CHANGE BARS EXAMPLE (Revised)

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

<P>To implement this example, assign an attribute (such as changebars) to 
each element in the XML file that has been changed. (In ArborText you can 
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 elements, 
closing /DIV immediately after each changed element, by formatting DIV as 
follows:</P>

<DIV
STYLE="position:relative;left:-5;border-left-style:solid;padding-left:5;
border-left-width:thin;border-left-color:#000000;">
<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 ('border-right-style')

of each line in the paragraph. I have tested right and left instances of
this 
code by pasting all commented text in this XML Change Bars example into the 
file "test.html", and opening file in the latest versions of Netscape and 
Explorer. The change bars display to the left of this paragraph.<P>
</DIV>

<DIV
STYLE="position:relative;right:-5;border-right-style:solid;padding-right:5;
border-right-width:thin;border-right-color:#000000;">
<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 ('border-right-style')

of each line in the paragraph. I have tested right and left instances of
this 
code by pasting all commented text in this XML Change Bars example into the 
file "test.html", and opening file in the latest versions of Netscape and 
Explorer. The change bars display to the right of this paragraph.<P>
</DIV>

<P>Notice that <span style="background-color:#F9FC83">any HTML color code
can 
give the change bars some urgency</span> (and make them stand out). Color 
combinations could even denote levels of urgency. Fire Engine Red is a
logical 
choice for high priority changes:</P>

<DIV
STYLE="position:relative;right:-5;border-right-style:solid;padding-right:5;
border-right-width:thin;border-right-color:#CC0033;">
<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 ('border-right-style')

of each line in the paragraph. I have tested right and left instances of
this 
code by pasting all commented text in this XML Change Bars example into the 
file "test.html", and opening file in the latest versions of Netscape and 
Explorer. The change bars display to the right of this paragraph in red.<P>
</DIV>

<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 display 
change bars.</P>

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


The attributes for STYLE="attributes" in HTML's DIV tag is any CSS
attribute, so you could go to an HTML reference site with a glossary of CSS
attributes such as my favorite: http://www.htmlcompendium.org/

Gene


-----Original Message-----
From: Dave Pawson [mailto:daveP@dpawson.freeserve.co.uk]
Sent: Friday, August 31, 2001 10:54 AM
To: Ingram, Eugene; www-xsl-fo@w3.org
Subject: Re: XSL FO and the generation of "change bars"


At 14:59 29/08/2001 -0700, Ingram, Eugene wrote:
>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. :)

Same sort of logic for fo surely?
If you have the items tagged with an attibute,
a visual change bar could perhaps be, on block elements,
to instatiate a border-start of 2px or something?

If you were clever enought, perhaps even get it on the non-binding side?
I feel sure that's possible, but can't think of the property.

HTH, DaveP
Received on Friday, 31 August 2001 16:42:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:08 GMT