473,396 Members | 1,714 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.

Get page name via XSLT?

I there a way to get the current page's name using XSLT and store it in a variable?

Something like:

<xsl:variable name="myVariable" select="PageName"/>
Dec 31 '08 #1
4 3478
Dormilich
8,658 Expert Mod 8TB
generally speaking, XSL can get everything contained in the source XML. If page name means the file name, then no (this requires file system functions).

regards
Jan 1 '09 #2
jkmyoung
2,057 Expert 2GB
XSLT was not designed to do this (eg, be Environment aware). Some possibilities, depending on how you are running this transformation:

1. Have the containing code (which calls the XSLT) pass in a parameter of the filename to the XSLT processor.
2. Have the XSLT reference a static lookup file. Before running the transformation, update the file with the lookup file filename.
Jan 5 '09 #3
In my case, I assume the 'containing code (which calls the XSLT)' would be the ASP code I use to call both the XML and XSLT (see code below). Is that correct? If so, any idea how to do that?


Expand|Select|Wrap|Line Numbers
  1. <asp:Xml runat="server" documentSource="xml/sample.xml" transformSource="xml/sample.xsl" id="sample"  />
Jan 5 '09 #4
jkmyoung
2,057 Expert 2GB
Use the Xml::TransformArgumentList property
Xml.TransformArgumentList Property (System.Web.UI.WebControls)

Adding parameters to the Argument list:
XSLT Parameters
Jan 5 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Barry Anderberg | last post by:
I have an XML document that I am trying to display in my ASP.NET page. I am using an XSL Transform to display repeating XML data in a specific format. It reads the data, and displays it on my...
35
by: .:mmac:. | last post by:
I have a bunch of files (Playlist files for media player) and I am trying to create an automatically generated web page that includes the last 20 or 30 of these files. The files are created every...
1
by: Miles Cousens II | last post by:
I would like to be able to import the following xml document on a daily basis to get the current exchange rates and then create the same output file so I can use Biztalk 2002 to import that file,...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
3
by: tldisbro | last post by:
Hello All, I am trying to use the returned value of the <fo:page-number> element/function in my <xsl:if> test condition. But am unsuccessful in doing so. Is it possible to use it in this fashion...
0
by: vinki | last post by:
Hi Everyone, I have this xslt file. I want to print the page directly to the printer after every MOP template is matched. So for example the ouput is coming to the HTML page like this ...
1
by: vinki | last post by:
Hi Everyone, I have this xslt file. I want to print the page directly to the printer after every MOP template is matched. So for example the ouput is coming to the HTML page like this ...
6
by: Pete Verdon | last post by:
Summary: Can I do an XSLT transform, in the client, of a tree of nodes taken from the displayed page DOM in IE? This works in Firefox. Hi, I'm just starting the process of rewriting part of a...
1
by: basavaraj koti | last post by:
I need to show image using xslt Below provided in my xml and xslt. <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="../xyz.xsl"?> <Grade class="03"...
2
by: ismailc | last post by:
Hi, I need help please! My tooltip works fine but the moment one reload the page which is set on some objects then the tooltip does not work! How can i bypas this or make it reload the xslt...
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.