http://bugs.winehq.org/show_bug.cgi?id=6856
------- Additional Comments From mikolaj.zalewski@gmail.com 2007-11-05 11:03 ------- What I wrote in the previous comment that xsltCompMatchPatternList matches XSLPattern is not true. xsltCompMatchPatternList matches a pattern as in <xsl:template match="..."> - it find nodes for which there exist a context node such the the pattern matches and has a limited syntax compared to XPath. That's why there were false positives. To match XPath queries for a given context node one has to use xmlXPathEval. I've made some patches adding it.
The XSLPattern is a Microsoft's own language probably based on a working draft of XSL. I couldn't find a specification but the differances with XPath that I've found about are: - The indexes starts from 0, not from 1 - It compares QNames, not expanded names (that what's needed by Civ4) - Some tokens needs to be changed (see http://msdn.microsoft.com/msdnmag/issues/0900/xml/figures.asp#fig6) - It has support to work with types defined in XDR schema
Except the last point, it should be possible to rewrite an XSLPattern into an XPath query. If we can define custom functions in should be possible to do it without parsing the XSLPattern - only we will need to tokenize it