I
iliad
hi!
i have following xml snippet. for every par-element i would like to
create a key which value is the ID of its related* pardef-element. but
the xsl-key element seems to be incorrect and i can't figure out why or
how to achieve this.
do you have any ideas?
XML
=======================
<richtext>
<pardef id='1'/>
<par def='1'>
textbefore
</par>
<pardef id='2' list='bullet'/>
<par def='2'>
point1
</par>
<par def='1'>
textafter
</par>
</richtext>
XSL-KEY
=======================
<xsl:key name="par" match="par"
use="generate-id(pardef[@id=self::node[@def]])"/>
*
=======================
every <par def='1'> should have a reference to <pardef id='1'/>
every <par def='2'> should have a reference to <pardef id='2'/>
i have following xml snippet. for every par-element i would like to
create a key which value is the ID of its related* pardef-element. but
the xsl-key element seems to be incorrect and i can't figure out why or
how to achieve this.
do you have any ideas?
XML
=======================
<richtext>
<pardef id='1'/>
<par def='1'>
textbefore
</par>
<pardef id='2' list='bullet'/>
<par def='2'>
point1
</par>
<par def='1'>
textafter
</par>
</richtext>
XSL-KEY
=======================
<xsl:key name="par" match="par"
use="generate-id(pardef[@id=self::node[@def]])"/>
*
=======================
every <par def='1'> should have a reference to <pardef id='1'/>
every <par def='2'> should have a reference to <pardef id='2'/>