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
[exslt] exslt functions problem
by Graham Seaman other posts by this author
Mar 5 2002 2:04PM messages near this date
Re: [exslt] exslt functions problem | Re: [exslt] exslt functions problem
Hi,

I'm having a problem using exslt functions, and am not sure whether
this is because my usage is incorrect, or there is a problem with
the platform or my installation ( I'm using libxml/libxslt). Could anyone
confirm whether the code below SHOULD run correctly?

Given the two files below, if I run the second one free-standing
everything works fine. If I call the function from the first file
('test2.xsl') after importing it from the second ('test.xsl'), it fails
with the error messages:
> 
xmlXPathCompOpEval: function testfunc not found
Error xpath.c:9306: Unregistered function
xmlXPathCompiledEval: evaluation failed
runtime error: file test2.xsl element value-of
xsltValueOf: text copy failed

Thanks
Graham

----------------------------------------------------------------
<?xml version="1.0"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version="1.0"
xmlns:ocfunc="http://opencollector.org/functions"
> 
<xsl:import href="test.xsl"/> 

<xsl:template match="/"> 
 <xsl:value-of select="ocfunc:testfunc()"/> 
</xsl:template> 

</xsl:stylesheet> 
-------------------------------------------------------------------------
<?xml version="1.0"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version="1.0"
xmlns:func="http://exslt.org/functions"
xmlns:ocfunc="http://opencollector.org/functions"
extension-element-prefixes="func"
> 

<func:function name="ocfunc:testfunc"> 
  <func:result select="99"/> 
</func:function> 

<xsl:template match="/"> 
 <xsl:value-of select="ocfunc:testfunc()"/> 
</xsl:template> 

</xsl:stylesheet> 
---------------------------------------------------------------------------

_______________________________________________
exslt mailing list
list@[...].org
http://www.exslt.org/list
Thread:
Graham Seaman
Jeni Tennison

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