On 16 Jun 2009, at 19:33, Steve Ebersole wrote:
Thanks again Andreas.
Can you think of a way to build such a facility? Some event
listener I
could use to track where we are in the processing? I guess I could
intercept/delegate the SAX events, but that seems ugly.
The reason why FOP cannot give you the location information, is
because it is not available. Even if you do manage to intercept the
SAX events, the Locator you'd obtain will not carry that data either.
We simply show what we receive via the parser. Really, the only way I
see to get that information would be to substitute XML+XSLT input by
FO input.
Hint: FOP itself actually uses an identity Transformer when receiving
direct FO input from the command-line. I think you may be able to
check for a debug-mode condition in your code, and if so, insert a
second XSLT step that dumps the intermediate FO-file to disk. If you
feed that to FOP using the basic usage pattern, the line/column
information will be shown instead of '-1:-1'. You can then open the FO
file in the editor, and check the FO element at that position.
Does this answer the question, or were you more looking for something
like http://xmlgraphics.apache.org/fop/trunk/events.html? (How to
listen for those events, and have your application halt, even though
for FOP this is not a fatal error...)
Regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]