473,396 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

possible to use an environmental variable to address the XSL file path?

I'm just wondering, is there a way I could use an environmental
variable in an XML file to specify the path of its XSL file? something
like

<?xml-stylesheet type="text/xsl" href="%test%\test.xsl" ?>

May 19 '06 #1
2 2193
Kourosh wrote:
I'm just wondering, is there a way I could use an environmental
variable in an XML file to specify the path of its XSL file?


XSLT itself can't access the system's environmental variables.

The usual solution is to use your XSLT processor's command-line options
(or API, if you're invoking it from another program) to pass the value
of the environment variable in as a stylesheet parameter. The exact
syntax varies depending on the processor.

Alternatively, you could write an extension function that retrieves
environment variable values. But that might have to be recoded if you
ever want to run on another processor.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
May 20 '06 #2
.... Oh. I misread. You want to use the variable in the path to find the
stylesheet in the first place.

The simple answer to that one is "no, or at least you can't count on
it". The more complicated answer is that this is a question of how the
specific tool (browser or whatever) interprets that processing
instruction. Some may let a user/developer plug in code that can help
them process URIs (a "URI Resolver"); others may have other ways of
handling this; others will simply not handle it.

But this inability to implicitly/automatically retrieve environment
variables is probably a Good Thing. I don't _want_ downloaded files
accessing anything else on my system unless I explicitly give them
permission to do so; that would be a security/privacy issue.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
May 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bruce Lehmann | last post by:
Hi, I've installed Apache (WAMP install) so I can edit and test my web site on my home computer. In general php code seems to work, but I can't access Apache variables such as PATH or...
1
by: Ric | last post by:
thx for the help. im having problems with java and jsp. i think im not settup up the enviornmental variables right in w2k advanced tab. im using a wrox book, but the wrox book references a servlet...
4
by: jtfaulk | last post by:
I've created an application that I need to launch from a web browser. So I tried these steps: 1. on the install I modified the PATH environmental variable to include the path on the application...
15
by: Casanova | last post by:
Hello!! how can i get all the details of the environmental variables. If i use getenv, i will have to specify the name of the variable. for intsance i will have to give getenv("PATH") How can...
1
by: Chris B | last post by:
I have an application that uses PInvoke to call into native DLLs. My DLLimport attribute only has the name of the DLL that I need to import (i.e. I leave it up to the OS to search the PATH for the...
2
by: Steven | last post by:
I have an asp.net application written in VB.net. I want to access a client side environment variable. For instance, we set an environment variable for the UserName. So, I write the code for...
13
by: Alison Givens | last post by:
....... that nobody knows the answer. I can't imagine that I am the only one that uses parameters in CR. So, my question again: I have the following problem. (VB.NET 2003 with CR) I have a...
0
by: Mike | last post by:
Hi I regularly install DB2 Runtime Lite to connect to a database, when I install DB2 Runtime Lite in need to define some environmental variables in the System Variables option , the variable is...
2
Curtis Rutland
by: Curtis Rutland | last post by:
I want to get the actual physical path for some of the Windows Environmental Variables. If I typed %TEMP% into the Run prompt on Vista, I'd go to the folder: C:\Users\username\AppData\Local\Temp ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.