Subject: [mmox] LLIDL question

From: "Hurliman, John" <[email-masked]>
Date: Fri, 13 Feb 2009 20:06:11 -0700

What is the meaning of this example line in LLIDL?

{ $: 42 }

I don't see the dollar sign explained anywhere in the draft.

John

---

From: Mark Lentczner <[email-masked]>
Date: Tue, 17 Feb 2009 14:21:01 -0800

> What is the meaning of this example line in LLIDL?

Indeed, the "dictionary" form of maps didn't get explained.  There are  
two productions for map in LLIDL:
    map             =  "{" s member-list s "}"
    map             =/ "{" s "$" s ":" s value s "}"
The second describes the expectation that the value is map of  
arbitrary keys, each of which has the same format.  For example:

   { $: uri }  ;a map of resource names to uris
   { $: { x: real, y: real }} ;a map of signage to x,y locations

The first example is used when returning a list of requested  
capabilities, where the names are the resource names.

You have to be careful when using this form, since keys in maps are  
consider distinct based on code point sequence, but strings, including  
map keys, can be normalized en-route.  Things like resource names are  
fine, since they are invariant under the allowed normalization. So,  
for example, If you expect the data set to have things like:
	"Two\r\nLines\r\nPub"
or	"Magasin de Thé"
in it, then the second example above wouldn't be appropriate.  Instead  
use:

   [ { name: string, location: { x: real, y: real} }, ... ]

Now, this construction would be odd:

   { $: 42 }

It means the expected value is a map where every value had to be the  
number 42.  I suppose this could describe a map of Ultimate Questions  
and their Answers!

	- Mark

Mark Lentczner
Sr. Systems Architect
Technology Integration
Linden Lab

[email-masked]

Zero Linden
[email-masked]