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

XSLT caching

Hi all,

What I have:

I have a website and in the code I generate a xml document.
I also have a couple of xsl files and then I use the following lines to
generate the website from the xml and xsl:

xslTran.Load(serv.MapPath("default.xsl"))
xslTran.Transform(xmldoc, Nothing, Response.Output(), New XmlUrlResolver)
But now what i want to do is cache the default.xsl so the application
doesn't have to read the file @ avery request.

Does anybody know how to do this?

Thanks in advance!

Floris
Apr 10 '06 #1
1 1231
> I have a website and in the code I generate a xml document.
I also have a couple of xsl files and then I use the following lines to
generate the website from the xml and xsl:
...
But now what i want to do is cache the default.xsl so the application
doesn't have to read the file @ avery request.
Does anybody know how to do this?


Probably the easiest way is to cache the generated XslTransform object
in the application object; you can check if it already exists and
create it if not. Then just extract the transform object and apply it
when needed. So:

Dim xslTran As XslTransform

If Application("myXSLT") = Nothing Then
xslTran = New XslTransform()
xslTran.Load(...)
Application("myXSLT") = xslTran
Else
xslTran = CType(Application("myXSLT"), XslTransform)
End If

xslTran.Transform(...)

Apr 10 '06 #2

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

Similar topics

3
by: john | last post by:
Hi I want to do something like this: Store the XSLT document in the client cache if it is not already present. If present then use that XSLT document to display the xml. I have no idea how to do...
5
by: PHILIPPE | last post by:
Hi, I'm facing a annoying problem. In the old ASP times, I was able to construct dynamically an XSL file and then apply it to my XML file to create the HTML output. Today, with the .NET...
6
by: Vincent Lefevre | last post by:
I would like to know if the base URI considered to resolve an unparsed entity defined by a relative URI should be the URI before or after its rewriting due to a possible catalog. Let's take an...
6
by: ree32 | last post by:
I am a bit confused with capabilities of XML. I have an XML document with information on images(photos). Is there way to use XSL/XSLT to create a page that will display the images as gallery. ...
8
by: Eric Phetteplace | last post by:
Hello, I am moving over from using msxml2.domdocument to system.xml and system.xml.xsl. I'd like to present this to my group today, so your help is appreciated. I want to transform an XML...
4
by: wtsnet | last post by:
I've got a usercontrol created on the fly using XSLT: <%@ Control Language='vb' AutoEventWireup='false' Codebehind='DynamicContent.ascx.vb' Inherits='System.Web.UI.UserControl'...
0
by: Troy Simpson | last post by:
Hi, I have a website which is made up of dynamic pages. Each page that's loaded has some code which looks at which template to load amongst other things, which causes the page to take a little...
7
by: Matt Silberstein | last post by:
I have a data intensive web app I am developing. The core of the app will do a db query and build a page. I plan on getting the data as xml and feeding that and a xslt stylesheet to the browser....
9
by: daph4ntom | last post by:
Right, I need some some views on the pros and cons of using XSLT versus ASP.NET 2.0 for the Presentation layer of an app. My company are looking at creating multiple sites and multi lingual...
21
by: Damian | last post by:
Hi, I'm from an ASP.NET background an am considering making the switch to Python. I decided to develop my next project in tandem to test the waters and everything is working well, loving the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...
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.