[
Lists Home |
Date Index |
Thread Index
]
- From: sunker@telkom.net
- To: <xml-dev@ic.ac.uk>
- Date: Fri, 8 Oct 1999 08:10:14 +0700
Hi pale.., i got some problem with using xml & xsl (it was work done). the
problem are from the input element tags, with the attribute type (text,
checkbox, radio, button etc),
when i defined the type attribute, the type button, radio, checkbox couldn't
be transfrorm into type button from xsl, but transform into text type, why ?
Help me ..., i attach this file for u all
:)) Sunk
http://www.geocities.com/researchtriangle/campus/7211
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<HTML>
<BODY bgcolor="white">
<TABLE BORDER="0" WIDTH="484" CELLSPACING="0" CELLPADDING="0">
<TR valign="Top" bgcolor="#ffeeee">
<TD align="LEFT">
<xsl:value-of select="//LTITLE"/>
</TD>
<TD align="RIGHT">
<xsl:value-of select="//GROUPS[@ID='s13']/HEADER_INFO/PARAG1"/>
</TD>
</TR>
<xsl:for-each select="//GROUPS[@ID='s23']">
<xsl:apply-templates select="HEADER_INFO"/>
<xsl:apply-templates select="ENTRY"/>
</xsl:for-each>
</TABLE>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="ENTRIES">
<xsl:apply-templates select="LTITLE"/>
<xsl:apply-templates select="GROUPS"/>
</xsl:template>
<xsl:template match="GROUPS">
<xsl:apply-templates select="HEADER_INFO"/>
<xsl:apply-templates select="ENTRY"/>
</xsl:template>
<xsl:template match="HEADER_INFO">
<xsl:apply-templates select="PARAG3"/>
</xsl:template>
<xsl:template match="textNode()">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="HEADER_INFO">
<TR>
<TD COLSPAN="2">
<xsl:value-of select="PARAG2"/>
<HR/>
</TD>
</TR>
<TR>
<TD COLSPAN="2">
<xsl:value-of select="PARAG3/."/>
<HR/>
</TD>
</TR>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="ENTRY">
<xsl:choose>
<xsl:when match="ENTRY[@SECTION='RDO']">
<TR>
<TD COLSPAN="2">
<INPUT>
<xsl:attribute name="TYPE">
<xsl:value-of select="TIPE"/>
</xsl:attribute>
<xsl:attribute name="SIZE">
<xsl:value-of select="@SIZE"/>
</xsl:attribute>
<xsl:attribute name="NAME">
<xsl:value-of select="@NAME"/>
</xsl:attribute>
</INPUT>
<xsl:value-of select="INFO"/>
<BR/>
</TD>
</TR>
</xsl:when>
<xsl:otherwise>
<TR>
<TD>
<xsl:value-of select="INFO"/>
<BR/>
</TD>
<TD>
<xsl:choose>
<xsl:when match="ENTRY[@SECTION='SELECTS']">
<SELECT>
<xsl:attribute name="NAME">
<xsl:value-of select="@NAME"/>
</xsl:attribute>
<xsl:for-each select="OPTIONS">
<OPTION>
<xsl:attribute name="@ID"/>
<xsl:value-of/>
</OPTION>
</xsl:for-each>
</SELECT>
<BR/>
</xsl:when>
<xsl:otherwise>
<INPUT>
<xsl:attribute name="TYPE">
<xsl:value-of select="TIPE"/>
</xsl:attribute>
<xsl:attribute name="SIZE">
<xsl:value-of select="@SIZE"/>
</xsl:attribute>
<xsl:attribute name="NAME">
<xsl:value-of select="@NAME"/>
</xsl:attribute>
</INPUT>
<BR/>
</xsl:otherwise>
</xsl:choose>
</TD>
</TR>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
<?xml:stylesheet type="text/xsl" href="REG-XSL.xsl"?>
<ENTRIES>
<LTITLE>Broker Application Form</LTITLE>
<GROUPS ID="s13">
<HEADER_INFO>
<PARAG1>Step 1 of 3</PARAG1>
<PARAG2>Account Information</PARAG2>
<PARAG3>
<SBONE>Thank you for choosing to apply for a Broker account</SBONE>
<SUBTTL>What kind account would you like to open ?</SUBTTL>
</PARAG3>
</HEADER_INFO>
<ENTRY SECTION="RDO" NAME="CO">
<INFO>Individual</INFO>
<TIPE>RADIO</TIPE>
</ENTRY>
<ENTRY SECTION="RDO" NAME="CO">
<INFO>Joint</INFO>
<TIPE>RADIO</TIPE>
</ENTRY>
</GROUPS>
<GROUPS ID="s23">
<HEADER_INFO>
<PARAG1>Step 2 of 3</PARAG1>
<PARAG2>Personal Information</PARAG2>
<PARAG3>Please fill all the fields</PARAG3>
</HEADER_INFO>
<ENTRY SECTION="INPUTS" NAME="FNAME">
<INFO>First Name</INFO>
<TIPE>TEXT</TIPE>
</ENTRY>
<ENTRY SECTION="INPUTS" NAME="LNAME">
<INFO>Last Name</INFO>
<TIPE>TEXT</TIPE>
</ENTRY>
<ENTRY SECTION="INPUTS" NAME="HADDR" SIZE="25">
<INFO>Home Address</INFO>
<TIPE>TEXT</TIPE>
</ENTRY>
<ENTRY SECTION="INPUTS" NAME="OADDR" SIZE="25">
<INFO>Office Address</INFO>
<TIPE>TEXT</TIPE>
</ENTRY>
<ENTRY SECTION="INPUTS" NAME="PHONE">
<INFO>Phone No.</INFO>
<TIPE>TEXT</TIPE>
</ENTRY>
<ENTRY SECTION="INPUTS" NAME="FAX">
<INFO>Fax No.</INFO>
<TIPE>TEXT</TIPE>
</ENTRY>
<ENTRY SECTION="INPUTS" NAME="EMAIL" SIZE="25">
<INFO>Email</INFO>
<TIPE>TEXT</TIPE>
</ENTRY>
<ENTRY SECTION="INPUTS" NAME="CITY" SIZE="15">
<INFO>City</INFO>
<TIPE>TEXT</TIPE>
</ENTRY>
<ENTRY SECTION="INPUTS" NAME="STATE" SIZE="10">
<INFO>State</INFO>
<TIPE>TEXT</TIPE>
</ENTRY>
<ENTRY SECTION="INPUTS" NAME="ZIP" SIZE="10">
<INFO>Zip</INFO>
<TIPE>TEXT</TIPE>
</ENTRY>
<ENTRY SECTION="SELECTS" NAME="COUNTRY">
<INFO>Country</INFO>
<OPTIONS ID="ID">INDONESIA</OPTIONS>
<OPTIONS ID="BG">BANGKOK</OPTIONS>
</ENTRY>
</GROUPS>
<GROUPS ID="s33">
<HEADER_INFO>
<PARAG1>Step 3 of 3</PARAG1>
<PARAG2>Investment Profile</PARAG2>
<PARAG3>Personal financial</PARAG3>
</HEADER_INFO>
<ENTRY SECTION="SELECTS" NAME="ANNUAL">
<INFO>Annual Income</INFO>
<OPTIONS ID="LS-15">less than $ 15,000</OPTIONS>
<OPTIONS ID="BT-16">$ 16,000 - $ 100,000</OPTIONS>
<OPTIONS ID="OV-100">Over $ 100,000</OPTIONS>
</ENTRY>
<ENTRY SECTION="SELECTS" NAME="LIQUID">
<INFO>Liquid Net Worth</INFO>
<OPTIONS ID="LQ-1">$ 1,000 - $ 10,000</OPTIONS>
<OPTIONS ID="LQ-11">$ 11,000 - $ 100,000</OPTIONS>
<OPTIONS ID="LQ-10">Over $ 100,000</OPTIONS>
</ENTRY>
</GROUPS>
</ENTRIES>
|