473,378 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Help with XSL/XSL:FO for producing revision indicator bar in document.

Hello,

I'm having trouble figuring something out. I have to reproduce a PDF
output and in the original document, "revision indicators" are used to
show which parts of the document have changed since last version.

This revision indicator simply looks like a border to the left of the
page, but is always located at the same distance from the edge of the
page. Ouputing a border on the containing block doesn't work because
the blocks are indented within sections (everything in FO is
represented as lists within lists to facilitate indentation of sections
and subsections). Does anyone have an idea how I can accomplish this?

Any help would be greatly appreciated.

Regards
Jeff

Apr 28 '06 #1
6 1359
Websearch suggests that some folks (eg "Antenna House") have been
extending xsl:fo to deal with revision bars. XSL 1.1 proposed adding
something more officially; I'm not sure offhand whether that's been
incorporated into the 2.0 draft or not.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Apr 28 '06 #2

Joseph Kesselman wrote:
Websearch suggests that some folks (eg "Antenna House") have been
extending xsl:fo to deal with revision bars. XSL 1.1 proposed adding
something more officially; I'm not sure offhand whether that's been
incorporated into the 2.0 draft or not.


Thank you much for your answer.

Do you know if something similar has has been implemented in FOP
0.20.5?

Regards
Jeff

Apr 28 '06 #3

Jean-François Michaud wrote:
This revision indicator simply looks like a border to the left of the
page, but is always located at the same distance from the edge of the
page. Ouputing a border on the containing block doesn't work because
the blocks are indented within sections (everything in FO is
represented as lists within lists to facilitate indentation of sections
and subsections). Does anyone have an idea how I can accomplish this?


They seem to imply in the FOP FAQ that there is no problem using
fo:border to do sidebars.

http://xmlgraphics.apache.org/fop/fo.html#fo-lines

But.... they do not give an example of that actually being done.

It has been a couple of years since I was really into FOP and XSL-FO.
So I might have it wrong - but that seems doable.

May 2 '06 #4

John R. Software wrote:
Jean-François Michaud wrote:
This revision indicator simply looks like a border to the left of the
page, but is always located at the same distance from the edge of the
page. Ouputing a border on the containing block doesn't work because
the blocks are indented within sections (everything in FO is
represented as lists within lists to facilitate indentation of sections
and subsections). Does anyone have an idea how I can accomplish this?
They seem to imply in the FOP FAQ that there is no problem using
fo:border to do sidebars.


I'm sorry, I should have been clearer when I meant it doesn't work.
Creating a left border to indicate a revision change works but what I
meant is that its not an option in the context of using
"fo:list-block"s to indent all my content because the requirement is
that the revision indicator should always be located at the same
distance from the left edge of the page independently from the current
hanging list item indent. I use fo:list-block everywhere.

I could forget about using fo:list-block altogether to generate the
required sections/subsections/subsubsections indent and potentially
wrap everything that can be revised with an fo:block in which case all
those fo:block wrappers would all be aligned to the left of the page
body. The real fun starts thought when you think about trying to align
the content of those blocks in corelation with the content of other
such "fo:block wrapper" blocks so that the indents of the underlying
entities remains coherent. For example, when say trying to reproduce
list indent behavior across the content of many of those revision
fo:block wrappers. It seems somewhat clumsy to me. Thats the only
potential solution I've seen so far. In the current context this
solution implies recoding most of the stylesheet.
http://xmlgraphics.apache.org/fop/fo.html#fo-lines

But.... they do not give an example of that actually being done.

It has been a couple of years since I was really into FOP and XSL-FO.
So I might have it wrong - but that seems doable.


May 3 '06 #5
Hmmm. Conceptually, what you need to do is reserve an additional thin
column, adjacent to (or contained within?) the margin, where the
revision bar would appear.

I haven't done anywhere near enough XSL:FO hacking to know how
unreasonable it would be to try to implement that way. I agree that it's
the sort of thing which I'd prefer to have the page layout language
assist me with.

There's always the solution of using a stylesheet to render into some
other page markup language, such as LaTeX, which has better support for
this particular function... but personally I'd rather see a solution
that doesn't require leaving the XML world.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
May 3 '06 #6

Joe Kesselman wrote:
Hmmm. Conceptually, what you need to do is reserve an additional thin
column, adjacent to (or contained within?) the margin, where the
revision bar would appear.
Basically yes. If I could potentially create such a construct per page
say within a table. two columns; one for the actual margin and a thin
slice of the of the margin for the revision bar. This approach seems to
naturally offer proper alignment of the revision bar. The potential
problem is trying to somehow make the structure of the document match
the structure of what is contained within the column in question so
that my revision indicators can be aligned with the correct parts of
the document by "following" the content. To a certain extent, it seems
like it would be just about as much work as the other solution but down
a different path.
I haven't done anywhere near enough XSL:FO hacking to know how
unreasonable it would be to try to implement that way. I agree that it's
the sort of thing which I'd prefer to have the page layout language
assist me with.
I'm relatively new to XSL:FO also. I'd also prefer to see this
happening at the language level. The roads to solving the problem seem
a bit rocky :).
There's always the solution of using a stylesheet to render into some
other page markup language, such as LaTeX, which has better support for
this particular function... but personally I'd rather see a solution
that doesn't require leaving the XML world.


Thats unfortunately not an option for me either. I have to stay in the
XML world.

Regards
Jean-Francois Michaud

May 3 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jurrie | last post by:
Hi all, Is there a function or something in XSLT or XSL-FO to make data from an XML-file uppercase? I ask this becouse I have a XML-document with <title>whatever</title> tags, and i want the...
4
by: David | last post by:
Hello list, I'm using XML + XSL + CSS to display my data to the web. I also want to publish my pages in PDF format. To accomplish this I first must transform my XML + XSL + CSS in XSL-FO. Is...
2
by: Rita Mathoa | last post by:
I have a giant xsl-fo document that I am running though Apache FOP to generate a pdf. I would like to break this xsl-fo file into smaller, more manageable pieces, but have those pieces get pulled...
0
by: Rary | last post by:
I am using XSL:FO to generate PDF report for my XML, generating it in tables, i want that tables should completely be at one place, if there is a page break , all the contents of the table should...
4
by: JLP | last post by:
Hello, I have a couple of hundred books in TEI based XML. I want to output html and pdf documents. I started building my own style sheets to do this and I ran into a problem with footnotes. Many...
8
by: Markus Wildgruber | last post by:
Hi! We want to use XSL-FO in the reporting of our application. Before making the decision we have some questions on that topic: Does anyone have experience with XSL-FO in the .NET environment?...
13
by: vm98123 | last post by:
Hi, could someone please give me a clue to this one: I do have an xml-File and an xslt-File so that a browser can display the xml-file. What I am trying to do is convert this to pdf or...
1
by: jamesm6162 | last post by:
Hi I have the following XSL-FO document that I'm testing with the FOP processor. The table I put in, however, is completely stuck to the left side of the body-region, regardless of which margins...
1
by: cleary1981 | last post by:
Hi, I am trying to add page numbers to my document in xsl fo. I can get the page numbers to work but I need them to show at the bottom of each page. I know you can define an area as region-after...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.