[Accessforall] Minutes of Context .. preference set repn

Andy Heath andyheath at axelrod.plus.com
Thu Jul 26 07:02:29 UTC 2012


With respect to preference set representation :

> Sample preference set:
>
> {
>
>    "property":"http://gpii.net/ns/up/fontsize",
>
>    "condition": "",
>
>    "value":"120%"
>
> }
>
> {
>
>    "property":"http://gpii.net/ns/up/fontsize",
>
>    "condition": "value('http://example.com/context/localtime')>=  '18:00'
>
>      && value('http://example.com/context/localtime')<  '22:00'",
>
>    "value":"150%"
>
> }

Is this just the "human" view ? What's the perspective in cloud4all 
about the best way to represent this data ?

I appreciate this might suit xslt processing and mapping to databases 
and is easy to introduce extra fields into but its a little wasteful - 
in some cases messages will be twice the length needed.
For passing between systems and system parts why not scrap the field 
names and do something like this:

Instead of:

[
{"property": "a", "condition": "b", "value": "c"},
{"property": "d", "condition": "e","value": "f"}
]

it could be:
[
   {"a": {"b" : "c"} },
   {"d": {"e" : "f"} }
]

or even

[
{"fieldnames": {"property": {"condition": "value" }}},
{"records" : [ {"a": {"b" : "c"} },
                {"d": {"e" : "f"} } ] }
]

?

Cheers

andy
-- 
__________________
Andy Heath
http://axelafa.com



More information about the Accessforall mailing list