RE: [xsl] xslt and JSP 1.2

Subject: RE: [xsl] xslt and JSP 1.2
From: "Bryan Rasmussen" <bry@xxxxxxxxxx>
Date: Fri, 11 Jan 2002 10:30:19 +0100
you mean you don't want the xml declaration, use <xsl:output method="xml"
omit-xml-declaration="yes"/> is one solution, should also be able to say
<xsl:output method="jsp"/>, try one of these as a child of xsl:stylesheet

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of
Kevin.Gutch@xxxxxxxxxxx
Sent: 10. januar 2002 21:04
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] xslt and JSP 1.2



Hello everyone,

I am trying to output JSP 1.2 from a stylesheet. I am stumbling on one
issue. I am sure it is user error but can not figure out what is going on.
My transformation works fine if I just output html code. However, if I try
to output JSP 1.2 the resulting page wants to add the xml document that the
transform was done on to the top of the output page.See below. Any
suggestion?


RESULT:
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"; version
="1.2"><jsp:text><html><head><title>Stylesheet
parameter</title></head><body><h2>XML source</h2><p>Hello</p><h2>Stylesheet
parameter</h2><p>The param1 stylesheet parameter has been set to default
value.</p></body></html></jsp:text></jsp:root>

STYLESHEET:


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version
="1.0">
  <xsl:param name="param1" select="'default value'"/>
     <xsl:template match="/">
     <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"; version="1.2">
  <jsp:text>


    <html>
      <head><title>Stylesheet parameter</title></head>
      <body>
        <h2>XML source</h2>
          <p><xsl:value-of select="."/></p>
        <h2>Stylesheet parameter</h2>
          <p>The param1 stylesheet parameter has been set to <xsl:value-of
select="$param1"/>.</p>
      </body>
     </html>

       </jsp:text>
     </jsp:root>
  </xsl:template>

</xsl:stylesheet>


 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