Ponder2 Internal XML

PonderTalk is compiled to an intermediate XML. At run-time the XML is interpreted. The XML is taken as a series of XML elements, each one returning a Ponder2 managed object (P2Object). The XML elements comprise one of:

XML

Tag Description

ponder2

Dummy element used to enclose many elements into one to meet the XML document standard. Returns the result of the last element

assign

Used to assign an object to a variable. Returns the object assigned

send

Send one or more messages to a managed object. Returns the result of the last message sent

use

Uses a variable or resolves a path name. Returns the variable value or the object located

string

Returns an object containing a string value

boolean

Returns an object containing a Boolean value

number

Returns an object containing a numeric value. Java BigDecimal is used here to give accurate, arbitrary precision values

block

Returns an object containing a block of XML code for later execution

array

Returns an object representing an array of objects

oid

Returns an object located by its unique identifier and address. If the object is remote then a local External Managed Object is returned as a proxy

Table of possible XML elements

Send

The XML send structure essentially identifies a managed object and sends one or more messages to it. The result is the return values of the last message.

<send>
 <object/>
 <message name=“message_name” …>
   <argument/><argument/>…
   </message>
 <message …> …
 </message> …
</send>

Where <object/> is one of the XML elements in the above table. Since everything returns an object in PonderTalk, the result of <send> is an object, thus allowing a <send> element to be used in place of <object/>. This gives a very simple yet very powerful XML structure that is general enough for all the decoding work to be done before handing the message to the Java managed object.

Block

OID

Array

Use

Assign

Ponder2InternalXML (last edited 2008-02-06 13:22:06 by KevinTwidle)