Add id to next element
Posted: Mon May 16, 2022 11:57 pm
I am trying to transform an XML document generated by Python Docutils to HTML. Here is a fragment from the source document:
The <target> element specifies an identifier for the next element, i.e., <section>. So I want something like<target refid="foo"/>
<section>
...
in the HTML output. I am unable to figure out how to attach an attribute to the next element while processing <target>. Would appreciate any help. Thanks.<section id="foo">