str:tokenize() doesn't return a sequence of strings, it returns a sequence of nodes.
 
Your conversion to use fn:tokenize() here is quite incorrect, it should be:
 
<xsl:variable name="tokens" select="tokenize($search2,' ')"/>
<xsl:for-each select="$tokens">
 <xsl:choose>
  <xsl:when test="substring(.,string-length(.),1) = '*'">
   <xsl:value-of select="."/>                   
  </xsl:when>
  <xsl:otherwise>
   <xsl:value-of select="."/><xsl:text>* </xsl:text>       
  </xsl:otherwise>
 </xsl:choose>
</xsl:for-each>
 
 
Except that I would probably write:
 
<xsl:for-each select="tokenize($search2,' ')"/>
  <xsl:value-of select="if (ends-with(., '*') then . else concat(., '*')"/>
</xsl:for-each>  
 
 
     
 
Michael says:
There's no change here between XSLT 1.0 and XSLT 2.0. Two global parameters can have the same name if and only if they have different import precedence.
 
According to spec, yes.  Evidently XALAN is forgiving about this requirement when including a file instead of importing.  The easy fix is to change <xsl:include/> into <xsl:import/>. 
 
 
I wouldn't describe a non-conformance to the spec as "forgiving". "Seducing", perhaps, in the sense that it encourages people to write non-portable code.
 
Michael Kay
http://www.saxonica.com/