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

RE: xsl:include href attribute

Subject: RE: xsl:include href attribute
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Tue, 16 Jul 2002 18:22:58 +0100
xsl include href variable
you can't use variables within <xsl:include>... I suspect you will want
to write a custom URI resolver and set the base that way...

how are you currently applying the transform? (Saxon in java?)

 



-----Original Message-----
From: Nathan Shaw [mailto:n8_shaw@xxxxxxxxx]
Sent: 16 July 2002 17:41
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  xsl:include href attribute


Can someone help me out as to where I am going wrong
here? I am trying to use a var as the value of the
href attribute of xsl:include.

----------------------------------------------------------
<!-- change to real URL when moving to production -->
<xsl:variable name="includePath"
select="'http://xxx.xxx.xxx.xxx/dir/'" />
<xsl:variable name="getFileInfoPath"
select="concat($includePath,'common/getFileInfo.xsl')"
/>

<!-- get the xml file's name and parent directory:
$FileName, $FileDir -->
<xsl:include href="{$getFileInfoPath}" />

However, when I try to parse an xml doc, for some
reason, Saxon is trying to use the base url and tack
on the var, so it ends up trying to find the included
xslt at e:\wwwroot\dir\{$getFileInfoPath} instead of
expanding the var and going to
'http://xxx.xxx.xxx.xxx/dir/common/getFileInfo.xsl'

If I hard-code the URI in there as
'http://xxx.xxx.xxx.xxx/dir/common/getFileInfo.xsl,'
it finds it perfectly fine.

What am I missing?

[I am a digester, so a cc is appreciated.]

--n

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

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





---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.373 / Virus Database: 208 - Release Date: 01/07/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.373 / Virus Database: 208 - Release Date: 01/07/2002
 

 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.