I am trying to go through the nodes of the Docbook section. Their structure is as follows:
<sect1>
<sect2>
<sect3>
<sect4>
<sect5>
</sect5>
</sect4>
</sect3>
</sect2>
</sect1>
So, sect1 has only a sect inside, sect2 will only have a section inside, etc. We can also have several sub-settings within node; for example, multiple sect2 within sect1.
Programmatically, I would iterate over them recursively, using a counter to track which section the loop is in.
This time I have to use XSLT and skip it. So is there an equivalent way, or a better way to do this in XSLT?
Edit: I already have a similar code suggested by Willy, where I point to every sect node (sect1 - sect5). I am looking for a solution where it will define the node section by itself, and I wonβt have to repeat the code. I know that Docbook specifications only allow up to 5 nested nodes.
source
share