Francois - 2005-09-29

Hello,

Firstly, thank you very much for a great project, it has been extremely helpful!!!!! :-)

Please correct my syntax in the XSLT below, I need to dynamically fill the "name" parameter of an HTML textbox.

<?xml version="1.0" encoding="iso-8859-1"?>
<data>
<calendar>
    <name>A4 DRILLED</name>
    <description>A4 Plus Calendar,  sized 230mm x 340mm with an overprint area of  210mm x 50mm.  The calendar is printed in full colour on one side and in one colour on the reverse on 200gsm Matt.  The calendar is drilled at the top. This price includes a black overprint.</description>
    <_25>0</_25>
    <_50>0</_50>
    <_100>6.72</_100>
    <_200>3.78</_200>
    <_300>3.25</_300>
    <_400>3.00</_400>
    <_500>2.80</_500>
    <_750>2.48</_750>
    <_1000>2.31</_1000>
    <_1500>2.11</_1500>
    <_2000>2.05</_2000>
    <_3000>1.91</_3000>
    <_5000>1.77</_5000>
    <_10000>1.66</_10000>
</calendar>
<calendar>
    <name>MINI DRILLED</name>
    <description>Mini Calendar, sized 155mm x 440mm with an overprint area of 140mm x 45mm. The calendar is printed in full colour on one side and in one colour on the reverse on 200gsm Matt. The calendar is drilled at the top. This price includes a black overprint.</description>
    <_25>0</_25>
    <_50>0</_50>
    <_100>6.72</_100>
    <_200>3.78</_200>
    <_300>3.25</_300>
    <_400>3.00</_400>
    <_500>2.80</_500>
    <_750>2.48</_750>
    <_1000>2.31</_1000>
    <_1500>2.11</_1500>
    <_2000>2.05</_2000>
    <_3000>1.91</_3000>
    <_5000>1.77</_5000>
    <_10000>1.66</_10000>
</calendar>
<calendar>
    <name>MEDIUM DRILLED</name>
    <description>Medium Drilled Calendar, sized 295mm x 430mm with an overprint area of 275mm x 60mm. This calendar is printed in full colour on one side and in one colour on the reverse on 200gsm Matt. The calendar is drilled at the top. This price includes a black overprint.</description>
    <_25>0</_25>
    <_50>0</_50>
    <_100>6.72</_100>
    <_200>3.78</_200>
    <_300>3.25</_300>
    <_400>3.00</_400>
    <_500>2.80</_500>
    <_750>2.48</_750>
    <_1000>2.31</_1000>
    <_1500>2.11</_1500>
    <_2000>2.05</_2000>
    <_3000>1.91</_3000>
    <_5000>1.77</_5000>
    <_10000>1.66</_10000>
</calendar>
</data>

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

<html>
<head>
<title>Untitled Document</title>
</head>

<body>

    <form action='verify.php' method='POST'>

    <table>
        <tr>
            <td><b>CATEGORY</b></td>
            <td><b>25</b></td>
            <td><b>50</b></td>
            <td><b>100</b></td>
            <td><b>200</b></td>
            <td><b>300</b></td>
            <td><b>400</b></td>
            <td><b>500</b></td>
            <td><b>750</b></td>
            <td><b>1000</b></td>
            <td><b>1500</b></td>
            <td><b>2000</b></td>
            <td><b>3000</b></td>
            <td><b>5000</b></td>
            <td><b>10000</b></td>
        </tr>
            <xsl:apply-templates />   
    </table>

        <input type='submit' value='VERIFY'></input>
    </form>

</body>
</html>

</xsl:template>

<xsl:template match="data">
        <xsl:apply-templates select="calendar" />
</xsl:template>

<xsl:template match="calendar">
    <tr>
        <td><xsl:value-of select="name" /></td>
        <td><xsl:value-of select="_25" /></td>
        <td><xsl:value-of select="_50" /></td>
        <td><xsl:value-of select="_100" /></td>
        <td><xsl:value-of select="_200" /></td>
        <td><xsl:value-of select="_300" /></td>
        <td><xsl:value-of select="_400" /></td>
        <td><xsl:value-of select="_500" /></td>
        <td><xsl:value-of select="_750" /></td>
        <td><xsl:value-of select="_1000" /></td>
        <td><xsl:value-of select="_1500" /></td>
        <td><xsl:value-of select="_2000" /></td>
        <td><xsl:value-of select="_3000" /></td>
        <td><xsl:value-of select="_5000" /></td>
        <td><xsl:value-of select="_10000" /></td>
        <td>
THIS NEXT LINE GIVES ME A PROBLEM!!!!!!!
<input type="text" name="<xsl:value-of select="name" />" value="N/A" size="3"></input></td>
    </tr>
</xsl:template>

</xsl:stylesheet>

Many thanks in advance,

Francois.Joubert@mailbox.co.za