You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Andreas Delmelle <an...@telenet.be> on 2008/02/01 17:50:26 UTC

Re: What to do with the XML JARs?

On Jan 31, 2008, at 22:20, Jeremias Maerki wrote:

> Can you two please explain to me what you mean by that?

Heh, now that you ask that, it does not seem so intuitive as I  
thought... at least, what I had in mind last night, has changed  
somewhat.

I guess what I mean --also in relation to the thread about the XML  
JARs-- is that Commons would get to contain a utility class/ 
subpackage from which both FOP and Batik get their TransformerFactory  
and XML-related classes. This mechanism could be made as smart as to  
check whether the configured JAXP-implementation supports the  
necessary features for FOP and Batik to run without possible trouble.  
Maybe it could even be made smart enough to look up whether such an  
implementation exists in the user's classpath.

So, by itself, not even Commons would depend directly on Apache  
Xalan, but we could have the utility class suggest to install/ 
configure Xalan, if necessary.

That way, FOP does not necessarily need to distribute Xalan anymore  
to work properly.

A question concerning the dependency on DOM Level 3: does FOP  
*itself* ever use any of this functionality, or is it only Batik that  
*possibly* needs this (depending on whether SVG 1.2 is used  
somewhere)? Does Batik require Xalan to work, period? Or does it only  
require Xalan *if* the user wants access to the SVG 1.2 features?


Cheers

Andreas

Re: What to do with the XML JARs?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Thanks for your input, Cameron.

On 02.02.2008 07:48:33 Cameron McCormack wrote:
> Andreas Delmelle:
> > A question concerning the dependency on DOM Level 3: does FOP  
> > *itself* ever use any of this functionality, or is it only Batik that  
> > *possibly* needs this (depending on whether SVG 1.2 is used  
> > somewhere)? Does Batik require Xalan to work, period? Or does it only  
> > require Xalan *if* the user wants access to the SVG 1.2 features?
> 
> Yeah, so Batik uses it for only two things: DOM Level 3 XPath
> functionality, as Jeremias mentioned (for 1.1 or 1.2 documents) and sXBL
> XPath selector syntax, which is only in 1.2 documents.  The former is
> only needed if those DOM Level 3 XPath functions are called from script.
> The latter is hardly used at all, and will have to be reworked to be XBL
> 2.0 in the future anyway, which doesn’t use XPath for bindings.
> 
> Does FOP allow documents to run script before being included in the
> resulting PDF (like with the -onload switch to the Batik rasteriser)?
> If not, then it’ll be completely safe to omit xalan.  Leaving it out
> should only cause linker problems when such scripts are run, anyway, not
> for arbitrary documents.

Unless Batik somehow automatically runs such scripts, no. FOP doesn't
initiate the running of any script code. BTW, the current SVG Print 1.2 WD
says: "A User Agent for Printing MUST NOT run any script or start any
animation in the SVG document." Since FOP is basically a "user agent for
printing", I think we can apply this rule to FOP, too, except if we
begin to include interactive features in FOP.

> We could rework Batik to use recent JAXP XPath functionality if that is
> present, or Xalan if that is present, or fail gracefully otherwise.
> 
> -- 
> Cameron McCormack, http://mcc.id.au/
> 	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au




Jeremias Maerki


Re: What to do with the XML JARs?

Posted by Cameron McCormack <ca...@mcc.id.au>.
Andreas Delmelle:
> A question concerning the dependency on DOM Level 3: does FOP  
> *itself* ever use any of this functionality, or is it only Batik that  
> *possibly* needs this (depending on whether SVG 1.2 is used  
> somewhere)? Does Batik require Xalan to work, period? Or does it only  
> require Xalan *if* the user wants access to the SVG 1.2 features?

Yeah, so Batik uses it for only two things: DOM Level 3 XPath
functionality, as Jeremias mentioned (for 1.1 or 1.2 documents) and sXBL
XPath selector syntax, which is only in 1.2 documents.  The former is
only needed if those DOM Level 3 XPath functions are called from script.
The latter is hardly used at all, and will have to be reworked to be XBL
2.0 in the future anyway, which doesn’t use XPath for bindings.

Does FOP allow documents to run script before being included in the
resulting PDF (like with the -onload switch to the Batik rasteriser)?
If not, then it’ll be completely safe to omit xalan.  Leaving it out
should only cause linker problems when such scripts are run, anyway, not
for arbitrary documents.

We could rework Batik to use recent JAXP XPath functionality if that is
present, or Xalan if that is present, or fail gracefully otherwise.

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au