In a form design, reference syntax expressions associate objects with values, objects, and properties within the tree hierarchy of a Document Object Model (DOM). Reference syntax expressions are usually written into form logic, in validations, calculations, or other business rules.
In addition, after evaluating reference syntax in a script, store the result in an object variable. This result can be retrieved if the reference syntax is used again. Reusing a result is more efficient than re-evaluating the expression.
In the following example, the resolveNode method is used once, and the resulting object reference is saved and reused to manipulate various related objects. This script can be processed more efficiently than one that uses a reference syntax expression for each object and uses the resolveNode method on each one.
var oSubform = xfa.resolveNode(“xfa.form.form1.Subform1″);

if (oSubform.all.length< 3) {

   Subform.SubformUpButton1.presence =”invisible”;
   Subform.SubformLabel1.presence = “invisible”;

   Subform.SubformUpButton2.presence =”invisible”;
   Subform.SubformLabel2.presence =”invisible”;


}
See also 

Performance considerations for XML Form Object Model expressions