469,903 Members | 1,615 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

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 1675
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by W. Jordan | last post: by
4 posts views Thread by andrewcw | last post: by
1 post views Thread by Mark | last post: by
1 post views Thread by =?Utf-8?B?d2VqaXY=?= | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.