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

RE: Relative path in include statement

Subject: RE: Relative path in include statement
From: "Nouwens, H.J.P." <H.J.P.Nouwens@xxxxxxxxxxxxxxx>
Date: Wed, 07 Nov 2001 10:26:09 +0100
include relative path
I'm glad I'm not the only one who was wrestling with this...

parser.setBaseURL(new URL("file:////"));

fixed it for me, it sets the baseURL to the current directory, than you can
relatively get to your stylesheet.

Hans Nouwens.

-----Original Message-----
From: Michael Kay [mailto:michael.h.kay@xxxxxxxxxxxx]
Sent: woensdag 7 november 2001 9:53
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Relative path in include statement


> I'm having a problem with relative path in an include
> statement. My XSL has
> a line:-
>
> <xsl:include href="./subdir/extra.xsl">
>
> When I run Xalan from the command line the stylesheet works
> fine but when
> embedded within java I get an XSLProcessorException stating that
> "file:e:/data/sapphire/subdir/extra.xsl" was not found.

Make sure that the processor knows the base URI of your stylesheet, by using
setSystemId() on the relevant Source object. If you supply the stylesheet as
an input stream, the base URI isn't known, so relative URIs can't be
resolved.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.