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 101602 - xsltRegisterExtModule: initFunc not getting called
xsltRegisterExtModule: initFunc not getting called
Status: VERIFIED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2002-12-19 12:21 UTC by hoylen
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description hoylen 2002-12-19 12:21:54 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.
Comment 1 Daniel Veillard 2003-01-13 22:28:49 UTC
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
Comment 2 Daniel Veillard 2003-01-14 18:12:20 UTC
That should be closed with release libxslt-1.0.24,

   thanks,

Daniel