Re: [mmox] XML serialization

Mark Lentczner <> Mon, 23 February 2009 22:54 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id DCFE03A6ADC for <>; Mon, 23 Feb 2009 14:54:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.51
X-Spam-Status: No, score=-3.51 tagged_above=-999 required=5 tests=[AWL=0.089, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id azytNbFpbVHE for <>; Mon, 23 Feb 2009 14:54:33 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 100813A63D3 for <>; Mon, 23 Feb 2009 14:54:33 -0800 (PST)
Received: from ( []) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTP id 628013DBC44C for <>; Mon, 23 Feb 2009 14:54:51 -0800 (PST)
Message-Id: <>
From: Mark Lentczner <>
In-Reply-To: <>
Content-Type: text/plain; charset="US-ASCII"; format="flowed"; delsp="yes"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v930.3)
Date: Mon, 23 Feb 2009 14:54:51 -0800
References: <> <>
X-Mailer: Apple Mail (2.930.3)
Subject: Re: [mmox] XML serialization
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Massively Multi-participant Online Games and Applications <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 23 Feb 2009 22:54:33 -0000

Catherine Pfeffer wrote:
> <llsd>
>   <map>
>      <entry>
>        <key>success</key>
>        <boolean>true</boolean>
>      </entry>
>      <entry>
>        <key>something_i_like_to_eat_on_sundays</key>
>        <string>bananas</string>
>       </entry>
>   </map>
> </llsd>

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 iff it is tested in a map element.  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.

Including a type attribute also makes things difficult for schemas, as  
the content of the value element now depends on the value of one of  
it's attributes.

Including the key value as an attribute value will make this somewhat  
harder to edit in some systems where "human readable" text is  
generally much easier to handle as element content.  Keeping the key  
value as element content also keeps the processing with key values  
consistent with the processing of string values with respect to string  
handling including normalization.

The issue of wrapping each key value pair of a map in an entry element  
or just using ordered alternation is one of those infinite XML debates.

The XPath argument doesn't hold:  XPath expressions for selecting the  
value of the success entry in a map are about the same, and not all  
that difficult:

Current draft LLSD:

Catherine's LLSD:

Jon's LLSD:

True, Jon's LLSD yields a slightly smaller and cleaner XPath  
expression, the others are nothing out of the ordinary.

	- Mark

Mark Lentczner
Sr. Systems Architect
Technology Integration
Linden Lab

Zero Linden