Yeah that is how the current project is actually working. I thought about
all jdk1.4 users which may experience these issues using the "ant" way (xslt
and all other xml related tasks) and this solution doesn't look so
satisfactory.
I believe this is mostly a fault on the jdk side, they forged a version of
xalan and now it requires some complex tricks to use a newer version. If
they had done some renaming it would have helped alot.
I am currently trying to do some hacks in the xslt task to set a thread
context class loader. This should force the task to load the xml parser from
a given classpath rather than from the boot classpath (makes sense as the
xslt task allows a specific classpath). But maybe the xml parser is already
loaded somewhere else ?

Erik.

----- Original Message -----
From: "Sebastien Blanc" <[EMAIL PROTECTED]>
To: "Ant Developers List" <[EMAIL PROTECTED]>
Sent: Friday, March 21, 2003 4:26 PM
Subject: Re: xml parser and classloading


> + u'll have to add the ANT classpath inside to be able to launch the task.
here a
> sample where I was launching an ANT task inside a forked java to avoid
pbs:
>
>       <path id="mytask.class.path">
>           <fileset dir="${ejbenv.JAVA_HOME}/lib">
>              <include name="tools.jar" />
>           </fileset>
>           <fileset dir="${ejbenv.ANT_HOME}/lib">
>              <include name="ant.jar" />
>           </fileset>
>           <fileset dir="${ejbenv.CONT_HOME}/">
>              <include name="ant-contrib-0.1.jar" />
>           </fileset>
>           <fileset dir="${ejbenv.MAVEN_HOME}/repository/jaxp/jars">
>              <include name="jaxp-1.2.jar" />
>           </fileset>
>           <fileset dir="${ejbenv.MAVEN_HOME}/repository/xml-apis/jars">
>              <include name="xml-apis-2.0.2.jar" />
>           </fileset>
>           <fileset dir="${ejbenv.MAVEN_HOME}/repository/xalan/jars">
>              <include name="xalan-2.3.1.jar" />
>           </fileset>
>           <fileset dir="${ejbenv.MAVEN_HOME}/lib">
>              <include name="commons-logging-1.0.1.jar" />
>           </fileset>
>        </path>
>
> hope that will help.
> seb.
>
> Sebastien Blanc wrote:
>
> > Hi Erik !
> > I meant 'legacy' for u, the one u were using w/ 1.3 and that was working
for u.
> >
> > for ur concern, one way I would think of is to launch the xslt ant task
inside
> > a java call and fork it, so that u are able to then set ur classpath and
for
> > this task only (but looks to me u'll have to do it everywhere u want to
access
> > this parser and not the java one).
> > seb.
> >
> > Erik Putrycz wrote:
> >
> > > I did not knew Xalan2.3 was legacy ;)
> > > I know the bootclasspath trick works but I was looking for a way to
set it
> > > fully inside ant rather than setting java options.
> > > I have been trying some tricks with the contextclassloader but without
> > > success that far...
> > >
> > > Erik.
> > >
> > > ----- Original Message -----
> > > From: "Sebastien Blanc" <[EMAIL PROTECTED]>
> > > To: "Ant Developers List" <[EMAIL PROTECTED]>
> > > Sent: Thursday, March 20, 2003 7:16 PM
> > > Subject: Re: xml parser and classloading
> > >
> > > > did u try modifying ur ANT bootclasspath startup script to have ur
legacy
> > > > parser before the jdk1.4 one ?
> > > > seb.
> > > >
> > > > Erik Putrycz wrote:
> > > >
> > > > > I am currently having some troubles with the xslt/style task and I
> > > > > experience some bug due to the XML parser (Xalan2 bundled with
jdk1.4).
> > > > > The XML parser included with jdk1.4 suffers from some bugs and it
is a
> > > pain
> > > > > to force another XML parser.
> > > > > Has anyone investigated this issue and maybe allow a way inside
ant to
> > > > > specify the classpath and classloader used for loading the xml
parser ?
> > > > >
> > > > > Erik.
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to