Subject: RE: Avoiding hard-coding the included XSL file name From: "Sia Rahimi" <sia_rahimi@xxxxxxxxxxx> Date: Fri, 25 Aug 2000 23:09:26 GMT |
Your idea of a /import seems to be the easiest. It just another step in the installation procedure.
From: "Evan Lenz" <elenz@xxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxx> Subject: RE: Avoiding hard-coding the included XSL file name Date: Fri, 25 Aug 2000 13:33:16 -0700
Kay, pg. 120:
"Attribute value templates are never allowed for attributes of top-level
elements. This ensures that the values are known before the source document
is read, and are constant for each run of the stylesheet."
Thus you cannot, say, pass the href attribute value in as a parameter, because run-time assignment of that value is not allowed.
My suggestion is to use something outside of XSLT like symbolic links so that the included file will be accessible via the same relative path location for either stylesheet. We use a number of imported stylesheets in our software. We solve the problem of multiple file locations by symbolically linking to the import/ directory where we keep our imported stylesheets.
Hope this helps.
Evan Lenz elenz@xxxxxxxxxxx http://www.xyzfind.com XYZFind Corp. "Building Better Search"
-----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Sia Rahimi Sent: Friday, August 25, 2000 11:38 AM To: xsl-list@xxxxxxxxxxxxxxxx Subject: Avoiding hard-coding the included XSL file name
I use a Unix/Apache/JServ/Servlet/Xalan environment. I have a common-attributes.xsl file which I include in all my xsl files.
The problem is that to get that file to be found I need to hard code the file name as such: <xsl:include href="http://sia1.sia.net/html/xsl/common_attributes.xsl"/> or <xsl:include href="/users/sia/html/xsl/common_attributes.xsl"/>
relative path to the xsl file or the servlet doesn't seem to work.
Does anybody know of a way to avoid this hard-coding?
Thanks for any help you may be able to provide.
Sia. ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Avoiding hard-coding the includ, Evan Lenz | Thread | RE: How to remove duplicates nodes?, DuCharme, Robert |
Re: outputting spaces in html table, Gary L Peskin | Date | Re: Debug Support in XSL (WAS RE: X, Steve Muench |
Month |