This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Generating IDs for each element
- To: xsl-list at mulberrytech dot com
- Subject: Generating IDs for each element
- From: Malcolm Locke <malcolm dot locke at net800 dot co dot uk>
- Date: Mon, 4 Sep 2000 17:37:58 +0100
- Reply-To: xsl-list at mulberrytech dot com
OK, my appologies first off if this has been done before, but here goes..
I want to be able to generate a unique ID for each element that I will then
be able to access in another parse invocation. For example, translate the
following
<sect>
<para>Para one</para>
<para>Para two</para>
</sect>
<sect>
<para>Para three</para>
<para>Para four</para>
</sect>
into:
....
<p>Para one</p><a href="edit.xml?element_ID={???}">[edit]</a>
<p>Para two</p><a href="edit.xml?element_ID={???}">[edit]</a>
etc...
This must work across invocations, so I can guarantee the ID will be the same
next time I call it. I want to be able to do this for any element. Is there a
way to get the position of the current element in the context of the _whole_
document?
Mal
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list