[xsl] filepath issue with xsl:include/xsl:import or entities/ability to provide modularity

Subject: [xsl] filepath issue with xsl:include/xsl:import or entities/ability to provide modularity
From: "Lo, May F [IT]" <may.f.lo@xxxxxxxx>
Date: Tue, 1 May 2001 13:48:45 -0400
I have a very mind-boggling issue with ability to include other xsl files
within another xsl file to provide modularity.

I have tried using entities, for example:
<!DOCTYPE xsl:stylesheet[
<!ENTITY globalFile SYSTEM "/home/user/globalFile.inc">

However, I am trying to come up with an ability to be able to use a variable
for the filepath, for example
instead of /home/user/globalFile.inc I would like to use a variable instead
of /home/user/ since my development environment has a different filepath
than my production environment, which means I have to change the path every
time.  I understand that I can just use relative path "globalFile.inc", but
then it always looks in the directory where I run my server.

I have tried also using xsl:include and xsl:import, but in the href="" area,
I still can't use a variable in the href area because I would have to have
defined the variable somewhere.

I have just tried using Entity, xsl:import, and xsl:include to really
provide modularity.  I would like to know if anybody have any better ideas
of being able to use information from another file that acts as a global
file that all other stylesheets can access.  Such as different code that I
can use over and over instead of adding it into all my stylesheets.  I am
also not sure if using xsl:include or xsl:import are  better ways to include
other stylesheets or using External entity is a better method.

Please provide me with any ideas if anybody have any insights or additional
information to better solve my modularity issue.

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


Current Thread