The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Key uniqueness within a messageblock


  • Subject: Re: Key uniqueness within a messageblock
  • From: JamesTraynor
  • Date: Fri, 06 Jun 2003 00:48:00 +0000

...there is clearly a good reason for these (cf xAPnews)


For the record I like unique. I would really like it if xAP Spec said
that all message block names were unique and all names within a block
were also unique. By unique I mean the first bit can be the same i.e.
"news.story" but just add a ".1" for the next repeat.
My main reason
for this is this type of scenario:
If I want to get a value out of a xAP message I can define it as,
Source:Class:Section:Item
that line gives/identifies a specific value really easily, esp as
embedded devices tend to be really slow at text crunching. If
sections and items can repeat it add a massive amount of processing
for no real gain. In Palm Remote the simple S:C:S:I format works
really well for playing with xAP data for display but multiple
identical sections/items would kill that system, pity as it does work
really well. Hang on, S:C:S:I format hmmm nice ring to that!!

xAP news does now use non-unique message blocks but I don't really
like it and will probably change it before final. The more I think
about repeating sections/items it does seem like a bad idea, but if
the spec says it then that it is....

Is there any chance of tweaking the spec?

James

--- In <a
href="/group/xAP_developer/post?postID=gGjgC73Ym9mLncYgnInNSJbhpzm6hYPN2mPr9W14zzhCI8HiOySFdiPNPnhrp-DYT2_9JTGQVK1jFA0T4GJPSUQ84s_Jmh4">xAP_developer@xxxxxxx</a>,
"mark_harrison_uk2" <mph@a...>
wrote:
> From the spec:
>
> "The order of name-value pairs within a message section has no
> significance. The same name may be used more than once in the same
> section if required, although by convention, multiple entities are
> usually differentiated through the use of an index element (e.g.
> my.thing.0 ; my.thing.1)."
>
> Is anyone actually using messageblocks with multiple identical
> keyword (names?)
>
> If not, can anyone think of a case where you'd WANT to?
>
> If not (to both the questions above), can I move that NAMEs have to
> be unique within a given messageblock?
>
> If they AREN'T unique, then we are introducing non-determinism into
> the "get value by name" semantics...
>
> ... and using Collections as a way of handling them programatically
> runs the risk of erroring when parsing a message with non-unique
> keywords.
>
>
> Note that this is NOT about whether multiple, identically named,
> messageblocks can exist - there is clearly a good reason for these
> (cf xAPnews)
>
> Regards,
>
> Mark






xAP_Development Main Index | xAP_Development Thread Index | xAP_Development Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.