cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

XSL-FO Help

ksperring
1-Newbie

XSL-FO Help

Greetings Adepters,

IÂ’m having a real difficult time producing some RTF output.
I doubt the problem I have is unique, in fact is probably quite common, but I donÂ’t seem to be able to find a workable solution.
IÂ’d like to produce a paragraph with a label.
IÂ’ve tried using the to display the text, but Word seems to only produce bullets and no text, in the label block.
IÂ’ve also tried to setup the hanging indent, but this is not producing the desired results.
IÂ’ve also tried to reverse the leading.

IÂ’m trying to convert XML to RTF using xsl-fo.

The output should look something like this:

[1] This is the text of the para etc etc which when wrapping has a hanging indent
This is then the second line of my paragraph.

If anyone has any suggestions, IÂ’d really appreciate your help and advise.
IÂ’m using Arbortext 5.3 to create the style sheet.

Thanks
Kevin
7 REPLIES 7

Hi Kevin-



Your message seems to have been garbled up somehow, the samples are all
run together or something. Could you resend the message as plain text or
something else so we can see more clearly what you're trying to do?



--Clay


[1] the text on line 1

the following text on line 2.

I'm trying to achieve side by side blocks in RTF using XSL-FO

in CSS and PDF this would be achieved with reverse leading.

OK, I'm trying to combine this with your original message to see what
you've tried and what you want. It's hard to tell because I think your
original message had some markup that got gobbled up at some point in
the email pipeline, but it sounds like you tried setting this up as a
<fo:list-item> with a <fo:list-item-label> and <fo:list-item-body>. That
would be the canonical way to do this in XSL-FO. But it sounds like the
list-item-label is getting lost in the translation to RTF.



In that case, you may have to resort to the old HTML kluge: use a table.
Make a one-row table where the first cell contains the label and the
second contains the paragraph itself. By setting the column widths as
necessary you should be able to get the desired format.



--Clay


I'm not sure I understand what you're using for the FO processor? Apache FOP? We took a look at Apache's FO processor that generates RTF and rejected it (numerous formatting issues). Apparently, they've abandoned the project. In the end, we went with a pure XSLT transformation directly to Word 2007. That was an interesting project.

Dave
lfraley
6-Contributor
(To:ksperring)

That's what I do as well.

Liz

I don't necessarily have the answers, but let me add a few data points
that seem to be missing from this thread to date.

1. One of the outputs one can get using Styler is RTF.

2. The way this works under the covers is that the style file
is converted into what is basically and xsl-fo stylesheet
which is used to transform the input document into an FO
result document which then undergoes some special massaging
and then gets handed to another program that converts
(specially massaged) FO into RTF. That's probably why Kevin
is talking about FO when he wants RTF.

3. Popping back to the top level, you should be able to use Styler's
definition list style to get what I believe you want.

4. If that doesn't work, you could consider edited source, in which
case you'd be working in what it basically an xsl-fo stylesheet,
so comments about fo:list-block become relevant. But there are
many downsides to resorting to edited source if you can at all
avoid it.

5. For RTF output, often the best solution is to define the Word
style you want in a Word template file, and then use the RTF
features in Styler to associate the appropriate style with the
element in question.

I don't know Word much at all, I'm just familiar with some of the
technical details of the Styler-to-RTF process, but we do have people
who could give you more help in this area if you want to contact our
customer support.

paul

Hey Kevin,

Probably you're aware that you can export XSL:FO and XSL:FO for RTF
stylesheets from Styler. This might be useful for diagnosing what is not
working as you hope from the Styler stylesheet OR to provide a "pure" XSL:FO
stylesheet to debug / hack to pieces / munge directly while you figure out
the markup you need in order to get the RTF you want.

If you can get the right FO code from this technique, you may then be able
to figure out how to retrofit the original stylersheet (with edit source
customizations if that's the only way) to get what you want.

I have a three column procedure format that we successfully output to PDF
and HTML but we balked at doing it in XSL:FO for RTF simply becausue the RTF
is for review purposes, not publication purposes so it didn't have to meet
the higher output/format standards of the other two. If you're interested in
the XSL code for HTML, I can dig that up and send it your way.

To export from Styler choose File > Export > yourdesiredoutput, probably the
XSL:FO RTF.

Good luck!

--
Paul Nagai
Top Tags