[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: mixture of XML and HTML in result

Subject: RE: mixture of XML and HTML in result
From: Larry_Mason@xxxxxx
Date: Thu, 8 Jan 2004 11:08:38 -0600
xsl transforming xml and html



Close.  The key is not so much the encoding on the xsl:ouput but rather to
add a meta statement to inform the browser of the encoding.  Here is a
final xsl that works (for those interested).  Thanks to all who replied.
Larry

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
  <!-- change output method to be xml since result is both html and xml -->
  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
  <xsl:template match="/">
    <HTML>
     <HEAD>
       <META http-equiv="Content-Type" content="text/html; charset=UTF-8"
/>
     </HEAD>
      <BODY>
        Try to get html and xml output<BR/>
        <TABLE BORDER="1">
          <TR>
            <TD>
              <xsl:text>&#160;</xsl:text>grandparent<BR/>
              <xsl:text>&#160;&#160;</xsl:text>parent<BR/>
              <xsl:text>&#160;&#160;&#160;</xsl:text>child<BR/>
            </TD>
            <TD>
              the xml stuff is here
             <xml id="data"><data><name/><name/></data>
            </TD>
          </TR>
        </TABLE>
      </BODY>
    </HTML>
  </xsl:template>
</xsl:stylesheet>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.