I'm parsing a huge word file with Test descriptions, and have a problem of scope of nodes.
Word basically creates a list of paragraphs and I want to group them into a parent node. So for each node 'A' I want to group all the following nodes up to the next node 'A' into 'A'.

How can this be done with XSL?

Example:
I've gotten to :

```
<A/>
<ab/>
<ac/>
<A/>
<ab/>
<ac/>

```

But need:

```
<A>
<ab/>
<ac/>
</A>
<A>
<ab/>
<ac/>
</A>

```

Thank you!