[xslt] template matching issue with node-sets?




The following stylesheet applys templates on identical xml, the first
instance is in a variable/node-set, the second is from the source document.
They xml is the same so the same template should be found for either.  the
template match is "DIRTREE[d][f]".  It finds the correct match on the xml on
the source document, and incorrectly when from a node-set

Here's the interesting part.  If you remove one set of brackets from the
match (i.e match="DIRTREE[d]") it will act correctly, so it appears that
having multiple brackets in the match when run against a variable/node-set
will not work.  

Is this a bug or am I insane (or, possibly, both).

C:\scratch>xsltproc --version
Using libxml 20418, libxslt 10014 and libexslt 705
xsltproc was compiled against libxml 20418, libxslt 10014 and libexslt 705
libxslt 10014 was compiled against libxml 20418
libexslt 705 was compiled against libxml 20418

C:\scratch>xsltproc dir-test.xsl dir-test.xml
<?xml version="1.0"?>
<root>
 Test 1

 Default Template Match Found

 Test 2
 DIRTREE : true : true</root>

 <<dir-test.xml>>  <<dir-test.xsl>> 

dir-test.xml

dir-test.xsl



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]