Re: [xsl] Text Box Prob

Subject: Re: [xsl] Text Box Prob
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Wed, 5 Sep 2001 18:15:55 +0100
Hi,

> I have to create a textbox with value from XSL.
>
> <INPUT maxLength=7 name=test size=14>
> <xsl:attribute name="value">    
>  <xsl:value-of select="TITLES"/>
> </xsl:attribute> 
>
> This is giving me an error that:
> A string literal was expected but no opening quote character was
> found.

The XSLT that you write has to be well-formed XML. In XML, all
attributes have to have quotes around them. You should use:

  <INPUT maxLength="7" name="test" size="14">
    <xsl:attribute name="value">
      <xsl:value-of select="TITLES" />
    </xsl:attribute>
  </INPUT>

Or, more simply, an attribute value template rather than xsl:attribute:

  <INPUT maxLength="7" name="test" size="14" value="{TITLES}" />

I hope that fixes it,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread