GNOME Bugzilla – Bug 101602
xsltRegisterExtModule: initFunc not getting called
Last modified: 2009-08-15 18:40:50 UTC
xsltRegisterExtModule is supposed to register an initFunc initialization function for extension modules, which will be called at the beginning of an XSLT transformation. However, that initFunc is never invoked. Test program showing the bug is at: http://mail.gnome.org/archives/xslt/2002-December/msg00038.html and further description of the bug can be found in its thread.
Okay I fixed it in CVS. After modifying the program to send debug informations and show the close callback too the traces and output looks good now: paphio:~/XSLT -> ./tst tst.xsl tst.xml xsltParseStylesheetFile : parse tst.xsl Added namespace: xsl mapped to http://www.w3.org/1999/XSL/Transform Added namespace: TEST mapped to http://www.example.com/test xsltPrecomputeStylesheet: removing ignorable blank node xsltParseStylesheetProcess : found stylesheet add extension prefix TEST Registering extension prefix TEST : http://www.example.com/test Registering style module: http://www.example.com/test template has 1 inherited namespaces xsltCompilePattern : parsing '/' xsltCompilePattern : parsed /, default priority 0.500000 added pattern : '/' priority 0.500000 parsed 1 templates Resolving attribute sets references Initializing keys on tst.xml DEBUG: yippee! module_init called ************ xsltInitCtxtExt: no extData Registered module http://www.example.com/test Registered 1 modules Registering global variables Registering global variables from tst.xsl xsltProcessOneNode: applying template '/' for / xsltApplyOneTemplate: copy node html xsltApplyOneTemplate: copy node head xsltApplyOneTemplate: copy node title xsltApplyOneTemplate: copy text Test xsltCopyText: copy text Test xsltApplyOneTemplate: copy node body xsltApplyOneTemplate: copy node h1 xsltValueOf: select TEST:hello() Lookup function {http://www.example.com/test}hello found function hello xsltCopyTextString: copy text Hello world xsltValueOf: result Hello world xsltApplyTemplates: list of 1 nodes xsltProcessOneNode: no template found for doc Shutting down module : http://www.example.com/test DEBUG: yippee! module_term called ************ <?xml version="1.0"?> <html xmlns:TEST="http://www.example.com/test"> <head> <title>Test</title> </head> <body> <h1>Hello world</h1> </body> </html> paphio:~/XSLT -> thanks for the report and the code ! Daniel
That should be closed with release libxslt-1.0.24, thanks, Daniel