[XML-SIG] WDDX for Python

Paul Prescod paul@prescod.net
Tue, 15 Dec 1998 16:02:56 -0600


Simeon, I am looking into the development of the Python binding for WDDX
as I said I might a few weeks ago. I'm cc:ing the Python xml-sig because
they might be interested.

I'm not entirely happy with the logical level of WDDX. My problem is I
can't easily understand when I would use WDDX.

Information passing situations seem to fall under two wide categories.
Either we have a negotiated format (i.e. packet template) or we do not. 

If we DO, then why do we want to tag things <STRING>...</STRING>,
<NUMBER>...</NUMBER> etc. Can't we infer the types of things from our
pre-negotiated template?

If we DO NOT, then wouldn't it be useful to be able to linearize objects
of *named types* instead of only primitive types? i.e. 

<OBJECT TYPE="Traceback">
  <VAR ...>
  <VAR ...>
  <VAR ...>
  <VAR ...>
</OBJECT>

Using the TYPE attribute, we could look up the constuctor for the
appropriate type and invoke it. The problem is that Python programmers
seldom work with data structures made of primitive and compound types.
Rather they work with structures of objects. If you can't encode and
decode those easily then you haven't made the job of encoding data
structures much easier.

We could encode objects as structs, but then their type gets lost so that
they cannot be rebuilt "on the other end."

Maybe you could help me to understand a typical usage situation.

 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

"Sports utility vehicles are gated communities on wheels" - Anon