[OpenAjaxIDE] Macro substitution details
jferrai at us.ibm.com
Fri Aug 15 11:12:13 PDT 2008
As we have been implementing the spec, it became clear that there are some
abiguities about the exact rules for when macro substitution takes place.
Here is what the spec says now:
2008-04-24: Tentatively approved. We have agreed to supporting macro
expansion per Lori's proposal, where macro expansion looks for every
property "p" and replaces all occurrences in the content of @@p@@ with the
2008-04-29: Tentatively approved. We decided that we would support macro
expansion from both the property bag and from the localization files, but
that we would use different syntax for the two in order to prevent
collisions. Use @@foo@@ for property expansion and %%bar%% for localization
2008-06-24: We accepted the Gadgets TF recommendation the following: "A
processing engine MUST apply localization transformation to <content>,
<author>. The <include> element references an external file whose content
is to be transcluded into the current document; therefore included content
MUST also be processed following the same localization transformations."
Also our new elements <aboutMe> and <quote>
2008-08-12: Tentatively approved Variable substitution also applies to
preload, postload and inline require.
2008-08-12: Jon needs to make a proposal for how to indicate that a
variable such as @@foo@@ requires HTML encoding or JS quote escaping.
Editor: need to make sure there are appropriate warnings about XSS in
property values and other user-entered strings.
Editor: need to include text about __WID__ macro expansion, where __WID__
example, "__WID__" might become "wid004682988", where the numeric part is a
The above notes are fairly clear about what elements are subject to
localization transformations, but there isn't a definitive list of which
elements are subject to property substitution and which elements support
macro expansion of __WID__ with the widget's object name.
Here is a proposal for how to clarify the abiguities (the proposal comes
mainly from Javier):
<preload> (always inline):
<postload> (always inline)
<include> (i.e., after the inclusion, then process the included
Property substitutions and __WID__ substitution:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IDE