You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ram Myneni <ra...@translogicsys.com> on 2000/05/22 09:37:20 UTC

XSL Elements error

Hello all,

In XSL file im trying to display controls on based on some
condition. 

Following is the code im refereing to....

   <xsl:if test="@TYPEVAL='TEXT'">
     <td><input type='text' name='' value=''></input></td>
   </xsl:if>
   <xsl:if test="@TYPEVAL='LIST'">
     <td>
       <select name=''>
        <xsl:for-each select="LISTBOX">  
         <xsl:for-each select="OPTION">
          <option><xsl:value-of select="OPTION"/></option>
         </xsl:for-each> 
        </xsl:for-each>
       </select>  
     </td>
   </xsl:if>

And the code in XML file is.....

<CONTROL>
     <DATA TYPEVAL="TEXT">
      <TEXT>First Name</TEXT>
     </DATA>
   </CONTROL>
   <CONTROL>
     <DATA TYPEVAL="TEXT">
      <TEXT>Last Name</TEXT>
     </DATA>
   </CONTROL>
   <CONTROL>
     <DATA TYPEVAL="LIST">
      <TEXT>Sex</TEXT>
      <LISTBOX>
        <OPTION>Male</OPTION>
        <OPTION>Female</OPTION>
      </LISTBOX>
     </DATA>
   </CONTROL>

The error im getting is....


  Expected token 'eof' found '='. @TYPEVAL-->=<--'TEXT'

  Can anyone help in resolving this?

  thanks,
   

Ram Myneni

TransLogic Systems
5th Floor Amogh Plaza, Greenlands,
Hyderabad, AP 500 016, India
Tel: +91-40-330175 x25
Fax: +91-40-3307943
http://www.translogicsys.com
Logic that Works.