Delimiter for loop that may have blank rows
I have data that looks like this:
<parent>
<child>
<info>bar</info>
</child>
<child>
<data>foo</data>
<info>bar</bar>
</child>
<child>
<info>bar</info>
</child>
<child>
<data>foo</data>
<info>bar</bar>
</child>
</parent>
Really, the info nodes are more complex and have their own template.
In short, what I'd like to do is output all the data and info for any children that have a data node, with a delimiter between:
foo
bar
---
foo
bar
So I want the data, followed by the info, followed by a delimiter IF there is another child node with data. The problem is that any child node may or may not have data. This includes the first [n] children, the last [n] children, and any groups of children in the middle. I was thinking that following-sibling:: was going to solve my problem, but that fails if there is a gap anywhere but the end.
How can this be done?
TIA,
Kurt
|