I am doing an XSLT stylesheet to transform from XML to XML, the layouts are very different and my case is causing a headache. I can only use XSLT 1.0 and I'm not finding the way to do it.
Input File
<?xml version="1.0"?>
<Root>
<ParentNode>
<Node>
<Id>1</Id>
<Date>2019-02-01</Date>
<ReferenceLine>1</ReferenceLine>
</Node>
<Node>
<Id>2</Id>
<Date>2019-02-01</Date>
<ReferenceLine>1</ReferenceLine>
</Node>
<Node>
<Id>3</Id>
<Date>2019-02-02</Date>
<ReferenceLine>2</ReferenceLine>
</Node>
</ParentNode>
</Root>
Output File
<Lines>
<Line>
<LineNum>1</LineNum>
<Node>1 - 2</Node>
</Line>
<Line>
<LineNum>2</LineNum>
<Node>3</Node>
</Line>
</Lines>
So what I need is to concatenate in the Output all the nodes that appears with reference to the line. While I can have multiple ocurrences of Node in the Input file, in the output file I can only have one ocurrence inside the Line node.