|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I need to check if one tag matches another to produce the results required, but I don't think I'm doign it right. Any suggestions?
<xml> <ContactTypeList VALUE="Primary" NAME="Primary"/> <ContactTypeList VALUE="Billing" NAME="Billing"/> <Contact NAME="J Smith" TYPE="Billing"/> <Contact NAME="J Doe" TYPE="Billing"/> <Contact NAME="J Frankestein" TYPE="Primary"/> </xml> <xsl> <xsl:for-each select="Contact"> ... <select name="contactType"> <xsl:for-each select="ContactTypeList"> <option name="@Name" value="@VALUE"> <xsl:if test="@VALUE = /Contact/@TYPE"> <xsl:attribute name="selected">selected</xsl:attribute> </xsl:if> </option> </xsl:for-each> </select> ... </xsl:for-each> </xsl> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > xsl:if comparison help needed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|