xsl-list
[Top] [All Lists]

Re: [xsl] Count of unique attribute names

2006-11-03 05:50:52
On 11/3/06, Jesper Tverskov <jesper(_at_)tverskov(_dot_)dk> wrote:
Hi list

My XSLT 2.0 solution below is working. I am just wondering if there is an
easier way that could perhaps bring distinct-values() into play?

<xsl:variable name="uniqueAttributeNames">
        <xsl:for-each-group select="//@*" group-by="local-name()">
                <xsl:sequence select="local-name()"/>
      </xsl:for-each-group>
</xsl:variable>

<xsl:variable name="uniqueAttributeNames"
 select="distinct-values(//@*/local-name())" as="xs:string+"/>

cheers
andrew

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>