ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> exslt
exslt
Re: [exslt] regexp:test() not working
by James Fuller other posts by this author
Aug 18 2006 12:41AM messages near this date
[exslt] regexp:test() not working | [exslt] Re: regexp:test() not working
& XSLT Gaurav Bhatnagar wrote:
>  Hello,
>  
>  I'm a programmer for the University of Michigan Library and am working 
>  on extracting some data from XML files using XSLT and Java.  It's 
>  necessary that I use regular expressions for Strings to test and match 
>  certain criteria for data filtering purposes.
>  
>  I just found out about EXSLT and have tried using the regexp:test() 
>  function, but continue to get the same error again and again.  I'm using 
>  the Oxygen XML Editor on Mac OS X Tiger, Intel.  The Editor is 
>  configured to use Saxon 6.6.5.


this is the number 1 FAQ for using EXSLT.

either there *exists* an implementation that uses pure XSLT template (or 
scripting like javascript) or the XSLT processor itself implements the 
function.

a) check to see if your specific XSLT processor implements your desired 
EXSLT function

b) check www.exslt.org if there exists an XSLT template (or javascript 
if this is acceptable)

in the case of b) you should only import the single function (not the 
module level imports)...check archives for reasons why.

gl, Jim Fuller

>  The error message I'm getting is:
>  
> > The URI http://exslt.org/regular-expressions does not identify an 
> > external Java class
>  
>  
>  I've tried the two following options:
>  
> > <xsl:stylesheet version="1.1"
> >     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >     xmlns:func="http://exslt.org/functions"
> >     xmlns:regexp="http://exslt.org/regular-expressions"
> >     extension-element-prefixes="regexp func">
> >    
> >     <func:script implements-prefix="regexp"
> >         language="exslt:javascript"
> >         src="regexpEXSLT/functions/test/regexp.test.js" />
> >     ...
> >     <xsl:if test="regexp:test($textString, '/d') = true()">
>  
>  
>  AND
>  
> > <xsl:stylesheet version="1.0"
> >     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >     xmlns:regexp="http://exslt.org/regular-expressions"
> >     extension-element-prefixes="regexp">
> >    
> >     <xsl:import href="regexpEXSLT/functions/test/regexp.test.msxsl.xsl" />
> >     ...
> >     <xsl:if test="regexp:test($textString, '/d') = true()">
>  
>  
>  In both scenarios, I get the same error.
>  
>  I just took the xmlns statement from the EXSLT website - is there a 
>  different namespace I should be referring to?  I definitely have the 
>  source files in the locations listed.
>  
>  I am somewhat new to XSLT and would appreciate any advice at all on how 
>  to get the EXSLT regular expressions functions working.
>  
>  Thanks very much.
>  
>  Bye bye,
>  Gaurav
>  
>  Gaurav Bhatnagar
>  Application Programmer/Analyst
>  University of Michigan Library
>  +1.734.763.8948
>  gbhatnag@[...].edu <mailto:gbhatnag@[...].edu>
>  
>  
>  
>  ------------------------------------------------------------------------
>  
>  _______________________________________________
>  exslt mailing list
>  list@[...].org
>  http://www.exslt.org/list


-- 
-----------
FlameDigital Limited | Webcomposite s.r.o.
Technical Director
Co-Author WROX Pro PHP4 XML, WROX Pro PHP Web Services
Co-Creator EXSLT http://www.exslt.org
Technical Reviewer WROX Beginning Databases, Beginning XSLT, XML
Handbook, Extreme XML 2004,2005,2006
XML Prague 2005/2006 http://www.xmlprague.cz
-----------
_______________________________________________
exslt mailing list
list@[...].org
http://www.exslt.org/list
Thread:
Gaurav Bhatnagar
James Fuller
A. Pagaltzis

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved