When you wrote that "you added saxon.jar to the classpath", how did you do it?

 Did you copy the file to a specific directory that was in the default class path? or
 did you modify the environment variable used by Java to add a new directory?

 <my opinion> to use a specific transformation that requires saxon can be accomplished
  by specifying an explicit classpath "-cp" that points to the saxon jars without changing
  the entire operating environment.  adding files to directories in the default classpath will change
  every java operation that uses that class-path.
     when I had made that type of simple mistake, i had similar results. it was simple to fix...
</my opinion>

On Mon, Oct 19, 2009 at 10:18 AM, Martin Trummer <martin.trummer@24act.com> wrote:
oh - yeah, seems I have mixe dup some things here

the topic should not read xalan, but xerces

setting the transformer factory explicitly works, but unfortunately this leads to other problems.

so: could you please tell me, why simply adding the saxon.jar to the classpath already changes the default?

I thought it should be like this:
 * I have to add the saxon.jar to the classpath
 * and if I really want it to be the default, I have to set the corresponding system parameters to use it
 * and if I don't (what I prefer), I simply pass the saxon-factoryClassName to the newInstance() method of the factory for the one special case, where I need it and everything else still works



-----Ursprüngliche Nachricht-----
Von: Martin Honnen [mailto:Martin.Honnen@arcor.de]
Gesendet: Montag, 19. Oktober 2009 16:53
An: Mailing list for the SAXON XSLT and XQuery processor
Betreff: Re: [saxon] newbie: using saxon, but configuring xalan as default

Martin Trummer wrote:

> I need to use saxon for one specific transformation, so I added the
> saxonhe-9.0.2.2.jar to the class-path and now it seems that saxon is
> the system default.
>
> Is this it possible at all, or did I miss something?
>
> If it's possible, is this the desired behaviour?
>
> If so: how can I change it?
> I already tried to pass the following vars to the application when it
> is
> run:
>
> -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.
> jaxp.SAXParserFactoryImpl
>
> -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Docu
> me
> ntBuilderFactoryImpl
> but this does not seem to change anything.

Well neither Saxon nor Xalan is a DOM or SAX parser, they are XSLT processors.
According to
http://java.sun.com/javase/6/docs/api/javax/xml/transform/TransformerFactory.html#newInstance()
you need to set the property
javax.xml.transform.TransformerFactory
if you want to set the JAXP transformer factory.


--

       Martin Honnen
       http://msmvps.com/blogs/martin_honnen/

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/saxon-help

--
This message was scanned by ESVA and is believed to be clean.
Click here to report this message as spam.
http://h0stname/cgi-bin/learn-msg.cgi?id=3D5E629608.ED9D7



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/saxon-help