XSL - problem with finding CSS file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Sm9hY2hpbQ==?=

    #1

    XSL - problem with finding CSS file

    I have a piece of code that looks like this:

    XPathNavigator l_nav =
    xml_document.Do cumentElement.C reateNavigator( );
    XslCompiledTran sform l_xslt = new XslCompiledTran sform();
    l_xslt.Load(xsl _document_locat ion);
    l_xslt.Transfor m(l_nav, null, output_stream);
    //l_xslt.Transfor m(l_nav, null, new
    StreamWriter("T RANSFORMED.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.htm l 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.WebBrowse r, even though I have put the CSS file just
    about everywhere. What am I doing wrong?
  • Marc Gravell

    #2
    Re: XSL - problem with finding CSS file

    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

    Comment

    • =?Utf-8?B?Sm9hY2hpbQ==?=

      #3
      Re: XSL - problem with finding CSS file

      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

      "Marc Gravell" wrote:
      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
      >

      Comment

      • =?Utf-8?B?Sm9hY2hpbQ==?=

        #4
        Re: XSL - problem with finding CSS file

        I have all the files belonging to my app in the same folder. Shouldn't that
        be enough?

        "Marc Gravell" wrote:
        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
        >

        Comment

        Working...