[XML-SIG] Metadata in XBEL

Ken MacLeod ken@bitsko.slc.ut.us
30 Mar 2001 09:28:55 -0600


Lars Marius Garshol <larsga@garshol.priv.no> writes:

> * Fred L. Drake, Jr.
> | 
> | Having joined the ranks of DOM implementors myself, I can only wish
> | I missed it.  ;-(
> 
> So do I. In fact, if you're writing a DOM implementation I suggest
> that you stop and that we design an API more suitable to whatever it
> is we want to do. Python really could use a better tree XML API than
> the DOM. Pyxie looks good, but it needs work. JDOM also looks good.

I have one such API implemented in Orchard.  The API is described in
[1], and the Python implementation available from [2].  I also have a
C implementation there as well, but the C <-> Python bridge is not
available yet.

I've briefly mentioned Orchard here a couple of times, but not in the
context of its DOM or SAX APIs, because I'd presumed, apparently
incorrectly, that there'd be little interest in less Java-ish APIs
when Python has very solid SAX and DOM bindings with several
implementations.

Orchard implements the "node based" SAX we've discussed here before,
where the nodes used in SAX are the same nodes used to build a tree.
Implementing a pull-parser with nodes is a minor addition, but hasn't
been specced yet.

Orchard has a "grove-like" feel to it (intentionally) and allows for
compatible subsets (like Common XML) or supersets (like Jonathan
Borden's XSet or parsed-syntax information).

Orchard's XML node semantics are intended to be compatible with DOM,
such that bi-directional wrappers are both possible and shouldn't be
too difficult.  For example, I would like to use the W3C DOM Test
Suite, via a wrapper, to certify the Orchard tree implementation.
Orchard's SAX-like interface has been lightly tested against
Java-style SAX parsers using SAX<->Orchard filters, and is also
intended to be fully compatible.

Orchard grew out of the need to implement this style of SAX and DOM
for Perl's bindings.  Over the last couple of years my writing has
been split fairly evenly between Perl and Python and I wanted to be
able to use this style of API in my Python applications as well.  I
figured even if it were just for myself, I'd be happy ;-)

Let me know what you think,

  -- Ken

[1] <http://casbah.org/~kmacleod/orchard/xml.html>
[2] <http://casbah.org/~kmacleod/orchard/>