Transform nodes with HXT using the number of <section> ancestor nodes
问题 I'm looking to replace all title elements with h1 , h2 , ... , h6 elements depending on how many ancestors are section elements. Example input/output: Input.xml <document> <section> <title>Title A</title> <section> <title>Title B</title> </section> <section> <title>Title C</title> <section> <title>Title D</title> </section> </section> </section> </document> Output.xml <document> <section> <h1>Title A</h1> <section> <h2>Title B</h2> </section> <section> <h2>Title C</h2> <section> <h3>Title D<