[xml-bindings]Let's start
- From: Daniel Veillard <veillard redhat com>
- To: xml-bindings gnome org
- Subject: [xml-bindings]Let's start
- Date: Wed, 6 Feb 2002 08:40:56 -0500
Okay, seems the people who expressed interest in this list joined,
so let's start working on the open issues. Here are a few points:
- tools: since the API is frozing, I can now express a reliable
API description, I have put it (them there is one for libxslt)
in the doc subdir as an XML file, it includes all exported entry
points and API symbols and the associated comments, this should
help generating reliable and complete bindings. One thing missing
currently is the ENUMs values.
- the error API, currently registered functions are expected
to handle varargs starting with a format string. The libxml
module actually preformats the string passed to the handler
but passes it as handler(data, "%s", formatted_string)
Calling directly handler(data, formatted_string) is not possible
in the current state of the API because it opens the door wide
to malicious attacks if the error context contains for example
"%s". One way is to change error callbacks to simple
strings, but it's an API breakage or we add a function to
toggle the expected behaviour, the second is an API addition
and sounds quite better.
- classes and naming issues. Most of the binding languages provide
the abstraction of classes. In those it would be good to have
similar class names and hierarchy, and also do the remapping
of names and attributes in a similar way. For examples in the
current python bindings I have the following hierarchy:
xmlCore
xmlNode
xmlDoc
xmlEntity
xmlNs
xmlAttr
xmlAttribute
xmlDtd
xmlElement
parserCtxt
xpathContext
I have tried to remove some of the defficiencies of the C type system
using xmlCore to provide an unified navigation definition and
xmlNode for most tree APIs, then specific classes for really specific
operations.
This is completely exposed in python/libxml2class.txt
there is probably a number of points I did not try try to fix, and also
I tried to avoid mapping some types to non-natives ones, like for example
the xmlXPathObjects shows up as native python types.
I don't know how realistic it is to really try to unify bindings, but
I'm open to suggestions, and I think there is a lot of work which can be
shared, at least between sub-groups of bindings.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]