After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 325777 - Imported exslt:func function not found if importing stylesheet uses func extension, too
Imported exslt:func function not found if importing stylesheet uses func exte...
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.15
Other All
: Normal minor
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-04 17:23 UTC by Nick Wellnhofer
Modified: 2006-08-10 12:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (435 bytes, application/x-gzip)
2006-01-04 17:25 UTC, Nick Wellnhofer
Details

Description Nick Wellnhofer 2006-01-04 17:23:00 UTC
Please describe the problem:
If a stylesheet that uses the exslt:func extension imports another stylesheet,
exslt:func functions in the imported stylesheet aren't found.


Steps to reproduce:
1. Download testcase.tar.gz
2. run xsltproc bug.xsl dummy.xml


Actual results:
xmlXPathCompOpEval: function test not found
XPath error : Unregistered function
xmlXPathCompiledEval: evaluation failed
runtime error: file import.xsl line 19 element value-of
xsltValueOf: text copy failed
no result for dummy.xml


Expected results:
<?xml version="1.0"?>
1


Does this happen every time?
yes

Other information:
Comment 1 Nick Wellnhofer 2006-01-04 17:25:48 UTC
Created attachment 56782 [details]
testcase

If you remove extension-element-prefixes="func" from bug.xsl everything works as expected.
Comment 2 kbuchcik 2006-08-10 12:30:33 UTC
I don't know when this was fixed, but your scenario gives me now
the following correct result:

>xsltproc bug325777.xsl bug325777.xml
<?xml version="1.0"?>
1

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

  <xsl:import href="bug325777-imp.xsl"/>
</xsl:stylesheet>

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

  <func:function name="func:test">
    <func:result select="1"/>
  </func:function>

  <xsl:template match="/">
    <xsl:value-of select="func:test()"/>
  </xsl:template>

</xsl:stylesheet>

bug325777.xml
-------------
<?xml version="1.0"?>
<dummy/>