RE: [xep-support] FO output

From: Bob Cirilli <bob.cirilli@salaries.com>
Date: Tue Oct 04 2005 - 12:07:57 PDT

The outdated oracle XSLT processor that we were using was giving us
results that were inconsistent with other XSLT processors. Therefore,
we were running into a problem somewhere in the XSLT logic that was
introducing incorrect results on certain calculations..not necessarily
formatting errors (sorry about the confusion). Specifically, we were
having lots of problems getting the table column sizes to come out
right. We got this to work by just using Saxon 6.5.4, which gave us a
.fo file as well as correctly calculated column sizes.

We did put the FO content into a CDATA section, but we didn't want those
FO elements as real elements in the XML document because we did not want
to have to specify all of the necessary rules to handle them. Instead
we wanted these elements to pass through to the rendering phase as FO
where they could be handled directly (and correclty) by the XEP engine.

We had to create a temporary FO document for this to be possible,
however. The reason for this was that the FO in the CDATA block had to
be reparsed to be considered in the document tree. When using XEP to do
the transformation in one step (XML -> PDF), it thinks of the data
inside of the CDATA block as one block of textual information in a
previous node, instead of individual nodes themselves. So we were
getting an output of all of our FO (complete with all of the formatting
instructions) rather than the correctly formatted text.

We added an extra step where we outputted our .fo file, and then used
XEP to load it and output our PDF. This ensured that the entire
document would be reparsed, and that our FO that was sitting in the
CDATA blcok was parsed as well. Adding this extra step did introduce
some minimal performance loss, it allowed us to get away with not having
to specify rules for each FO type.

You are also right about wrapping the FO content in a special element.
We just have a template grab the value inside the element and disable
output escaping.

It's working now, but we had to beat around the bush a bit because (as
far as I know) XEP's xslt transform does not allow a .fo file as output,
but rather just direct output to a PDF or postscript file. If XEP does
support direct FO output ( or even reparsing the document after the
initial XSLT transformation), would someone please let me know?

Otherwise it seems we have found a working solution.

Thanks,

Bob Cirilli

-----Original Message-----
From: owner-xep-support@renderx.com
[mailto:owner-xep-support@renderx.com] On Behalf Of Eliot Kimber
Sent: Tuesday, October 04, 2005 1:04 PM
To: xep-support@renderx.com
Subject: Re: [xep-support] FO output

Bob Cirilli wrote:

   However,
> the XSLT processor we are using to do this is introducing many more
> formatting problems, and I would rather use XEP's technology for both
> steps if possible.

It shouldn't matter what XSLT engine you use to generate the FO
(assuming you're not using proprietary XSLT extensions). That is, it
shouldn't be possible for the XSLT process to "introduce formatting
problems" as the output of a given XSLT transform should be the same
from any conforming XSLT engine.

What sort of formatting problems are you having?

Therefore you shouldn't have any dependency on using the XSLT engine
integrated with XEP and should be able to use any useful XSLT engine to
generate the FO instance.

I'm assuming that you are putting the embedded FO content into CDATA
marked sections--that's the only way that it would not be a parsed part
of the output tree. Is there any reason you don't just allow those
elements as real elements in the input document? I do this with one of
my personal document types. That would eliminate the parsing problem.
The only potential issue here is that you might want to have a special
element to contain all the FO content so that you can more easily
control where it is allowed within a given document.

Cheers,

Eliot

--
W. Eliot Kimber
Professional Services
Innodata Isogen
9390 Research Blvd, #410
Austin, TX 78759
(512) 372-8841
ekimber@innodata-isogen.com
www.innodata-isogen.com
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address you
are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
http://www.renderx.com/terms-of-service.html
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Tue Oct 4 12:37:52 2005

This archive was generated by hypermail 2.1.8 : Tue Oct 04 2005 - 12:37:52 PDT