1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-03 00:42:24 +03:00

change the Licence to MIT Licence and release of 1.0.11 updates of the

* Copyright Makefile.am configure.in libxslt.spec.in: change the
  Licence to MIT Licence and release of 1.0.11
* doc/FAQ.html doc/intro.html doc/libxslt-decl.txt doc/news.html
  doc/xslt.html: updates of the docs accordingly
* libxslt/xsltwin32config.h: numbering
* python/generator.py python/libxml_wrap.h python/libxsltclass.txt
  python/libxslt-python-api.xml: cleanup the dependancies with
  libxml2
* python/tests/extfunc.py: updated examples.
Daniel
This commit is contained in:
Daniel Veillard
2002-02-08 16:09:27 +00:00
parent 3146d5356f
commit ada89dddea
18 changed files with 128 additions and 614 deletions

View File

@ -214,9 +214,9 @@ py_types = {
'xmlChar': ('c', None, "int", "int", "libxml_"),
'unsigned char *': ('z', None, "charPtr", "char *", "libxml_"),
'char *': ('z', None, "charPtr", "char *", "libxml_"),
'const char *': ('z', None, "charPtr", "char *", "libxml_"),
'const char *': ('z', None, "charPtrConst", "const char *", "libxml_"),
'xmlChar *': ('z', None, "xmlCharPtr", "xmlChar *", "libxml_"),
'const xmlChar *': ('z', None, "xmlCharPtr", "xmlChar *", "libxml_"),
'const xmlChar *': ('z', None, "xmlCharPtrConst", "const xmlChar *", "libxml_"),
'xmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr", "libxml_"),
'const xmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr", "libxml_"),
'xmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr", "libxml_"),

View File

@ -64,6 +64,8 @@ PyObject * libxml_xmlCharPtrWrap(xmlChar *str);
PyObject * libxml_constxmlCharPtrWrap(const xmlChar *str);
PyObject * libxml_charPtrWrap(char *str);
PyObject * libxml_constcharPtrWrap(const char *str);
PyObject * libxml_charPtrConstWrap(const char *str);
PyObject * libxml_xmlCharPtrConstWrap(const xmlChar *str);
PyObject * libxml_xmlDocPtrWrap(xmlDocPtr doc);
PyObject * libxml_xmlNodePtrWrap(xmlNodePtr node);
PyObject * libxml_xmlAttrPtrWrap(xmlAttrPtr attr);

View File

@ -23,46 +23,19 @@
<info>Cleanup all libxslt and libxml2 memory allocated</info>
<return type='void'/>
</function>
<!-- xmlXPathParserContextPtr accessors -->
<function name='xsltXPathParserGetContext' file='python_accessor'>
<info>Get the xpathContext from an xpathParserContext</info>
<return type='xmlXPathContextPtr' info="The XPath context" field="context"/>
<arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath parser context'/>
</function>
<function name='xsltXPathGetContextDoc' file='python_accessor'>
<info>Get the doc from an xpathContext</info>
<return type='xmlDocPtr' info="The doc context" field="doc"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xsltXPathGetContextNode' file='python_accessor'>
<info>Get the current node from an xpathContext</info>
<return type='xmlNodePtr' info="The node context" field="node"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xsltXPathGetContextPosition' file='python_accessor'>
<info>Get the current node from an xpathContext</info>
<return type='int' info="The node context" field="proximityPosition"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xsltXPathGetContextSize' file='python_accessor'>
<info>Get the current node from an xpathContext</info>
<return type='int' info="The node context" field="contextSize"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xsltXPathGetFunction' file='python_accessor'>
<info>Get the current function name xpathContext</info>
<return type='const xmlChar *' info="The function name" field="function"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xsltXPathGetFunctionURI' file='python_accessor'>
<info>Get the current function name URI xpathContext</info>
<return type='const xmlChar *' info="The function name URI" field="functionURI"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<!-- xmlXPathContextPtr accessors -->
<function name='xsltXPathGetTransformContext' file='python_accessor'>
<info>Get the transformation context from an xpathContext</info>
<return type='xsltTransformContextPtr' info="The node context" field="extra"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<!-- xsltTransformContextPtr accessors -->
<function name='xsltTransformGetStyle' file='python_accessor'>
<info>Get the stylesheet from a transformation</info>
<return type='xsltStylesheetPtr' info="The stylesheet" field="style"/>
@ -119,6 +92,7 @@
<arg name='ctxt' type='xsltTransformContextPtr' info='the transformation context'/>
<arg name='_private' type='pythonObject *' info='The private field'/>
</function>
<!-- xsltStylesheetPtr accessors -->
<function name='xsltStylesheetGetParent' file='python_accessor'>
<info>Get the parent of a stylesheet</info>
<return type='xsltStylesheetPtr' info="The parent" field="parent"/>
@ -180,21 +154,5 @@
<arg name='style' type='xsltStylesheetPtr' info='the stylesheet'/>
<arg name='_private' type='pythonObject *' info='The private field'/>
</function>
<!--
<function name='xsltRegisterXPathFunction' file='python'>
<info>Register a Python written function to the XPath interpreter</info>
<return type='int' info="1 in case of success, 0 or -1 in case of error"/>
<arg name='ctx' type='xmlXPathContextPtr' info='the xpathContext'/>
<arg name='name' type='xmlChar *' info='the function name'/>
<arg name='ns_uri' type='xmlChar *' info='the namespace or NULL'/>
<arg name='f' type='pythonObject' info='the python function'/>
</function>
<function name='xsltRegisterErrorHandler' file='python'>
<info>Register a Python written function to for error reporting. The function is called back as f(ctx, error).</info>
<return type='int' info="1 in case of success, 0 or -1 in case of error"/>
<arg name='f' type='pythonObject' info='the python function'/>
<arg name='ctx' type='pythonObject' info='a context for the callback'/>
</function>
-->
</symbols>
</api>

View File

@ -65,12 +65,6 @@ Class xpathParserContext(libxml2.xpathParserContext)
Class xpathContext(libxml2.xpathContext)
# accessors
contextDoc()
contextNode()
contextPosition()
contextSize()
function()
functionURI()
transformContext()
# functions from module functions

View File

@ -1,5 +1,6 @@
#!/usr/bin/python -u
import sys
import string
import libxml2
import libxslt
@ -22,7 +23,6 @@ def f(ctx, str):
except:
pass
import string
return string.upper(str)
libxslt.registerExtModuleFunction("foo", "http://example.com/foo", f)
@ -54,6 +54,7 @@ if root.content != "SUCCESS":
sys.exit(1)
if nodeName != 'article':
print "The function callback failed to access its context"
sys.exit(1)
result.freeDoc()