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 MIDON ALEXIS <AL...@sgam.com> on 2004/10/20 15:18:12 UTC

XPath 2.0 & XSLT 2.0

 
Hi,
 
I would like to know if FOP is compliant with XPath 2.0 & XSLT 2.0.
I guess it is not since the last FOP release is former to these standards.
 
Could you confirm?
 
 
Thx,
 
Alexis

Re: XPath 2.0 & XSLT 2.0

Posted by Jeremias Maerki <de...@greenmail.ch>.
That's not true. FOP really doesn't care about XPath or XSLT. Maybe that
didn't come out well enough. All you have to find is a way to send
XSL-FO as SAX events to FOP's Driver class. How you do this (XSLT 1 or
XSLT 2 or by hand or whatever) is utterly irrevevant.

If you think that these tricks are unsuitable for a production
enviroment, that may be (though I don't think so), but it has nothing to
do with FOP.

On 21.10.2004 10:45:37 MIDON ALEXIS wrote:
> To put in a nutsell, I would say that XPath 2.0 & XSLT 2.0 are not
> supported. All these tricks are quite unsuitable for a production
> environment.


Jeremias Maerki


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


RE: XPath 2.0 & XSLT 2.0

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: J.Pietschmann [mailto:j3322ptm@yahoo.de]

> Andreas L. Delmelle wrote:
>   > Should be quite simple really: replace the Xalan jar in your JVM's
> > 'lib/endorsed' directory with Saxon's jar.
>
> Note that this will wreck all Java applications on the system
> which need a writable DOM implementation, because the read-only
> DOM implementation supplied with Saxon overrides the JRE
> implementation. Use with care.

Thanks for the warning! Hadn't run into any problems yet, but at least now I
know where to look if it happens.

Greetz,

Andreas


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


Re: XPath 2.0 & XSLT 2.0

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Andreas L. Delmelle wrote:
  > Should be quite simple really: replace the Xalan jar in your JVM's
> 'lib/endorsed' directory with Saxon's jar.

Note that this will wreck all Java applications on the system
which need a writable DOM implementation, because the read-only
DOM implementation supplied with Saxon overrides the JRE
implementation. Use with care.

Setting the system property javax.xml.transform.TransformerFactory
to Saxon's implementation should do the trick without global
consequences:
java -Djavax.xml.transform.TransformerFactory=\
com.icl.saxon.TransformerFactoryImpl org.apache.fop.appl.Fop ...

This is for Saxon 6.x, Saxon 7.x and 8.x use another class name.

> (We could also have opted not to distribute *any* XML parser or XSLT engine,
> and leave it all up to the end-user, but this would needlessly complicate
> things --no more running FOP 'out-of-the-box' :-( )

It was necessary to distribute Xalan+Xerces in the Java 1.3
days. Now that nearly everybody who got past Java 1.1.8 should
have upgraded to 1.4, we can change this.

J.Pietschmann

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


Re: XPath 2.0 & XSLT 2.0

Posted by Clay Leeds <cl...@medata.com>.
On Oct 20, 2004, at 11:41 AM, Clay Leeds wrote:
> On Oct 20, 2004, at 10:28 AM, Andreas L. Delmelle wrote:
>>> -----Original Message-----
>>> From: Clay Leeds [mailto:cleeds@medata.com]
>>
>>> Could you explain how one would 'plug in Saxon 7 instead' of Xalan 
>>> for
>>> parsing?
>>
>> Maestro,
>>
>> Should be quite simple really: replace the Xalan jar in your JVM's
>> 'lib/endorsed' directory with Saxon's jar. (Maybe to make sure all 
>> goes
>> well, you could also replace it in FOP's own lib directory, then 
>> rebuild
>> FOP, but IIRC this shouldn't be necessary...)
>
> Thank you Andreas! I'm sure future browsers for this issue will thank 
> you! Would you be willing to write up some documentation on how to do 
> this so I can add it to the FAQ as well as the Running page (unless it 
> would be more appropriate on the Configuration page).
>
>> Try it, and use the following in your XSLT to check:
>> <xsl:value-of select="system-property('xsl:vendor')" />
>
> I haven't tried it yet as I haven't had the need. But I will flag this 
> message (and use it to update the docs when I get the chance...).

I suppose I could write the documentation myself, but I'm a bit behind 
in that regard, as I work through issues processing xml-fop's xdocs 
with forrest. I think I'm pretty close on that (and I'm getting help 
from the Forrest Team), but I'm/we're not there yet. One nice benefit, 
is that I've been doing a bunch of documentation (for my company and 
for Barcode4J) using forrest and the xdoc format. I'm now a lot more 
knowledgeable about forrest than I was before.

