Hi jvalentin,
try this:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:key name="duplicateEl" match="el" use="node" />
<xsl:key name="duplicateNode" match="rel/el/node"
use="concat(parent::el/parent::rel/parent::el/node,'::',.)" />
<xsl:template match = "/">
<xsl:for-each select="xml/el[count(. | key('duplicateEl', node)[1]) = 1]">
<xsl:sort select="node" />
<xsl:variable name="node" select="node"/>
<xsl:value-of select="node"/><xsl:text>-</xsl:text>
<xsl:for-each select="//rel[parent::el/node=$node]/el/node[count(. |
key('duplicateNode',
concat(parent::el/parent::rel/parent::el/node,'::',.))[1]) = 1]">
<xsl:sort select="." />
<xsl:value-of select="."/>
</xsl:for-each>
<xsl:text>$</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
I get: linebreaks with $
A-XY
B-XZ
C-Z
...
Cheers,
Juergen
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--