我有一個包含字符串值的變量serviceProvideList
。如何避免從字符串變量中獲取重複的字符串?
我用下面的代碼分別獲得每個字符串:
<xsl:variable name="tokenizedSample" select="str:tokenize($serviceProvideList,'
')"/>
<xsl:for-each select="$tokenizedSample">
<xsl:variable name="weakProvide" select="."/>
<xsl:variable name="tokenized" select="str:tokenize($weakProvide,' ')"/>
<xsl:for-each select="$tokenized">
<xsl:variable name="weakP" select="."/>
<xsl:value-of select="$weakP"/>
</xsl:for-each>
</xsl:for-each>
如何避免在變量serviceProvideList
重複值?
看來是http://stackoverflow.com/questions/6054688/how-to-check-repeated的複本-elements功能於作爲串序列陣列。請不要多次提問同一個問題。 – 2011-05-19 15:59:13