Subject: [mmox] xxSD XML serialization

From: Catherine Pfeffer <[email-masked]>
Date: Tue, 24 Feb 2009 16:10:47 +0100

Zero wrote:
> Jon Watte wrote:
> > <map>
> > <value type="boolean" key="success>true</value>
> > <value type="string"
> > key="something_i_like_to_eat_on_sundays">bananas</value>
> > </map>
>
> This format is notably more difficult for schemas (from XMLSchema to
> RelaxNG) to support, since value now has a key attribute that is only
> valid if it is tested in a map element.

Yes. Jon should have named it "entry" and not "value", so it would have been
clear that it can appear only in a map.

Moving the data type to a "type" attribute could be generalized outside of a
map for all values. That's a separate problem that raises its own concerns,
and also has advantages, which I have discussed in my previous mail.

(Side note: both XML schema and Relax NG have provisions for
context-dependant validation, expressed in "Russian doll" style. So it would
not be that difficult. It would only be ugly from a conceptual point of
view...)

>  Second, you have left out
> the top element, which needs to be something fixed, rather than being
> map or array or value depending on the structure of the data.

Omitting <llsd> was probably just a way for Jon to get quickly to the point.

-- 
Cathy