- From: Serge LE HUITOUZE <slehuitouze@telisma.com>
- Date: Fri, 2 Nov 2007 16:03:09 +0100
- To: <www-voice@w3.org>
Hello voice, I have a question regarding an obscure (to me) sentence related to EMMA serialization. At section 7.2, it is written: * The value of "_value" is treated as character data content of the containing object * or the value of an attribute if the containing object is a child of _attributes. Since there is an "or" in this pretty long sentence, I will decompose it into two, yielding: * The value of "_value" is treated as character data content of the containing object if the * containing object is not a child of "_attributes". * The value of "_value" is treated as the value of an attribute if the containing object is * a child of "_attributes". The first half is pretty straightforward. E.g. this leads to the following ECMA object: * {x:{_value:"A B C"}} being EMMA-serialized as: * <x>A B C</x> But I have trouble with the second half. Consider the following ECMA object: * {x:{_attributes:{at1:{_value:"A B C"}}}} The "_value" field is contained in an object (which has property "at1") which is itself a child of "_attributes". Hence, according to the standard, this value field is supposed to be the value of the attribute itself (here the object that has property "at1"). Hence, its EMMA-serialization should be: * <x at1="A B C"></x> Am I right, or did I screw up somewhere? But then, if I am right, why bother with the superfluous "_value" stage, since the following, much simpler, ECMA object would give the exact same EMMA-serialization?: * {x:{_attributes:{at1:"A B C"}}} One may argue that the object under "_attributes" may be arbitrarily complex, having many other useless (in this particular usage) attributes, as for example: * {x:{_attributes:{at1:{_value:"A B C", some_attrib:XXX}}}} But it would then be straightforward to extract just the sub-object rooted at "_value" in the SISR tag that assigns "at1", rather than resorting to a somewhat strange (sub-)rule of the standard... Can someone enlighten me? In any case, I think that more examples are needed in chapter 7 to better illustrate how EMMA-serialization works. Regards. --Serge Le Huitouze No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.18/1104 - Release Date: 01/11/2007 18:47
Received on Friday, 2 November 2007 15:03:22 UTC