Subject: Problem with Xalan processing From: pbingley@xxxxxxxxxxx Date: Tue, 22 Feb 2000 14:56:23 +1300 |
I have been trying to get the Xalan processor going and processing some XML from within a JSP and the actual processing seems to be working but the end result is puzzling me with a few strange additions to the HTML that should not be there. I am relatively new to XSLT so maybe my style sheet is incorrect but if someone could explain what is going wrong here? The resulting HTML seems to have things added in each time apply-templates is encountered here is the XML: <?xml version="1.0"?> <POLICY> <INSTALLMENT>805.75</INSTALLMENT> <PAYMENT_FREQ>2</PAYMENT_FREQ> <BENEFIT> <INSTALLMENT>805.75</INSTALLMENT> <NUMBER>1</NUMBER> <RIDER> <INSTALLMENT>385.54</INSTALLMENT> <NUMBER>1</NUMBER> <RATE>7.2040</RATE> </RIDER> <RIDER> <INSTALLMENT>378.20</INSTALLMENT> <NUMBER>2</NUMBER> <RATE>7.2040</RATE> </RIDER> <RIDER> <INSTALLMENT>42.01</INSTALLMENT> <NUMBER>3</NUMBER> <RATE>8.0000</RATE> </RIDER> </BENEFIT> </POLICY> and the XSL: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version ="1.0"> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="POLICY"> <HTML> <HEAD> <TITLE>the quote</TITLE> </HEAD> <BODY> <H1>Your Policy Installment Premium is $<xsl:value-of select="INSTALLMENT" /></H1> <BR /> <H1>To be paid <xsl:value-of select="PAYMENT_FREQ" /> times per year.</H1> <BR /> <BR /><BR /> <H3>Policy Summary</H3> <HR /> <xsl:apply-templates /> </BODY> </HTML> </xsl:template> <xsl:template match="BENEFIT"> <H4>Benefit: - $<xsl:value-of select="INSTALLMENT" /></H4> <BR /> <xsl:apply-templates /> </xsl:template> <xsl:template match="RIDER"> Rider #<xsl:value-of select="NUMBER" /> .......... $<xsl:value-of select ="INSTALLMENT" /> <BR /> </xsl:template> </xsl:stylesheet> and this is the HTML result: <HTML> <HEAD> <TITLE>the quote</TITLE> </HEAD> <BODY> <H1>The Policy Installment Premium is $805.75</H1> <BR> <H1>To be paid 2 times per year.</H1> <BR> <BR> <BR> <H3>Policy Summary</H3> <HR> 805.75 2 <H4>Benefit: - $805.75</H4> <BR> 805.75 1 Rider #1 .......... $385.54<BR> Rider #2 .......... $378.20<BR> Rider #3 .......... $42.01<BR> </BODY> </HTML> Thanks in advance Phil XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: using XT to process Web resourc, Richard Lander | Thread | RE: Problem with Xalan processing, Steve Brown |
using XT to process Web resources, Richard Lander | Date | RE: using XT to process Web resourc, Richard Lander |
Month |