BGB Extension 1: Scheme Like Typesystem
I will define the namespace 'http://bgb-sys.sourceforge.net/bgb-ext/types':
This adds a types:
char (integer character literal);
symbol (symbolic string, eg, 'name');
list (a closer match of a scheme list);
vector (a variation of array);
link (a url pointing to some resource);
literal (a literal value, identified by an implementation
dependent string).
The intent is not for a standardized typesystem, or to assume these types
are relevant to all possible recipients (though, of course, some repository
for common extensions may be helpful to reduce unneded redevelopment of various
features).
char is represented as a integer literal (decimal).
symbol is similar to a string.
List
list is similar to the encoding of array and vector, extept that it may have
an additional "terminal" key (indicating that some object is used as the
list terminal).
Link
link is a url referring to some object.
it may also have a "node" attribute indicating some additional part of the
resource not directly encoded in the url.
Literal
null, #z in my implementation, maybe something else in others.
eol, ()
Examples
carriage return
<value xmlns="http://bgb-sys.sourceforge.net/bgb-ext/types">
<char>13</char>
</value>
#\x13
<value xmlns="http://bgb-sys.sourceforge.net/bgb-ext/types">
<symbol>foobar</symbol>
</value>
foobar
<value xmlns="http://bgb-sys.sourceforge.net/bgb-ext/types">
<list>
<data>
<value><i4>16</i4></value>
<value><string>Hello</string></value>
</data>
<terminal>
<value><string>Foo</string></value>
</terminal>
</list>
</value>
(16 "Hello" . "Foo")
<value xmlns="http://bgb-sys.sourceforge.net/bgb-ext/types">
<vector>
<data>
<value><i4>16</i4></value>
<value><string>Hello</string></value>
</data>
</vector>
</value>
#(16 "Hello")
<value xmlns="http://bgb-sys.sourceforge.net/bgb-ext/types">
<link>http://www.xmlrpc.com/</link>
</value>
would internally likely be interpreted as an object reference or port.
<value xmlns="http://bgb-sys.sourceforge.net/bgb-ext/types">
<literal>null</literal>
</value>
#z