--- Jeremias Maerki <[EMAIL PROTECTED]> wrote:

> I think you're confusing things. 

Yes, I think I was.

> If someone embeds FOP in
> his/her application the
> not supplying an OutputStream when a renderer needs
> one is a bug and so
> it doesn't matter if the error message comes early
> or only when the
> renderer is started (Renderer.startRenderer()).
> 

OK, I see what you're saying here--it would be one
time only programmatic change for the user to fix his
embedded code.

If I understand you correctly, all that would be
needed for renderer overrides is to just raise an
exception within Renderer.startRenderer(OutputStream)
if the OutputStream is null (for those renderers
requiring an OutputStream).  Arguably, the Renderer
should be programmed to do that anyway, even if it is
checked earlier.  That makes sense--and I now agree
with your previous change of not checking for an
OutputStream when the RendererOverride is set.  Thanks
for the clarification.

(I still prefer the one-line check in RendererFactory
for our *hardcoded* renderers--for
documentation/comprehension reasons, and it gives us a
common error message for our own renderers.)


> 
> Ok, here's your technical justification:
> I'm certain you've seen the new test subsystem for
> the layout engine
> where I analyze the output of the area tree
> renderer. If I wrote the
> area tree to an OutputStream I'd have to parse it
> again later, so I get
> a DOM I can evaluate XPath statements on. If I can
> pass in a
> TransformerHandler into the XMLRenderer the renderer
> can simply send SAX
> events which are used by a Transformer to build a
> DOM from (directly).
> 

I haven't looked at your test framework yet here--I
hope to be able to do so sometime soon.  I'm sure it's
very good.  I still have a little bit more bookmark
stuff to do.


> So here's another one. Do you know about SVG Print?
> An SVG renderer
> could send the generated SVG using SAX. That way a
> developer could run
> the generated SVG through an XSLT post-processing
> without having to
> reparse the generated SVG. That's a place where
> speed is very important
> and an OutputStream-only system would be suboptimal.
> 

I don't completely understand this idea (Namely, how
can you send "generated SVG using SAX"--wouldn't that
mean the "generated SVG" would have to be in XML
format?)--but it doesn't matter anyway because, again,
I don't have a problem with your validation change.  

Thanks,
Glen

Reply via email to