Comment detail

重複する要素を取り除く (Nested Flatten)
selector ([]) が sequenceに対しても使えるので楽ですね。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<xsl:stylesheet version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:fn="http://www.w3.org/2005/xpath-functions"
  >

  <xsl:output method="text" />

  <xsl:template match="/" >
    <xsl:variable name="seq" as="xs:integer*"
      select="(3,1,4,1,5,9,2,6,5)" />
    <xsl:value-of
      select="$seq[fn:count(fn:index-of($seq,.))=1]" />
  </xsl:template>
</xsl:stylesheet>

Index

Feed

Other

Link

Pathtraq

loading...