473,761 Members | 10,684 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:styleshe et 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:styleshe et 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 2002
Please, don't post the same question to more than one newsgroup. See
answer in microsoft.publi c.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
1324
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 include other XSL files. like
0
6650
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" section: http://www.biglist.com/lists/xsl-list/archives/200107/msg00002.html However, I'd like to be able to build that parameter list dynamically. So far, I can get the parameters into an array and pass the values to the loadXML function;...
2
3079
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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="d:\_Privat\Football\XML\Football.xsd"> <Season> <Opponents>
16
2286
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 window open, if I click the link from the email again I get the desired page. The results are the same if the url is copied and pasted into the brower but the 'go' must be pressed twice. It appears that the server is trying to resolve the url vars...
2
4398
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. 2) In performing an xslt I'd like to insert the username and the OS architecture in the resulting document.
7
3144
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 couple of function that all need the same information (all located in the same file). By now it looks like /* file beginns */
1
3687
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 the functions from Page Load. Would like to send the ID variable as a SQL parameter to stored procedures for Select, Update, and Insert. What I have done so far to get around it is declare it in the SQL Select statements of the Web form code,...
3
2116
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 "<link>" and "<script>" (point (0)), the script works fine. The opening window itself (point (1)) can access the object. When page has been loaded, then I can access the object also (point (3)). The script does find included files (debug_test2.css and...
1
1488
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 processed? Note that the output style is determined by which xsl file (which 'include' the foo stylesheet) I process rather than being represented in the xml data. As the foo stylesheet uses the 'match' attribute, I don't know how to make the output...
0
9521
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9333
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9945
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9900
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8768
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3863
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.