Re: JavaScript inside xmlroff?

Tony Graham <[email protected]> Fri, 13 Feb 2009 09:36:11 +0000
Newsgroups gmane.text.xml.xmlroff.general
Message-ID <[email protected]>
On Fri, Feb 13 2009 08:17:55 +0000, [email protected] wrote:
> -On [20090213 00:24], W. Martin Borgert ([email protected]) wrote:
>>When it comes to scripting, I would prefer Python (esp. because
>>it has excellent language bindings for libxml2, libxslt, and
>>libcairo2), but in any case using a scripting language is a
>>good, not a mad, idea!

It's currently a mad idea since there's many fundamental things that
still need to be done, e.g., headers and footers, forward page
references.

> Biased +1 for Python, although newer JavaScript implementations have more
> and more Python-like features.

I'm not plumping for JavaScript just because it's JavaScript, but
because Seed uses GObject-Introspection [1].  The script would be able
to use and extend all the GObject types for FOs, properties, and area
objects without any great effort on my/our part.

The current list of runtime bindings based on GObject-Introspection is:

 - Vala - Compiler for the GObject type system (compile time)
 - PyBank - Python bindings (runtime)
 - GTK2-Perl/Introspection - Perl bindings (runtime)
 - JGIR - Java/JVM bindings (compile time, using typelib)
 - Gjs - Javascript (spidermonkey) bindings
 - Seed - Javascript (JSCore, WebKit JS engine) bindings
 - sbank - Scheme binding for gobject-introspection 

So there is a Python binding as well: PyBank [2]

However, it doesn't use the existing language bindings for libxml2,
etc.:

   It is not intended to immediately replace the whole stack of GNOME
   Python bindings. Instead if will coexist and extend it.

Inasmuch as I'm currently talking about scripting *inside* xmlroff, that
isn't that much of a problem.

If there is more support here for Python scripting, then I'll look first
at PyBind when the time comes, and, of course, you are all welcome to
work on it yourselves at any time.

Inasmuch as there's GObject types for FoXslFormatter, FoDoc, etc., it
would be entirely possible to use GObjectIntrospection to get external
bindings for libfo, but I see that as an entirely different thing, and I
don't see the two interacting.

Regards,


Tony.

[1] http://live.gnome.org/GObjectIntrospection
[2] http://live.gnome.org/PyBank