SOX: element<->class mapping

james anderson James.Anderson at mecomnet.de
Fri Oct 2 14:07:47 BST 1998


Peter Murray-Rust wrote:
> 
> ...
> 
> Some people have suggested mappings are very difficult. I'm more optimistic!
> >
> >In a CLOS environment, this depends only on a mechanism which identifies lisp
> >packages with xml namespaces. For java, by analogy, a mechanism which
> >identified java packages with xml namespaces would suffice.

The point is, that the mapping between serial encoding and application data is
best separated into two stages: encoding and application modeling.

The first is very simple. A minimum of element method specialization is
necessary in order to encode / decode application data and type specialization
is useful as for method dispatching in the second phase. For this purpose it
suffices to declare a relation between java packages and xml namespaces and to
use introspection to map from element name to class. One would have standard
java packages appropriate for and associated with standard elements.

The second (items 3 - 5 in the original note) is more complex. It is also, in
my experience, not to be managed by simply identifying the correct class to
use to decode the stream. The storage issue (5 and your response) is one
example. Another is the issue of (re)integrating xml-encoded data into a data
store. Decoding the data is just the first step. The decoded instance is then
subject to more complex processing - to check its consistency (validation does
not suffice), to translate it into internal form, to bind nominal links to
instance data, etc.

The first stage should not be burdened with the more complex mechanisms which
this second stage requires. It should be kept as simple (and standardizable as
possible). If that is accomplished, then the interface between the application
and the parser can be set between the two phases.


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list