all groups > dotnet xml > july 2004 >
You're in the

dotnet xml

group:

document() function problem


document() function problem Stan Huff
7/21/2004 6:43:14 PM
dotnet xml: I am trying to use the document function inside an ASP.Net control,
specifically a SharePoint Web Part. For whatever reason, the function
always seems to return an empty node set. I am providing a resolver to both
the Load method and the transform but it doesn't seem to matter. I then
derived my own resolver from XmlUrlResolver and placed Debug.WriteLine calls
inside the constructor, GetEntity() and ResolveUri(). When viewing the
debug information printed, I only see the call to the constructor. It seems
the XslTransform class is not even trying to use the resolver. This dll has
a configured security of FullTrust. This is confirmed because I use the
AddExtensionObject method of XsltArgumentList which requires FullTrust. I
have demonstrated the document function working in a plain windows
application. Is there some other attributes I need to be setting up or some
other security needs to make XslTransform use my document() calls?

Thanks,

Stan

Re: document() function problem Stan Huff
7/22/2004 11:19:05 AM
Thanks for reading my babble but it turns out the problem was largely caused
by lack of sleep. :) The actual line calling to the Debug.WriteLine in
ResolveUri of my custom resolver was generating an exception as a result of
(you guessed it)... a typo. In addition I made the incorrect assumption
that the passed baseUri would be non-null. It's interesting to note that
exceptions raised in the resolver do not propogate out through the Transform
method, which led me to believe everything was ok there.

-stan


[quoted text, click to view]

Re: document() function problem Oleg Tkachenko [MVP]
7/22/2004 4:15:40 PM
[quoted text, click to view]

Show us some code. Basically it should work, so chances are it's some
silly typo somewhere.

--
Oleg Tkachenko [XML MVP]
AddThis Social Bookmark Button