This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Text Box Prob


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]