It looks like the conditionalRowStyle
template to add styles to the table is in the same stylesheet as the one building the table. If that's the case, then it will not work as expected, since the nodes selected in the conditionalRowStyle
template will be from the source document (containing someNode
) and not the target document (where the generated table elements are.)
You can "hack" this by collecting the table output of the someNode
templates to a variable first, which you can then run the conditionalRowStyle
template on first before finally outputting the variable value as the result of the stylesheet. But it's much simpler to use two stylesheets, that you run one after the other in a pipeline. The first stylesheet converts the someNode
data to a table, and the second applies conditionalRowStyle
formatting to the table.