This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to remove double elements????? - copying childs ofkey-referenced elements
- From: Joerg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 23 May 2002 21:59:26 +0200
- Subject: Re: [xsl] How to remove double elements????? - copying childs ofkey-referenced elements
- References: <a05100313b912baa02e2e@[192.168.254.19]>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello Stefan,
it's quite easy:
<xsl:for-each select="$tools">
<xsl:if test="key('computerkey', $comp_sort/@name)">
<xsl:copy-of select="key('computerkey',
$comp_sort/@name)/docu[@kind = 'local']"/>
<xsl:copy-of select="$comp_sort"/>
</xsl:if>
</xsl:for-each>
I don't know what
Regards,
Joerg
>>++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>
>>But using these constructions a new question came to my mind: is there a possibility to get a child of a "keyed" element??? The problem is, that the computer-elements in my sw-file have docu-elements as childs which the computer-elements in my hw-file don't have. Right now I only copy the computer-elements from hw-file, but I would also like to get the docu-elements and make them childs or at least siblings of the computer-elements (hw-file). I tried like
>>++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>...
>> <xsl:for-each select="$tools">
>> <xsl:if test="key('computerkey', $comp_sort/@name)">
>> <xsl:copy-of select="docu[@kind = 'local']"/>
>> <xsl:copy-of select="$comp_sort"/>
>> </xsl:if>
>> </xsl:for-each>
>><xsl:copy-of select="docu[@kind = 'local']"/>
>>...
>>++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>
>>but there was no effect!! So how can I reach the childs of the computer-elements that are referenced by computerkey???
>>
>>Many thanks in advance and kindly regards,
>>
>>Stefan
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list