xsl-list
[Top] [All Lists]

RE: Using not(...a nd ... ) to select nodes

2003-07-10 15:17:26
I wrote:
I think you probably need to do Muenchian grouping using a composite
key on name, type, and status.
See http://www.dpawson.co.uk/xsl/sect2/N4486.html

To spell it out more, something like

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>

  <xsl:key name="itemFromData" match="item" use="concat(name, '+', type, '+', 
status)" />
  
  <xsl:template match="/">
    <xsl:for-each select="/items/item[generate-id(.) =
            generate-id(key('itemFromData', concat(name, '+', type, '+', 
status))[1])]">
      <xsl:apply-templates />
      <br />
    </xsl:for-each>
  </xsl:template>
  
  <xsl:template match="text()">
    <xsl:value-of select="concat(., ' ')" />
  </xsl:template>
</xsl:stylesheet>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list