CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Posts
    145

    Embedded style sheet rules in Xsl file

    I am trying to write an Xsl file that contains embedded style sheet rules, but with no success.
    I don't see that the rules are being used.
    Here’s an example of what I tried:

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
        <html>
          <head>
          <style type='text/css'>
            <xsl:text><!--
            .caption { background-color: #ff0000; font-weight: bolder; }
            -->
          </xsl:text>
          </style>
          </head>
          <body>
            <span class='caption'>Hello</span>
             …
          </body>
        </html>
      </xsl:template>       
    </xsl:stylesheet>
    Does someone know what am I doing wrong?

  2. #2
    Join Date
    Apr 2008
    Posts
    12

    Re: Embedded style sheet rules in Xsl file

    Did you try removing the comment marks within the style tag ?

  3. #3
    Join Date
    Mar 2003
    Posts
    145

    Re: Embedded style sheet rules in Xsl file

    Quote Originally Posted by Alain COUTHURES
    Did you try removing the comment marks within the style tag ?
    I did, but it had no effect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured