[OpenAjaxIDE] Proposed escaping strategy for the 'name' attribute on <property>

Jon Ferraiolo jferrai at us.ibm.com
Tue Jul 21 14:46:43 PDT 2009



At today's phone call, we resolved that we needed to figure out an escaping
strategy for the 'name' attribute on the <property> element. I wrote up a
proposal and put it into the spec in the section that documents the 'name'
attribute on the <property> element. (Along with red-colored comments about
that change).

My proposal is that the 'name' attribute supports JavaScript string
escaping. Therefore,

* name="\n"     ==>     a name that consists of a single character (the
newline character).
* name="\x20"     ==>     a name that consists of a single character (the
space character).

Here is what the spec says now:
(http://www.openajax.org/member/wiki/OpenAjax_Metadata_1.0_Specification_Properties#property_element_name_attribute)
-------------------
'name' attribute


The name attribute specifies the name for this property. Each different
property name MUST be unique within the scope of its parent.


The value of the name attribute may include JavaScript string escape
sequence, such as \n (newline character) or \x20 (hexadecimal
representation of a space character). As a result, name="abc\ndef"
represents a 7-character name where the fourth character is a newline
character.


The special value of "*" (as in name="*") indicates a property whose name
is variable.


For the rare case where a property's static name is in fact the single
character "*" (e.g., myobject['*']), then the name attribute SHOULD
represent the property name using a JavaScript escape sequence, such as
name="\*". Developer tools MUST check for the special value "*" before
unescaping the value of the name attribute.


2009-07-21 Jon: Per today's phone call, added name="*" and comments about
JavaScript escaping. Note: should we add similar notes about escaping
elsewhere in the spec, such as 'name' attribute on <parameter> and other
elements?
-------------------

What do people think of this approach? Do we need to support escaping
elsewhere in the spec? My current thinking is no.

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/ide/attachments/20090721/ac1709fd/attachment.html 


More information about the IDE mailing list