473,388 Members | 1,342 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,388 software developers and data experts.

Accessing Global Parameters from the included stylesheet.

Hi all,
I have a .Net program which access transforms a XML using an XSL
stylesheet. The .net program calls Stylesheet main.xsl file.

The main.xls contains only <xsl:include> elements to include other XSL
files.

like
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:include href="../one.xsl"/>
<xsl:include href="../two.xsl"/>
<xsl:include href="../three.xsl"/>
<xsl:include href="../four.xsl"/>
<xsl:include href="../five.xsl"/>
<xsl:output indent="yes" media-type="html"/>
</xsl:stylesheet>
Now I want to pass a parameter to the XSL from .Net. This parameter will
be used by the template present in two.xsl file. ie., it will be used
globally.

So I have added the Argumentlist (which is used to pass the parameter to
the XSL) in the .Net and the <xsl:param> in the main.xsl file. Now the
main.xsl looks like
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:param name="esh" />
<xsl:include href="../one.xsl"/>
<xsl:include href="../two.xsl"/>
<xsl:include href="../three.xsl"/>
<xsl:include href="../four.xsl"/>
<xsl:include href="../five.xsl"/>
<xsl:output indent="yes" media-type="html"/>
</xsl:stylesheet>

Now when i try to access this global variable from two.xsl it is
throwing error and it is not able to access the globa variable.

So is there a way to access the global parameter from the included
stylesheets. This is very urgent. Please reply back to me and also post
it in the forum.

Thanks and Regards,
-Eshrath.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
1 1978
Please, don't post the same question to more than one newsgroup. See
answer in microsoft.public.xsl.

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #2

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

Similar topics

0
by: Eshrath Khan | last post by:
Hi all, I have a .Net program which access transforms a XML using an XSL stylesheet. The .net program calls Stylesheet main.xsl file. The main.xls contains only <xsl:include> elements to...
0
by: bearclaws | last post by:
I am trying to send URL parameters from an HTML page to an XSL page. I used this script to pass parameters manually to the XSL and it works great. I just modified the "input for XSL-processor"...
2
by: Stefan Schmitz | last post by:
I have a problem using a global parameter to control the XSL-Transformation of my XML-Document. My XML-Document looks like this: <?xml version="1.0" encoding="UTF-8"?> <Football...
16
by: WaterBug | last post by:
When clicking on the following link from an email i.e - http://myserver/myapplication/myprogram.asp?urlvar1=some%20stuff&urlvar2=more%20stuff I get a server 500 error. With that same browser...
2
by: shaun | last post by:
Is there anyway to access a system environment variable from within an xml document? Two applications: 1) I'd like to make an XBase declared path equal to an environment variable declared path....
7
by: Michael | last post by:
Hi newsgroup, as the subject indicates I am looking for an advice using global variables. I am not if this problem is more about style then C. If its wrong in thi group, sorry. So I have a...
1
by: Rob Wire | last post by:
Please let me know the preferred way to do the following. Accept a Variable in the calling page's URL of an ID. Set that variable to be global scope of the class so that it can be used throughout...
3
by: kosmodisk | last post by:
Hi, I'm having problem accessing javascript-created elements from opened window. This occurs only when I'm including another files in opened window, javascript or css. When I comment out...
1
by: David Schwartz | last post by:
I need to control how I process <fooelements based on how I'm generating my HTML (separate files vs. a single large file). What can I use as a switch in my foo stylesheet to control how it's...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.