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: xsl loop for display in drop-down box


> Saxon gives me the following error:
> "Cannot write an attribute when there is no open start tag"
>         <xsl:element name="option">
>         <xsl:value-of select="."/>
>          <xsl:if test="@SELECTED='Y'">
>               <xsl:attribute name="SELECTED"><xsl:value-of
> select="($tmp)"/></xsl:attribute>
>         </xsl:if>
>        </xsl:element>

Generate the attribute node before you generate the text node., i.e. move
the <xsl:if> to before the <xsl:value-of>

Mike Kay


 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]