If you can write your own code you could do the 2 step transformation to avoid 
the issue without writing the FO file to disk.
FOP allows you to receive the results as streaming bytes which you can send 
right back in as an FO SAXSource. 

-----Original Message-----
From: Georg Datterl [mailto:georg.datt...@geneon.de] 
Sent: Tuesday, December 07, 2010 12:17 PM
To: fop-users@xmlgraphics.apache.org
Subject: AW: AW: ValidationException: Document is empty

Hi Chris,

I think that's the important point. I'll rewrite my transformation tomorrow and 
have a look. Thanks a lot. Oh, and 20 points for the plausible explanation.

Regards,

Georg Datterl

------ Kontakt ------

Georg Datterl

Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg

HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20

www.geneon.de

Weitere Mitglieder der Willmy MediaGroup:

IRS Integrated Realization Services GmbH:    www.irs-nbg.de
Willmy PrintMedia GmbH:                            www.willmy.de
Willmy Consult & Content GmbH:                 www.willmycc.de


-----Ursprüngliche Nachricht-----
Von: Christopher R. Maden [mailto:cr...@maden.org]
Gesendet: Dienstag, 7. Dezember 2010 17:48
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: ValidationException: Document is empty

On 12/07/2010 11:43 AM, Georg Datterl wrote:
> I'm not quite sure WHO exactly complains. The original xslt (with
> <) works fine if I use it to transform the xml file. It generates a 
> fo-file which I can then transform into a pdf. The corrected xslt 
> works fine, if I don't use more complex transformations. It stops 
> working when I use variables.

Ah... I've got it now.

This is why use of disable-output-escaping is so strongly discouraged...

When you use XSLT to transform your XML and serialize it to disk, the d-o-e is 
applied and you get a valid FO.

However, when you feed XML and XSLT to FOP, your transformation result is never 
serialized.  The d-o-e directive is never applied, and a poorly-formed XML data 
structure is passed to FOP, resulting in your error.

You will need to rewrite your transformation to avoid use of d-o-e.  It is an 
unfortunate hack that really shouldn't have been included in XSLT; it is never 
necessary, and while it enables some quick hacks that would be more complicated 
otherwise, it also is prone to mysterious breakage like your case.

~Chris
--
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
 MISSING: land of free, home of brave.
 Last seen 10 September 2001.  Reward offered.
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to