That's the sort of thing I was thinking of (the preprocessor). However, if we're producing a more favorable format anyway we could just as easily produce a fo file and feed that to fop.
We were just wondering why we couldn't do this in one call to fop, but that is all clear now. $ -----Original Message----- $ From: Cox, Charlie [mailto:[EMAIL PROTECTED] $ Sent: donderdag 27 juni 2002 13:57 $ To: '[EMAIL PROTECTED]' $ Subject: RE: Weird behaviour of Apache fop $ $ $ why can't you do multiple transformations? the first $ transformation will $ transform the xml into another xml document where you rearrange the $ elements/attributes into a format more favorable to you. $ $ Then your second transformation can use the new xml to do $ tree parsing. $ $ You may not be able to change the XML, but you can change $ what you do with $ it :) $ $ Charlie $ $ > -----Original Message----- $ > From: Michiel Verhoef [mailto:[EMAIL PROTECTED] $ > Sent: Thursday, June 27, 2002 4:43 AM $ > To: '[EMAIL PROTECTED]' $ > Subject: RE: Weird behaviour of Apache fop $ > $ > $ > Unfortunately we're in a non Java environment here. We've got $ > to work with a $ > couple of developers who $ > have no clue as to what they are doing but are considered $ > "essential" to the $ > project. Any necessary changes $ > in the "xml" are non negatioable :-( $ > $ > As the actual content is stored in an attribute (sheesh, go $ > figure, 10+ $ > lines of PCDATA in an attribute $ > of a text-block element!) we cannot perform a general $ > search-and-replace $ > (for instance using AWK) before we $ > parse the documetn (XML cannot contain "<" in attributes). $ > $ > I guess we'll just build a preprocessor using XSLT and $ > transform the "xml" $ > to a fo file and then feed this $ > to fop. $ > $ > $ > $ -----Original Message----- $ > $ From: Oleg Tkachenko [mailto:[EMAIL PROTECTED] $ > $ Sent: donderdag 27 juni 2002 11:36 $ > $ To: [EMAIL PROTECTED] $ > $ Subject: Re: Weird behaviour of Apache fop $ > $ $ > $ $ > $ So, just transform to string and give the string to fop, no $ > $ big deal using jaxp. $ > $ $ > $ Michiel Verhoef wrote: $ > $ > Perhaps to stress unneccessary: the transformation as such $ > $ does work. $ > $ > $ > $ > Guessing from the information so far it looks like we're $ > $ unable to create a $ > $ > tree. We are able to $ > $ > create a string, which looks exactly like the tree we need $ > $ when written to a $ > $ > file. $ > $ > $ > $ > Humm... need to thyink about that one for a while... $ > $ > $ > $ > $ > $ > $ -----Original Message----- $ > $ > $ From: Michiel Verhoef [mailto:[EMAIL PROTECTED] $ > $ > $ Sent: donderdag 27 juni 2002 8:02 $ > $ > $ To: '[EMAIL PROTECTED]' $ > $ > $ Subject: RE: Weird behaviour of Apache fop $ > $ > $ $ > $ > $ $ > $ > $ I'm afraid a slight mistake has been made in WJ's answer: our $ > $ > $ input does not $ > $ > $ contain <i> elements etc. but <i> type strings. $ > $ > $ $ > $ > $ Thus, we have to do string processing instead of writing $ > $ templates :-( $ > $ > $ $ > $ > $ Were we able to use Perl I'd have it done in a couple of $ > $ > $ lines days ago, but $ > $ > $ alas, we can't :-) $ > $ > $ $ > $ > $ $ > $ > $ Michiel $ > $ > $ > $ $ > $ $ > $ $ > $ -- $ > $ Oleg Tkachenko $ > $ Multiconn International Ltd, Israel $ > $ $ > $