Subject: [xsl] How to check for absence of a node? From: "Sudhir Malhotra" <sudhirmalhotra123@xxxxxxxxxxx> Date: Thu, 14 Jun 2001 16:25:38 -0500 |
A. I don't find the node "format/tr[2]/td[position()>1]", or B. The value of format/tr[2]/td[position()>1] is "NA"
-- XML input --- <format> <tr> <th>th1</th> <th>th2</th> <th>th3</th> <th>th4</th> <th>th5</th> <th>th6</th> <th>th7</th> <th>th8</th> </tr> <tr> <td>timestamp1</td> <td>NA</td> <td>NA</td> <td>NA</td> <td>NA</td> <td>NA</td> <td>NA</td> <td>NA</td> </tr> </format> --------------- -- XSL code --- <xsl:template match="/">
<!-- if error tag is present, process that --> <xsl:apply-templates select="//error"/>
<!-- else if A. I don't find the node "format/tr[2]/td[position()>1]", or B. The value of all td's in format/tr[2]/td[position()>1] is "NA" call error-template --> Don't know how to code the above conditions A and B.
<!-- else, the input XML looks good, start processing it --> <xsl:apply-templates select="format"/>
------------- _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XML - XML conversion, Andy Srinivasan | Thread | Re: [xsl] How to check for absence , Jeni Tennison |
[xsl] XML - XML conversion, Andy Srinivasan | Date | RE: [xsl] Copy DocType, bryan . s . schnabel |
Month |