You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Tony Nys <To...@aditel.be> on 2002/03/05 14:58:03 UTC

JDK1.4 how can we let jdk1.4 use new xerces/xalan

does anyone know which apicalls in jdk1.4 invoke functions in it's
xalan/xerces which is included in the
jdk1.4 distribution ?

in other words, I would not call those api's and our program would use
xerces 2.0.1 and xalan 2.3.1

Re: JDK1.4 how can we let jdk1.4 use new xerces/xalan

Posted by Glenn Nielsen <gl...@voyager.apg.more.net>.
JDK 1.4 has a mechanism you can use to override Standard endorsed API's 
which come with JDK1.4, so you can override the XML and XSLT parsers that
come with JDK1.4 without having to modify your code.

See the following documentation on Sun's site:

http://java.sun.com/j2se/1.4/docs/guide/standards/index.html

Regards,

Glenn

Tony Nys wrote:
> 
> does anyone know which apicalls in jdk1.4 invoke functions in it's
> xalan/xerces which is included in the
> jdk1.4 distribution ?
> 
> in other words, I would not call those api's and our program would use
> xerces 2.0.1 and xalan 2.3.1

-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

RE: JDK1.4 how can we let jdk1.4 use new xerces/xalan

Posted by Gunnlaugur Thor Briem <gt...@dimon.is>.
Hi Tony,

You probably want to do this just to make sure you're
using the latest versions, right? For that you have two
choices:

(1) use the parser's and XSLT engine's factory classes
directly. This is undesirable for your development ...
it is more convenient to be able to easily switch engines,
try out different ones to see which is the fastest, has
the fewest bugs, etc. Definitely not recommended, but if
you must, you can read how to use them in the API docs:

http://xml.apache.org/xalan-j/apidocs/
org.apache.xalan.processor.TransformerFactoryImpl

http://xml.apache.org/xerces-j/apiDocs/
org.apache.xerces.jaxp.SAXParserFactoryImpl
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl

(2) use JAXP but override the default factories by placing
the newer-version jars in the endorsed-standards folder of
your JVM. This is the preferred way of doing it (and the
only way, if you are using other people's code and they use
JAXP), but it only works if your deployment scheme allows
you to muck with the endorsed standards folder. This is the
case if:

  (a) you can muck with the JVM installation, or
  (b) you can set system properties on the JVM startup

(a) might not be the case if you are deploying in somebody's
JVM and you don't expect them to be willing or able to change
the JVM setup.

(b) might not be the case if you are deploying in somebody's
J2EE server or servlet engine, which is hosting other apps
as well.

See http://java.sun.com/j2se/1.4/docs/guide/standards/
for how to override the endorsed standards.

Caveat: I haven't yet needed to try this out myself! :)
But it seems pretty straightforward.

	- Gulli



> -----Original Message-----
> From: Tony Nys [mailto:Tony.Nys@aditel.be]
> Sent: 5. mars 2002 13:58
> To: xalan-dev@xml.apache.org
> Subject: JDK1.4 how can we let jdk1.4 use new xerces/xalan
> 
> 
> does anyone know which apicalls in jdk1.4 invoke functions in it's
> xalan/xerces which is included in the
> jdk1.4 distribution ?
> 
> in other words, I would not call those api's and our program would use
> xerces 2.0.1 and xalan 2.3.1
>