How do I use xsl:apply-templates on the node that is itself generated with xsl?
问题 I have an xml like this: <span reference="1">Reference Text 1</span> <term reference="2">Reference Text 2</term> And I need it to become this: <span class="referenceText">Reference Text 1</span> <a href="1">[1]</a> <i>Reference Text 2</i> <a href="2">[2]</a> So, basically, if the element with the reference attribute is a span, we just leave it as is, adding class="referenceText" . If, however it is any other element, then we should also apply templates created for this element. That's why