Hi, I have the following problem which I suspect is related to the way exsl:tokenize() is implemented in libxslt. 1. I have a very large reference document (actually a set of documents which are referenced in a single xml index with xinclude - xsltproc is called with --xinclude to simulate a single reference document) 2. A generic stylesheet is used to extract a node-set from this document. It uses keys to navigate it. 3. This xslt used to take in parameter the value of an attribute of the node to extract (grossly oversimplified). It works in this mode 4. Now to extend the system (it's not real useful with a single node) I decided to pass a value list to the xslt. Since this list may be of variable length, I'm using a single parameter + exsl:tokenize to decompose it. The problem is, the tokenisation works but the xsl templates no longer produce any results ie something like this worked : <xsl:call-template name="extract"> <xsl:with-param name="part" select="'foo'"/> </xsl:call-template> ... <xsl:template name="extract"> <xsl:param name="part" required="yes"/> <xsl:choose> <xsl:when test="count(key('parts',$part))>0"> But something like this doesn't : <xsl:for-each select="exsl-str:tokenize('foo:bar', ':; ')" <xsl:call-template name="extract"> <xsl:with-param name="part" select="."/> </xsl:call-template> </xsl:for-each> ... <xsl:template name="extract"> <xsl:param name="part" required="yes"/> <xsl:choose> <xsl:when test="count(key('parts',$part))>0"> (it seems the count is always zero in this case) 1. Am I doing something incredibly stupid ? 2. If the answer is yes, what would be the correct way to achieve the same results ? 3. If the answer is no, did I just hit a libxslt bug ? Can it be fixed in the near future or should give up on this transformation ? Regards, -- Nicolas Mailhot
Attachment:
signature.asc
Description: This is a digitally signed message part