Link to home
Start Free TrialLog in
Avatar of mco
mco

asked on

Using environment variable from within XSLT

Hi,
I am new to XSLT.
Is it possible to use the value of a system environment variable (e.g. TEMP), from within XSLT?
Avatar of b1xml2
b1xml2
Flag of Australia image

Since you are so new to XSLT, you must understand that XSLT is not a panacea for every coding dilemma. It was designed to carry out transforms on XML Documents which are nothing more than structured TEXT. For optimal performance and yes! there are situations where you can cause a stack overflow or crash your XSLT Engine for any parser.

One of the things that you will learn is NOT to re-invent the wheel. There are existing API calls that allow you to get system environment variables like Windows Scripting Host. XSLT is NOT a scripting language. It is not a procedural language.

::TIP::
1. Get the System Environment Variable.
2. Pass It To The Stylesheet
2a. External Values can be passed to Stylesheets either thru brute DOM Methods or via the AddParameter() Method of the IXSLProcessor (if you are using MSXML 3+)
Avatar of mco
mco

ASKER

Could you give me a code example?
In which language? C#, VB, JScript, VBScript

On Which Side? Client Or Server?

Using What Technology? HTA, ASP, ASP.NET, COM (ActiveX)

Avatar of mco

ASKER

C++, client, COM (msxml3.dll)
ASKER CERTIFIED SOLUTION
Avatar of b1xml2
b1xml2
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial