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

ASP in XSL Document

First of all, yes we are still using classic ASP, lol. I have a XSL
document that is reading in info from a XML file. I have to display
serveral server side dates on the page. Is there anyway to use ASP
code inside a XSL document.

I have tried the following.
<![CDATA[ <%=Date()%]]>
This does not work. In the view source the < and get changed to
&ls; and &gt;. Is this possible? Is there any other way to read a
server side date from this xsl page? If not I will have to re design
the hole page. Thanks for the help.

Jun 5 '07 #1
1 1985
David wrote:
First of all, yes we are still using classic ASP, lol. I have a XSL
document that is reading in info from a XML file. I have to display
serveral server side dates on the page. Is there anyway to use ASP
code inside a XSL document.

I have tried the following.
<![CDATA[ <%=Date()%]]>
This does not work. In the view source the < and get changed to
&ls; and &gt;. Is this possible? Is there any other way to read a
server side date from this xsl page? If not I will have to re design
the hole page. Thanks for the help.
If you are using MSXML to perform the XSLT transformation then you have
several choices, you can use stylesheet parameters (top level xsl:param
elements in the form e.g.
<xsl:param name="current-date"/>
) then when scripting the transformation with MSXML you can set such
parameters before the transformation is being run:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/9ddcd728-2646-494a-8fa4-3b68e8c032b7.asp>

It is also possible to write extension functions with JScript or
VBScript that you can call then in the stylesheet, check the
msxsl:script element documentation:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/2a5dbaae-bccb-4d5e-aa30-4a2c1bcc79ce.asp>

Finally you can pass in extension objects and call their methods:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/106f85e4-6aa4-44ce-945a-23b2143586d2.asp>
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jun 5 '07 #2

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

Similar topics

1
by: techy techno | last post by:
Hii Just wanted to know how can I decorate my texboxes and Listmenu which is called from a JS file using the following code below: document.write("<SELECT NAME='cur2' ONCHANGE='cconv1();'>");...
2
by: Brett Baisley | last post by:
Hello I have a block of html code that I want to run by calling a javascript function to print it. Its basically a table with menu items in it that is the same for many pages, and instead of...
2
by: Edward | last post by:
The below code builds 2 tables 4 rows by 4 cols. All cells have checkboxes. When checked, the checkboxes in the first column automatically check the remainder of the check boxes in the same row. ...
1
by: lawrence | last post by:
This PHP function prints out a bunch of Javascript (as you can see). This is all part of the open source weblog software of PDS (www.publicdomainsoftware.org). We had this javascript stuff...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
8
by: Phil Powell | last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href = document.location.href.substring(0, document.location.href.indexOf('?')); if (document.location.href.indexOf('#') >= 0) {...
5
by: WilliamRLinden | last post by:
Hi world! we are pretty new to JavaScript and have been struggling for now 2 days on this problem ... We would appreciate mercy if anyone can give us some. Basically we are trying to simulate...
6
by: therig | last post by:
I'm having issues, I've spent many hours searching and I'm a noob at javascript, any help will be greatly appreciated. I keep getting the following error: Error: document.forms.sec11_A has no...
4
by: dr1ft3r | last post by:
Hey guys, I'm building a site for a landscaping business down the street and can't seem to get part of the code functioning correctly. The code fails on line 68 where I make a reference to an...
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?
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:
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...
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
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.