Let say that I got this XML:
<tr>
<td/>
<td rowspan="3"/>
<td rowspan="-1">
<td rowspan="&#%@!">
</tr>
From which I need the get the rowspan
attribute of each col
node as an integer >= 1.
The expected output would be:
1
3
1
1
I couldn’t find anything else than the following expression:
//td/(if (@rowspan castable as xs:integer) then max((1, xs:integer(@rowspan))) else 1)