[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Accessing attributes
Hello Carlos,
both answers until now seem to be incorrect. I assume, that you are only missing current(): <xsl:when test="/site/dadosPasseio/correlato/item[@correlato = current()/@idPasseio]"> A snippet of the corresponding XML often will help, but here it was easy, because you are not the first with this problem. May I suggest you a shorter version in general: <xsl:for-each select="site/passeio/item"> <option value="{@idPasseio}"> <xsl:if test="/site/dadosPasseio/correlato/item[@correlato = current()/@idPasseio]"> <xsl:attribute name="selected">selected</xsl:attribute> </xsl:if> </option> </xsl:for-each> Furthermore you avoid duplicate code. Regards, Joerg Carlos Durand wrote: Hi all, XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|