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

XML to XML to HTML Transformation using file protocol

Subject: XML to XML to HTML Transformation using file protocol
From: Richard Garcia <RGarcia@xxxxxxxxxxxxxxx>
Date: Mon, 17 Dec 2001 11:33:46 -0800
xml to html transformation
Folks,

I'm trying to transform an XML file into another XML file which then results
in an HTML file using file protocol:

test.xml --> testtoXML.xsl --> (XML output) --> testtoHTML.xsl --> (HTML
output)

Desired result: red 'Hello World!'  (HTML output)
Actual result: XML element values of <Portlet> (see code below)

Problem is going from 'testtoXML.xsl' to 'testtoHTML.xsl'.  The archive
shows a similar question that doesn't fix my problem.  This must be
accomplished with an client based XSLT processor(i.e. IE6 or IE5.x
w/MSXML3).  Please help!

Rich

P.S.  Copy my code below into three separate files.  Click test.xml to see
the result.

Example code follows:

<!-- test.xml ------------------------------->

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="testtoXML.xsl"?>

<Home>
    <Column>
        <Portlet>Alerts</Portlet>
        <Portlet>Reports</Portlet>
        <Portlet>Optimizers</Portlet>
    </Column>
</Home>

<!-- testtoXML.xsl ------------------------------->

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" encoding="UTF-8" indent="yes"/>

  <xsl:template match="/">

      <xsl:processing-instruction name="xml-stylesheet">
        <xsl:text>href="testtoHTML.xsl"</xsl:text>
        <xsl:text>type="text/xsl"</xsl:text>
      </xsl:processing-instruction>
    
      <xsl:copy-of select="."/>
    
  </xsl:template>
</xsl:stylesheet>

<!-- testtoHTML.xsl ------------------------------->

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" encoding="UTF-8" indent="yes"/>

  <xsl:template match="/">
    
      <html>
        <header>
        </header>
        <body text="CC0000">
           <i>Hello World!</i>
        </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.