I put the xpath result into a variable x.
fn:empty($x) can only identify if the result sequence exists.
The $x could query into:
- a node with no value.
- a node with text value.
- a node with with sub-nodes.
How to identify case 1 so that I can put xsi:nil=“true” attribute to the output.
Thanks,
-Tina