I've been running around in circles with this and hopefully someone out there has some info they can shed on it.

I am working with trying to translate XSL with XML into xHTML and I am having issues with converting an EXSLT function (exslt.org/regular-expressions) into a Java class that I can call within an .xsl document.

The class that I have (called RegExHelper) sits in the same directory as the XML/XSL documents

In the XSL doc:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- bunch of XSL stuff  -->
<xsl:when test(string(@hideIfHardwareIs)='') or (not(regexp.matches(string($input_doc//inf[@id='5']), string(@hideIfHarewareIs), 'i')))">
<!-- more XSL Stuff -->

Hopefully that little snippet makes sense.
The RegExHelper class has a public static method called matches() that takes 3 arguments. What I get when I try and run it is
ERROR: 'Error checking type of the expression 'funcall(regexp.matches, [funcall(string, [FilterParentPath(FilterParentPath(variable-ref(input_doc/node-set), step("descendant-or-self", 1)), step("child", 15, pred(=(step("attribute", 18), literal-expr(5)))))]), funcall(string, [step("attribute", 21)]), literal-expr(i)])'.'
Not sure what's going on. Anythoughts?