Forum Moderators: open
I have a class "heading" described in the CSS stylsheet for the main HTML page (works fine with other parts of the HTML page) but when I try to use class="heading" within the HTML in the XSL file, it doesn't show up the formatting in the <iframe>.
Does anyone know how I can get this to work? Or do I need to use the style attribute within the HTML in the XSL file?
I've never done what you describe-- it seems like you are depending on the user's browser having an XSL engine installed, which can be tricky since older versions of MSXML are designed for XML/SL specs which did not become part of the standard. However, to start you should import the stylesheet into the output document (the one appearing in the <iframe>), which should be a trivial matter:
<xsl:stylesheet>
<xsl:template match="/">
<html>
<head>
<title>Output document to be loaded in iframe</title>
<!-- css for formatting the output -->
<link rel="stylesheet" href="/site.css" />
</head>
<body>
<p>Your document</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>