By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,334 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,334 IT Pros & Developers. It's quick & easy.

EXSLT and regexp

P: n/a
I'm trying to use the EXSLT regexp package from

(specifically the match function) with the libxml xltproc (which
supports EXSLT), but whatever I do gets errors. The examples use
namespace regExp, but the supplied files use regexp, I've got it so that
it at least doesn't complain about namespaces but it then complains that
it can't find the match function. My stylesheet is:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"

<import href="regexp.match.xsl" />

<xsl:output method="text"/>

<xsl:template match="/">
<xsl:for-each select="regexp:match('This is a test string', '(\w+)', 'g')">
Part <xsl:value-of select="position()" /> = <xsl:value-of select="." />


(This is the same test as the second one on the page referenced above,
with regExp changed to regexp and the closing parenthesis added.)

The errors I get are:

xmlXPathCompOpEval: function match not found
Error xpath.c:9637: Unregistered function
xmlXPathCompiledEval: 2 object left on the stack

Has anyone actually had the regexp functions working?

Chris C
Jul 25 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.