|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
I have this line in my XML:
<folder code="0" title="Error code: E501" img="folder14.gif"/> In my XLST I need to check if the "code"value is "0", and then do something. The "code" item is mandatory. Currently, I only check whether it exists like this: <xsl:if test="@code"><xsl:attribute.....do somthing...</xsl:attribute></xsl:if> So how do I check the value of "code"? Is it like this? <xsl:if test="@code>0"> or do i need to use the <xsl:value-of select="@code"/> ? |
|
#2
|
|||
|
|||
|
You should be able to use <xsl:if test="@code>0">...</xsl:if> to test if the value of the code attribute is greater than 0.
__________________
- MW |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > validating XML values in XSLT |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|