XSL - problem with finding CSS file

  • Thread starter Thread starter Joachim
  • Start date Start date
J

Joachim

I have a piece of code that looks like this:

XPathNavigator l_nav =
xml_document.DocumentElement.CreateNavigator();
XslCompiledTransform l_xslt = new XslCompiledTransform();
l_xslt.Load(xsl_document_location);
l_xslt.Transform(l_nav, null, output_stream);
//l_xslt.Transform(l_nav, null, new
StreamWriter("TRANSFORMED.html"));

I have a link to a css document in the xsl code. If I uncomment the last
row, which stores the transform into a file, the file TRANSFORMED.html is
created and it looks just fine with the CSS styles applied. But if I only use
the line above and keep the resulting translation in RAM the css styles are
NOT applied when sending the translation to a
System.Windows.Forms.WebBrowser, even though I have put the CSS file just
about everywhere. What am I doing wrong?
 
Well, when you have it in RAM, how are you giving it to the
WebBrowser? It needs to resolve the css relative to the html...

Marc
 
Thanks Marc,

I don't "give" it at all. My thought is that it will resolve the link rel
file name and load it when it needs it. Won't that happen?

Rgds,
Joachim
 
Back
Top