XML Tutorial/XSLT stylesheet/contains — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:26, 26 мая 2010
contains() returns true if the first argument string contains the second argument string
<source lang="xml">
File: Data.xml <?xml version="1.0" encoding="utf-8"?>
<text>Welcome to XSL world.</text> <string>Welcome</string> <string>XSL</string> <string>XML</string>
File: Transform.xslt <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet
version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/">
<xsl:value-of select="//text"/> |
||
---|---|---|
string</TH>
<td>starts-with</TH> <td>contains</TH> |
Welcome to XSL world. | ||
---|---|---|
string</TH><td>starts-with</TH><td>contains</TH> |