You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ulrich Mayring <ul...@denic.de> on 2009/01/07 18:19:17 UTC

How to tell which XML parser Fop 0.95 is using?

Hi all,

is there any way to find out programmatically which XML parser and XSLT 
transformer Fop is actually using at runtime?

Since Fop uses JAXP, I can of course look up the various factories, but that 
won't tell me the actual implementation version being used. Maybe this is 
more of a JAXP question, but in fop 0.20.5 there was a method in the Driver 
class, which would supply some of this info.

Ulrich


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


Re: How to tell which XML parser Fop 0.95 is using?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 08.01.2009 10:56:39 Ulrich Mayring wrote:
> Jeremias Maerki wrote:
> > Currently, FOP uses the default JAXP factories. We talked once about
> > making this configurable but nobody has taken the time, yet.
> 
> I don't think it is necessary to make the factories configurable within FOP, 
> any user program embedding FOP can do this. Also, the properties can be set 
> on the command line for calling FOP directly.

I'm with you on this, but there were other voices who wanted finer
control. No two people have the same requirements.

> However, knowing the factory will not tell me anything about the actual 
> implementation version being used. I guess I can instantiate the factories 
> myself and hope that FOP does it the same way... but it would be better to 
> ask FOP directly which parser it uses.

FOP couldn't tell you more that you can easily find out yourself. In my
test sandboxes I do:
System.out.println("SAXParserFactory: " + SAXParserFactory.newInstance().getClass().getName());
System.out.println("SAXTransformerFactory: " + SAXTransformerFactory.newInstance().getClass().getName());

This shows the default factory classes that FOP uses.

That's about all you can do. JAXP doesn't offer version information
about the implementation in a standard way, which is why I also do this:
System.out.println("Apache Xerces: " + org.apache.xerces.impl.Version.getVersion());
System.out.println("Apache Xalan: " + org.apache.xalan.Version.getVersion());
System.out.println("SAXON: " + net.sf.saxon.Version.getProductVersion());


Jeremias Maerki


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


Re: How to tell which XML parser Fop 0.95 is using?

Posted by Ulrich Mayring <ul...@denic.de>.
Jeremias Maerki wrote:
> Currently, FOP uses the default JAXP factories. We talked once about
> making this configurable but nobody has taken the time, yet.

I don't think it is necessary to make the factories configurable within FOP, 
any user program embedding FOP can do this. Also, the properties can be set 
on the command line for calling FOP directly.

However, knowing the factory will not tell me anything about the actual 
implementation version being used. I guess I can instantiate the factories 
myself and hope that FOP does it the same way... but it would be better to 
ask FOP directly which parser it uses.

Ulrich


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


Re: How to tell which XML parser Fop 0.95 is using?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Currently, FOP uses the default JAXP factories. We talked once about
making this configurable but nobody has taken the time, yet.

On 07.01.2009 18:19:17 Ulrich Mayring wrote:
> Hi all,
> 
> is there any way to find out programmatically which XML parser and XSLT 
> transformer Fop is actually using at runtime?
> 
> Since Fop uses JAXP, I can of course look up the various factories, but that 
> won't tell me the actual implementation version being used. Maybe this is 
> more of a JAXP question, but in fop 0.20.5 there was a method in the Driver 
> class, which would supply some of this info.
> 
> Ulrich
> 


Jeremias Maerki


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