This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

XML to XML to HTML Transformation using file protocol


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]