Re: Question re: XML embedding in XML-dist protocols

On Mon, May 08, 2000 at 05:00:59PM +0100, Dave Reynolds wrote:
> One of the attractions to me in using an XML-based protocol is that it
> should be easy to exchange information already encoded in XML. For
> example, as part of a command I might like to be able to pass a block of
> metadata encoded in RDF, or a signed assertion encoded using
> XMLSignature, or an embedded web document fragment in raw XML. To be
> clear, I'm not talking about just sending such an XML packet over HTTP
> (an easy job) I'd like the packet to be one of a number of parameters to
> a service and to use some RPC mechanism to encode the other parameters.
> The protocols I've looked at so far (XML-RPC, SOAP 1.0 and 1.1) provide
> serialization algorithms for conveying standard datatypes over XML. They
> don't seem to include any hooks for including a datatype to represent an
> embedded XML node tree which I could include within the payload. Soap
> 1.1 would *allow* me to define such a thing by using the encodingStyle
> attribute but doesn't seem to have such a thing out of the box. I guess
> I'm looking for an <embedded-xml> element which would prevent the
> deserialization algorithm descending further and would expose the XML
> sub-tree to the client/server as a DOM (or DOM2, or jdom or whatever)
> node for further parsing.
> So:
> 1. Is this a reasonable sort of requirement? Am I just unusual in even
> trying to do this!

I beleive the danger lies in making object model constraints on or
assumptions about the underlying protocol. SOAP doesn't make any
assertions lie within its header and body elements so one may
encapsulate some XHTML without it tromping a prescripted document
structure. If we tried to do this over XML-RPC, we would get a parse
error because <head> isn't a primitive type.

This argument seems to favor less structured (regions in)
serialization schemes, however, I think that there may be a lot to be
gained from more structured (ie. structure that is understood by the
core protocol) serialization. In this case, you would need a marker
(like embedded-xml) to signal protocol-level parsers to treat the tree
underneath as a literal string.

> 2. Is there some capability along these lines already available or
> planned?

RDF has this capability
[] and I find it
mostly used as a fancy string. For instance, from a trivial
annotation (look down 22 lines):

       resource="" />
       r:resource="" />
      <d:creator>John Smith</d:creator>
      <a:created>Jan 1 1970</a:created>
      <d:date>Jan 2 1970</d:date>
     <tr><td><a name="compare.LOTP" href="">LOTP</a></td><td colspan="8">not reviewed yet</td></tr>


Received on Monday, 8 May 2000 14:53:30 UTC