Subject: [xsl] "White Space" error message From: "Denis Nwanshi" <dn555_@xxxxxxxxxxx> Date: Tue, 17 Dec 2002 21:24:44 +0000 |
------------------------------------------------------ <%
<xsl:template match="contacts"> <table width="70%"> <xsl:apply-templates select="contact"/> </table> </xsl:template>
<xsl:template match="contact"> <tr> <td> <xsl:apply-templates select="Name"/> </td> <td> <xsl:apply-templates select="State"/> </td> <td> <xsl:apply-templates select="Address"/> </td> </tr> </xsl:template>
</xsl:stylesheet> ------------------------------------------------------
Above XSL is called by following JSP in the HTTP command and should output the string to the browser:
------------------------------------------------------ // Parse and display XML Document TransformerFactory tFactory = TransformerFactory.newInstance();
// Get the XML Source from the string StringReader myReader = new StringReader(VLDContacts); Source xmlSource = new StreamSource(myReader);
// Generate the transformer. Transformer transformer = tFactory.newTransformer(xslSource);
// Perform the transformation, sending the output to the response. transformer.transform(xmlSource, new StreamResult(out));
Many Thanks Denis
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] output method html doesnt, Jeni Tennison | Thread | [xsl] [XSL] extracting a verse, Jim_Albright |
Re: [xsl] combining two variables t, Jeff Kenton | Date | [xsl] [XSL] extracting a verse, Jim_Albright |
Month |