[e-lang] [RFP] cross-language object serialization (E <--->
Squeak-E)
Tyler Close
tyler at waterken.com
Tue Jan 21 15:10:26 UTC 2003
On Tuesday 21 January 2003 10:40, Robert Withers wrote:
> Could you post an example Doc tree and a XML-text mode encoding and
> doc-code encoding of the following 3 scenarios, please? It would be
> useful to see what we will be dealing with.
Download the Doc, ADT and Enc distributions from:
http://waterken.com/download/
To convert from XML to doc-code:
java -cp safe/doc.jar com.waterken.doc.code.FromXML <filename>
To convert from doc-code to XML:
java -cp safe/doc.jar com.waterken.doc.code.ToXML <filename>
> 1) an association with key: 'the answer is' and value: 42
Do you mean a map collection like: [ "the answer is" => 42 ]
> 2) an instance of class Foobar (inst vars: question, answer) with
> question := 'the answer is' and value := 42.
<doc schema="file:///Foobar">
<question>the answer is</question>
<answer>42</answer>
</doc>
This assumes that the schema for <file:///Foobar> is:
<doc schema="file://waterken.com/doc/schema/Schema>
<annotation schema="file://waterken.com/doc/schema/Comment"/>
<unordered>true</unordered>
<children>
<key_schema>file://waterken.com/adt/string/String</key_schema>
<value_schema>file://waterken.com/doc/schema/Branch</value_schema>
<element>
<key>question</key>
<value>
<annotation schema="file://waterken.com/doc/schema/Comment" />
<implicit>file://waterken.com/adt/string/String</implicit>
<arity schema="file://waterken.com/doc/schema/Once" />
The question.
</value>
</element>
<element>
<key>answer</key>
<value>
<annotation schema="file://waterken.com/doc/schema/Comment" />
<implicit>file://waterken.com/Integer</implicit>
<arity schema="file://waterken.com/doc/schema/Once" />
The answer.
</value>
</element>
</children>
A property of the universe.
</doc>
> 3) a OrderedCollection of instances of Foobar
<doc schema="file://waterken.com/adt/linear/Queue">
<element>
<value schema="file:///Foobar">
<question>the answer is</question>
<answer>42</answer>
</value>
</element>
<element>
<value schema="file:///Foobar">
<question>or maybe it is</question>
<answer>24</answer>
</value>
</element>
</doc>
Tyler
More information about the Squeak-dev
mailing list
|