Web Maestro Clay
-- 
Clay Leeds - <cl...@medata.com>
Webmaster/Developer - Medata, Inc. - <http://www.medata.com/>
PGP Public Key: <https://mail.medata.com/pgp/cleeds.asc>


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


Re: XPath 2.0 & XSLT 2.0

Posted by Clay Leeds <cl...@medata.com>.
On Oct 20, 2004, at 10:28 AM, Andreas L. Delmelle wrote:
>> -----Original Message-----
>> From: Clay Leeds [mailto:cleeds@medata.com]
>
>> Could you explain how one would 'plug in Saxon 7 instead' of Xalan for
>> parsing?
>
> Maestro,
>
> Should be quite simple really: replace the Xalan jar in your JVM's
> 'lib/endorsed' directory with Saxon's jar. (Maybe to make sure all goes
> well, you could also replace it in FOP's own lib directory, then 
> rebuild
> FOP, but IIRC this shouldn't be necessary...)

Thank you Andreas! I'm sure future browsers for this issue will thank 
you! Would you be willing to write up some documentation on how to do 
this so I can add it to the FAQ as well as the Running page (unless it 
would be more appropriate on the Configuration page).

> Try it, and use the following in your XSLT to check:
> <xsl:value-of select="system-property('xsl:vendor')" />

I haven't tried it yet as I haven't had the need. But I will flag this 
message (and use it to update the docs when I get the chance...).

