|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Attributes /XSL/ XML
Hi everyone,
I am using the following code in a XSL file: <xsl:for-each select="tables/table" > <xsl:if select="@name=categories" > "name" is an attribute in table element. "categories" is a value of "name". The validator parser is throwing the following error. Attribute 'select' is invalid on 'xsl:if'. Is it possible to check the value of an attribute using any of the xsl methods (eg: <xsl:choose > ), Help really appreciated.. Thanks. |
|
#2
|
|||
|
|||
|
Hi,
I think I sort the problem out.. Following is the code I used: ...... <xsl:for-each select="businessRecords/tables/table" > <xsl:choose> <xsl:when test="@name='products'"> <xsl:for-each select="record" > <xsl:choose> <xsl:when test="category/@cat='C2'"> <tr align="center"> <td align="center"> <xsl:value-of select="product_name" /> ....... It seems that <xsl:if test="@name='products'"> does't allow the use of @. Thanks, |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Attributes /XSL/ XML |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|