Subject: [xsl] RE: From: "Macaulay,Malcolm (US)" <Malcolm.Macaulay2@xxxxxxxxx> Date: Wed, 18 Sep 2002 09:36:04 -0500 |
Hi Michael, Your XSLT looks OK. For IE to apply your XSLT you need to reference it in the XML doc (via an <?xml-stylesheet../> process instruction). Here's an example. XML: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="SimpleXSLT.xslt"?> <SampleXML> <Element>abc</Element> <Element>def</Element> <Element>ghi</Element> </SampleXML> XSLT (e.g. filename = SimpleXSLT.xslt ): <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:template match="/"> <html> <xsl:apply-templates/> </html> </xsl:template> <xsl:template match="/SampleXML/Element"> <xsl:value-of select="."/> <br/> </xsl:template> </xsl:stylesheet> HTML output (what IE will produce internally and display when you open the XML doc): <html> abc<br>def<br>ghi<br> </html> Hope that helps. cheers Malcolm -----Original Message----- From: CROFT, MICHAEL [mailto:MCROFT@xxxxxxxxx] Sent: Wednesday, September 18, 2002 9:06 AM To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx' Subject: Does anyone know how to have the I.E 6.0 browser output a rendered XML document using XSLT as an HTML document. I am using the <xsl:output method="html"/> and this doesn't seem to work. It still generates an XML document. Here is an excerpt from my code: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output method="html"/> <!--Main processing component for the FNOL report: Design, Code, & Functional Requirements implemented by Michael Croft--> <xsl:include href="ClaimFileIdentification.xsl"/> <xsl:include href="LossDetails.xsl"/> <xsl:include href="InvolvedParties.xsl"/> <xsl:include href="Claims.xsl"/> <xsl:template match="/"> <html> <head> <link rel="stylesheet" type="text/css" href="AutoHtmlStyleSheet.css"/> <title> Amica FNOL Auto Claim Telephone Report </title> </head> <body> <hr size="2"/> <table width="95%" align="center" border="0"> <tr> <td colspan="4"> <img src="spacer.gif" height="1" width="550" alt=""/> </td> </tr> <tr> <td> <p class="mainHeader">Telephone Loss Report</p> </td> </tr> </table> <hr size="2"/> <!-- These are the 3 primary node contexts that will provide the information for the report.--> <xsl:apply-templates select="//InsClaims"/> <xsl:apply-templates select="//ListOfInsClaimsContact"/> <xsl:apply-templates select="//ListOfInsClaimsElements"/> </body> </html> </xsl:template> <xsl:template match="//InsClaims"> <xsl:call-template name="ClaimFileIdentification"/> <xsl:call-template name="LossDetails"/> </xsl:template> <xsl:template match="//ListOfInsClaimsContact"> <xsl:call-template name="InvolvedParties"/> </xsl:template> <xsl:template match="//ListOfInsClaimsElements"> <xsl:call-template name="Claims"/> </xsl:template> </xsl:stylesheet> Mike ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender and postmaster@xxxxxxxxxx ********************************************************************** XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re:, Vasu Chakkera | Thread | [xsl] RE:, CROFT, MICHAEL |
AW: AW: Refinement: [xsl] creating , Fries, Markus, fiscu | Date | [xsl] XSL Schema, Marcin Stefaniuk |
Month |