I'm trying to create a nested hierarchy from a flat structure, and I am using the following key:
<xsl:key name="next-headings"
match="w:p[w:pPr/w:pStyle/@w:val = 'Heading3']"
use="generate-id((ancestor::w:sdt[1] |
preceding-sibling::w:p
[w:pPr/w:pStyle/@w:val = 'Heading1'] or
preceding-sibling::w:p
[w:pPr/w:pStyle/@w:val = 'Heading2']
)[last()])"/>
I am getting the "not a node item" error, but don't understand why. Any help in translating this error is much appreciated!