Perform hangman variable substitution on variables with later precedence
------------------------------------------------------------------------

                 Key: SHINDIG-1320
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1320
             Project: Shindig
          Issue Type: Improvement
          Components: Java
            Reporter: Mat Mannion
            Priority: Minor


The OpenSocial 0.9 specification 
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/Gadgets-API-Specification.html#process
 has no explicit statement that says that hangman variables should be 
substituted in any kind of order or with precedence, but there are some gadgets 
that rely on this behaviour in iGoogle, for example their to do list gadget: 
http://www.google.com/ig/modules/todo.xml

In the case of a gadget specification as follows:

<Module>
 <ModulePrefs title="__UP_title__">
  <Locale>
   <msg name="title">Gadget title</msg>
  </Locale>
 </ModulePrefs>
 <UserPref name="title" default_value="__MSG_title__" />
 <Content />
</Module>

it seems reasonable that the content would be "Gadget title", rather than 
"__MSG_title__" as it is at the moment. The Substitutions class already has 
some vague comments relating to precedence that don't seem to have been applied 
to the actual substitutions.

Since the spec already has an order in the way it is written (MSG -> UP -> 
MODULE -> BIDI) it would seem reasonable to replicate this ordering in both the 
Substitutions.Type enum and in the order that substitutions are added in 
VariableSubstituter.substitute(), and then to allow substitutions to use 
pre-existing substitutions when they are added.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to