EXSLT - set:distinct - Implementer Page

Version: 1
Status: stable
User Page: index.html
XML Definition: set.distinct.xml
Function Package: set.distinct.zip

Function Syntax

node-set set:distinct(node-set)

Template Syntax

<xsl:call-template name="set:distinct">
   <xsl:with-param name="nodes" select="node-set" />
</xsl:call-template>

The set:distinct function returns a subset of the nodes contained in the node-set NS passed as the first argument. Specifically, it selects a node N if there is no node in NS that has the same string value as N, and that precedes N in document order.

The set:distinct template applies templates to these nodes in set:distinct mode. By default, the nodes are copied by this template, so that a result tree fragment consisting of the nodes is returned.

An implementation of this extension function in the EXSLT set namespace must conform to the behaviour described in this document.

Implementations

Built-in support for set:distinct is available in the following XSLT processors:

ProcessorProcessor VersionImplemented Version
4XSLT, from 4Suite.0.12.0a31
SAXON from Michael Kay6.31
jd.xslt from Johannes Döbler1.0.91
Xalan-J from Apache2.4.D11

The following implementations of set:distinct are available:

LanguageImplemented VersionCreatorDateDownload
XSLT Template1Jeni Tennison2001-03-28set.distinct.template.xsl
EXSLT Function1Jeni Tennison2001-03-28set.distinct.function.xsl

Use Cases

Use Case Package: set.distinct.use-cases.zip

The following use cases illustrate the functionality of set:distinct.

DetailsCalling StylesheetXML DataExpected ResultCategoryTemplate
1set.distinct.1.xslset.distinct.data.1.xmlset.distinct.result.1.xmlexampleN

Change History

Submitted: 2001-03-28
Creator: Jeni Tennison(http://www.jenitennison.com)

Returns the nodes within the node set that have unique values.

VersionModifiedByDetails
1.12001-04-25Jeni Tennison

Updated the description of the function to be more comprehensible (following Mike Kay's suggestion).

1.22001-05-08Jeni Tennison

Added a description of how the template-equivalent to the function works.

1.32001-05-22Jeni Tennison
  • Added vendor implementations in Saxon and 4XSLT
  • Changed status to stable
1.42001-06-11Jeni Tennison

Added vendor implementation in jd.xslt.

1.52002-08-20Craig Stewart

Added Xalan-J implementation to the list.

1.62002-11-12Craig Stewart

Updated 4XSLT version to 0.12.0a3.

Copyright

http://www.exslt.org/set/functions/distinct/set.distinct.html last modified 2002-11-12