Hi all:
I have the following xml and want to insert additional xml into it:
<root>
<steps>
<step name="step1" type="process">
<steps>
<step name="substep1">
</step>
</steps>
</step>
<step name="step2" type="process">
<steps>
<step name="substep1">
<!-- more substeps...-->
</step>
</steps>
</step>
<step name="step3" type="process">
<steps>
<step name="substep1">
</step>
<step name="substep2">
</step>
<!-- more substeps...-->
</steps>
</step>
<!-- THE BELOW IS WHAT I WISH TO ADD... and it has to be here -->
<step name="reference">
<!-- These stuff have been hardcoded in my xsl so its fine -->
</step>
<!-- ends -->
</steps>
<references>
<reference name="reference1">
</reference>
.
.
.
</references>
</root>
As I've written in the xml sample, I wish to add an additional step element as the very last step within the outter most steps. I have the xml snippet already hardcoded in my xsl so all I needed to do is to find the best logic to move to that particular point of the xml tree so I can call the template and have that snipet added in.
What is the recommended/best approach to do this?
Thanks.