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

XslCompiledTransform locks files?


Hi,

In our ASP.Net webapplications, we use xslt a lot. For 1.1 developing was
"easy":
start up the website and go to the page where the xslt was used. Change the
xslt
(save it) and refresh the page: the new results are visible.

Now we are transferring to 2.0 and XslCompiledTransform. The xslt's still
work
(that's not the problem), but it is not possible to change the xslt while
the site is running!

It seems that that compiled transform is keeping a lock on the file.

My questions:
a) can anyone confirm that lock?
b) can I prevent that lock, maybe only during development?
c) I'm guessing that it has to do with caching: a compiled xslt is internally
kept
in the compiled form, so a second use of the same file doesn't have to
compile again.
Is this true?

MSDN doesn't say anything about caching or locking.

Hans Kesting
Mar 12 '07 #1
1 1783
Hi,
>
In our ASP.Net webapplications, we use xslt a lot. For 1.1 developing
was
"easy":
start up the website and go to the page where the xslt was used.
Change the
xslt
(save it) and refresh the page: the new results are visible.
Now we are transferring to 2.0 and XslCompiledTransform. The xslt's
still
work
(that's not the problem), but it is not possible to change the xslt
while
the site is running!
It seems that that compiled transform is keeping a lock on the file.

My questions:
a) can anyone confirm that lock?
b) can I prevent that lock, maybe only during development?
c) I'm guessing that it has to do with caching: a compiled xslt is
internally
kept
in the compiled form, so a second use of the same file doesn't
have to
compile again.
Is this true?
MSDN doesn't say anything about caching or locking.

Hans Kesting
It seems to be solved (some extra testing required, but it looks
promising), the problem (lock) was not in the XslCompiledTransform,
but in the XmlReader.

changing

XmlReader rdr = XmlReader.Create(filename, settings);
xct = new XslCompiledTransform(AppSettings.Debug);
xct.Load(rdr);

to

using (XmlReader rdr = XmlReader.Create(filename, settings))
{
xct = new XslCompiledTransform(AppSettings.Debug);
xct.Load(rdr);
}
kept those files available.
Hans Kesting
Mar 16 '07 #2

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

Similar topics

3
by: Eckhard Schwabe | last post by:
when switching from the old "XslTransform " to "XslCompiledTransform" I notice a difference in the handling of whitespace. I need to transform a XML file which contain tabs (\t), and which remain...
1
by: Steve | last post by:
Using VB.NET 2.0 I have a simple routine that attempts transforms an XmlDocument with an XSLT stylesheet into HTML. Under the old 1.1 framework with XslTransform, everything worked fine. Now...
6
by: W. Jordan | last post by:
Hello there, Are there anybody who is using the XslCompiledTransform that comes with .net framework, which was said to be a replacement of the XslTransform class? I found that the class has...
4
by: andrewcw | last post by:
I am moving some code forward from .NET 1.1. I was able to load the XSL file and perform the transform. The MSDN documentation looks like it should be easy. But I get a compile error. Ideas ?...
12
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a > b)...
1
by: mikepmyers | last post by:
I've done some research online and turned up with results that did not sit well with me. I’m using the System.Xml.XslCompiledTransform class as recommended by MS; however, it’s creating self-closing...
1
by: Mark | last post by:
I'm getting the error "The URI scheme is too long." in the code below. What is URI in this context? The XSL or the XML being transformed? Thanks! -Mark StringBuilder sb = new...
3
by: Andy Fish | last post by:
Hi, From reading the documentation, I get the impression that XslCompiledTransform should be faster than XslTransform on my test with a large complex document and a large complex XSLT, the...
1
by: =?Utf-8?B?d2VqaXY=?= | last post by:
When I use xslCompiledTransform() or xslCompiledTransform(false) I find that the XPath queries in my select query attributes do not recognize any attributes inthe xml document. But when I enable...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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: 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
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...

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.