> The theory:
> FOP never references classes in Xalan's own packages 
> (org.apache.xalan.*).
> All Xalan does for us is offer an implementation for the
> javax.xml.transform.* API spec. Any provider of an implementation for 
> these
> packages --Saxon, for example-- should work seamlessly with FOP.
> The javax.xml.transform API spec hasn't been altered in any way as a 
> result
> of XSLT/XPath 2.0 --it didn't *need* to be, which is the whole point, 
> of
> course... XSLT can continue to evolve, but the javax.xml.transform API
> should be generic enough to support possible changes.
>
> In the same fashion, one could opt to use an XML parser other than 
> Xerces.
> We offer Xerces and Xalan because we can distribute them freely with 
> FOP.
> (We could also have opted not to distribute *any* XML parser or XSLT 
> engine,
> and leave it all up to the end-user, but this would needlessly 
> complicate
> things --no more running FOP 'out-of-the-box' :-( )
>
> Cheers,
>
> Andreas

Thanks again for the education!

Web Maestro Clay
-- 
Clay Leeds - <cl...@medata.com>
Webmaster/Developer - Medata, Inc. - <http://www.medata.com/>
PGP Public Key: <https://mail.medata.com/pgp/cleeds.asc>


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


RE: XPath 2.0 & XSLT 2.0

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
>
<snip />
> In the same fashion, one could opt to use an XML parser other than Xerces.

FYI: While browsing through the sources, I found only one direct reference
to a Xerces-specific class (in: org.apache.fop.hyphenation.PatternParser),
and here it is explicitly mentioned as 'default' parser, in case none is
specified in the  'org.xml.sax.parser' system property.

Greetz,

Andreas


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


RE: XPath 2.0 & XSLT 2.0

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Clay Leeds [mailto:cleeds@medata.com]

> Could you explain how one would 'plug in Saxon 7 instead' of Xalan for
> parsing?

Maestro,

Should be quite simple really: replace the Xalan jar in your JVM's
'lib/endorsed' directory with Saxon's jar. (Maybe to make sure all goes
well, you could also replace it in FOP's own lib directory, then rebuild
FOP, but IIRC this shouldn't be necessary...)

Try it, and use the following in your XSLT to check:
<xsl:value-of select="system-property('xsl:vendor')" />

The theory:
FOP never references classes in Xalan's own packages (org.apache.xalan.*).
All Xalan does for us is offer an implementation for the
javax.xml.transform.* API spec. Any provider of an implementation for these
packages --Saxon, for example-- should work seamlessly with FOP.
The javax.xml.transform API spec hasn't been altered in any way as a result
of XSLT/XPath 2.0 --it didn't *need* to be, which is the whole point, of
course... XSLT can continue to evolve, but the javax.xml.transform API
should be generic enough to support possible changes.

In the same fashion, one could opt to use an XML parser other than Xerces.
We offer Xerces and Xalan because we can distribute them freely with FOP.
(We could also have opted not to distribute *any* XML parser or XSLT engine,
and leave it all up to the end-user, but this would needlessly complicate
things --no more running FOP 'out-of-the-box' :-( )

Cheers,

Andreas


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


Re: XPath 2.0 & XSLT 2.0

Posted by Clay Leeds <cl...@medata.com>.
Andreas,

Could you explain how one would 'plug in Saxon 7 instead' of Xalan for 
parsing? I looked in the FAQ, and only found this blurb[1]:

> Problems specific to a certain XSLT processor, like Xalan, Saxon or  
> MSXML, should be handled by processor specific lists. This includes  
> problems with deployment, processor specific extensions, suspected  
> bugs and processor specific APIs. Note that JDK 1.4 comes with an  XML 
> parser and an XSLT processor which are older versions of  Xerces and 
> Xalan, respectively, and both have a number of annoying  bugs. See 
> $$$FIXME on how to use more recent versions or other  packages 
> instead.

hehehe... looks like this entry needs to be updated, so whatever 
information can be provided could at least be in the mailing list 
archives until the FAQ and/or site is updated. ;-)

[1]
http://xml.apache.org/fop/faq.html#postquestions

On Oct 20, 2004, at 8:43 AM, Andreas L. Delmelle wrote:
>> -----Original Message-----
>> From: MIDON ALEXIS [mailto:ALEXIS.MIDON@sgam.com]
>
>> I would like to know if FOP is compliant with XPath 2.0 & XSLT 2.0.
>
> Yes and No.
>
> No, since FOP is by default distributed with Apache Xalan as XSLT 
> Engine,
> and AFAICT Xalan does not yet implement XSLT 2.0.
>
> Yes, because if you like, you can plug in Saxon 7 instead, which does 
> offer
> support for XSLT/XPath 2.0.
>
>
> Greetz,
>
> Andreas

Web Maestro Clay
-- 
Clay Leeds - <cl...@medata.com>
Webmaster/Developer - Medata, Inc. - <http://www.medata.com/>
PGP Public Key: <https://mail.medata.com/pgp/cleeds.asc>


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


RE: XPath 2.0 & XSLT 2.0

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: MIDON ALEXIS [mailto:ALEXIS.MIDON@sgam.com]

> I would like to know if FOP is compliant with XPath 2.0 & XSLT 2.0.

Yes and No.

No, since FOP is by default distributed with Apache Xalan as XSLT Engine,
and AFAICT Xalan does not yet implement XSLT 2.0.

Yes, because if you like, you can plug in Saxon 7 instead, which does offer
support for XSLT/XPath 2.0.


Greetz,

Andreas


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