[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xsl:import and jar files

Subject: Re: [xsl] xsl:import and jar files
From: xptm@xxxxxxx
Date: Tue, 30 Nov 2004 11:13:39 +0000
import jar
I have to give up on this. Even if i can manipulate the xsl:import and the
document() function, i can't see how can i do it with redirect:write, so i'll
go ahead with diferent versions of my Java/XSL application...

Thanks anyaway.

Quoting xptm@xxxxxxx:

> I don't have the jar in the classpath, this happens on a WebStart app and
on
> a
> similar applet. I'll look into the jakarta project.
>
> But will that also helps with the <redirect:write
> file="resources/tables.xml"> ?
>
> I have the feeling i'm doing something wrong from the very beggining, but
> don't
> know what...
>
> Quoting Robert Koberg <rob@xxxxxxxxxx>:
>
> > xptm@xxxxxxx wrote:
> > > Can't i have more help on this? I give up on the
> > >
> > > <xsl:import href="concat({$jar},'resources/xfunctions.xsl')" />
> > >
> > > but i still have problems with document().
> >
> >
> > Do you have the jar on your classpath? Depending on where it is in
> > relation to your URIResolver you could do something like:
> >
> > public Source resolve(String href, String base) {
> > ...
> >    InputStream is = null;
> >    //URL url = null;
> >    if (href.startsWith("jar:")) {
> >      is = this.getClass().getResourceAsStream("some.xsl");
> >      //url = this.getClass().getResource("some.xsl");
> >    }
> > ...
> > }
> >
> > if it is not on your classpath, you could use the apache jakarta commons
> > (sandbox) VFS (virtual file system) library to access jars (zips and
> > many others):
> >
> >
>
http://jakarta.apache.org/commons/sandbox/vfs/filesystems.html#Zip%20and%20Ja
r
> >
> > best,
> > -Rob
> >
> > >
> > > Also, i use Xalan <redirect:write file="resources/tables.xml"> and i
> can't
> > seem
> > > to work with that correctly, i mean, i can't define where the file will
> be.
> > >
> > >
> > > Thanks all.
> > >
> > >
> > >
> > > Citando xptm@xxxxxxx:
> > >
> > >
> > >>I wonder if this mail ever get to the list, because i've posted it with
> no
> > >>subject and get rejected...
> > >>
> > >>
> > >>>Hello all:
> > >>>
> > >>>I don't know if this question should be posted on this list, but...
> > >>>
> > >>>I have in my XSLT a
> > >>>
> > >>>  <xsl:import href="xfunctions.xsl" />
> > >>>
> > >>>that works OK when the file whose name is "xfunctions.xsl" is
> > >>>on the file system.
> > >>>
> > >>>However i'm trying now to access it in a resource file (a
> > >>>Java JAR file), but i get error from the parser saying it
> > >>>won't find the file.
> > >>>
> > >>>Any toughts?
> > >>>
> > >>>Thanks all.
> > >>
> > >>I've made some progress now, by *not* changing the XSLT at all and put
> all
> > >>the
> > >>"looking" stuff on a Java URIResolver. However i still have problems.
> > >>
> > >>- i had a lot of troubles trying to do something like
> > >>  <xsl:param name="jar"
> > >>select="'jar:http://intranetdev/Site/java/GTInfo.jar'"/>
> > >>  <xsl:import href="concat({$jar},'resources/xfunctions.xsl')" />
> > >>why is that?
> > >>
> > >>- it seems to work with xsl:import and xsl:include but not when using
> > >>document(). Shouldn't that have the same beahviour?
> > >>
> > >>I'm very sorry if this isn't the place to ask these questions.
> > >>
> > >>Regards.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>Ganha Cbmaras de Filmar, Televisues e outros fantasticos primios
> > Samsung
> > >>com o SAPO!
> > >>Clica em http://dc.sapo.pt/sfc
> >
> >
>
>
>
>
>
>
> Ganha Cbmaras de Filmar, Televisues e outros fantasticos primios Samsung
> com o SAPO!
> Clica em http://dc.sapo.pt/sfc
>
>






Ganha Cbmaras de Filmar, Televisues e outros fantasticos primios Samsung com o
SAPO!
Clica em http://dc.sapo.pt/sfc

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.