Trying to run some regex in XSLT1 using Java. I have these defined at the top: Code: xmlns:regex="java:java.util.regex.Pattern" xmlns:string="java:java.lang.String" tried to do this Code: <xsl:variable name="pattern" select="regex:compile('my regex here')"/> and i got a complained that the argument in compile() is not an object. great, so i try to create a String object using Code: <xsl:variable name="regex" select="string:new('my regex here')"/> cept now i get a complain what the hey is going on... and no i can't upgrade to XSLT2. i wish to jesus and mary i could... appreciate any help. thanks!