[DGD] XML

Noah Gibbs angelbob at monkeyspeak.com
Tue Feb 18 10:43:14 CET 2003


On Mon, 17 Feb 2003 kevinc at seaplace.org wrote:
> Has anybody built a XML parser and/or DTD validator for DGD?

  While I haven't built anything specifically in XML, you might look at
Phantasmal's implementation of UNQ for a base parser.  It's a vaguely
similar format and uses similar DTDs for complex parsing.  The primary
difference other than the delimiter characters is that UNQ only allows
tags with contents, not tags with labels and contents.  For instance, XML
lets you have <tag label="bobo" label2="fred">contents</tag>.  UNQ only
lets you have ~tag{contents}.

> Does such a request even make sense?  I'm thinking along the lines of
> being able to pass DTD/XML documents to a DGD object and have that object
> being able to respond to queries about the XML document.

  Yup.  That makes quite a lot of sense.  You'll find that a Phantasmal
DTD is a little similar, and that a Phantasmal object of type
"UNQable" does something quite similar.  I usually use it for things at
file granularity rather than object granularity, but that's just because
of my implementations, not the parent class.

> It gets more complicated when I start thinking about multi DGD instances
> communicating between themselves via XML, but one thing at a time.

  Not much more complicated, actually.  Phantasmal can read and write UNQ
files, so you can easily serialize an object, pass it around over the
network and deserialize it on the other side as long as both objects are
UNQable.  XML, obviously, would work very similarly.

  The other problem you'll have is that unmodified DGD won't make outgoing
network connections.  You could use the network module and break that
level of security, or you could write a little external program to make in
inbound connection to both servers and, once it was established, pass data
back and forth.  That would require some external non-DGD configuration
for the script, but it would provide significantly more network security
since DGD would remain unable to make outgoing connections.

-- 
angelbob at monkeyspeak.com
See my page of DGD documentation at
"http://phantasmal.sourceforge.net/DGD/"
If you post to the DGD list, you may see yourself there!


_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list