This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Generating IDs for each element


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]