GNOME Bugzilla – Bug 325777
Imported exslt:func function not found if importing stylesheet uses func extension, too
Last modified: 2006-08-10 12:30:33 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:
Created attachment 56782 [details] testcase If you remove extension-element-prefixes="func" from bug.xsl everything works as expected.
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/>