Comment detail

文字変換表に基く文字列の変換 (Nested Flatten)
XSLTでは XPath Functions の translate() が使えます。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<xsl:stylesheet version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fn="http://www.w3.org/2005/xpath-functions"
  >

  <xsl:template match="/" >
    <!-- 基本 -->
    <xsl:message select="fn:translate('typewriter', 'qwertyuiop', 'QWERTYUIOP')" />
    <!-- 特定の文字を消す -->
    <xsl:message select="fn:translate('かたたたき', 'た', '')" />
  </xsl:template>

</xsl:stylesheet>

Index

Feed

Other

Link

Pathtraq

loading...