Skip to content

Instantly share code, notes, and snippets.

@allen allen/master.xml
Created Nov 14, 2012

Embed
What would you like to do?
<?xml version="1.0" ?>
<ds-count-products-by-category>
<item handle="compressors">compressors</item>
<item handle="compressors">compressors</item>
<item handle="complete-plants">complete-plants</item>
<item handle="complete-plants">complete-plants</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
<item handle="chillers">chillers</item>
</ds-count-products-by-category>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="category" match="ds-count-products-by-category/item" use="@handle"/>
<xsl:template match="/">
<xsl:value-of select="count(key('category', 'chillers'))"/>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.