% % gather info or perform process on xml tree % /* A is the apex of the run tree X is the current focus on the Run tree P is the parameter supplied R is the return string L is absolute location M is merge report U is parent F is Fire code S is status attribute K is proc attribute T is attribute -----does not actually engage into run tree------------------------- abs P from A ExternalInterface.addCallback("MergeAbs",MergeAbs); X is merged into A(P) empty R indicates no existing A(P), no X merge takes place or R = M rel P from X ExternalInterface.addCallback("MergeRel",MergeRel); X is merged into X(P) empty R indicates no existing X(P), no X merge takes place or R = M ----------------------------------------------------------------- abs P from A ExternalInterface.addCallback("Add",AddXml); X added to A(P) empty R indicates no A(P) to add X to or R = L(A(P)) */ |Add % % stack: xml-string abs-ref % exch "SetXml" @^Adance pop "Add" @^Adance |Set % % stack: xml-string % "doTree" @^Adance |Clear % % stack: xml-string % "unTree" @^Adance /* ExternalInterface.addCallback("SetRun",SetRun); report Run tree xml or replace the Run tree entirely empty P R = A xml P A = P R = "-" */ |!Run % % stack: run-tree-xml % "SetRun" @^Adance pop |_Run empty "SetRun" @^Adance % % stack: run-tree-xml % /* xml P ExternalInterface.addCallback("JoinXml",JoinXml); absolute merge of P to A R = M empty P ExternalInterface.addCallback("MergeXml",MergeXml); absolute merge of X to A R = M ExternalInterface.addCallback("SetXml",SetXml); empty P R = X xml P X = P ExternalInterface.addCallback("Tack",TackXml); abs P merge xml at A(P) into X empty R indicates no existing A(P), no X merge takes place or R = M */ |Join % % stack: xml-string abs-ref % exch *xmlztack /* ExternalInterface.addCallback("Say",Say); typename P --status R = S(X) --proc R = K(X) other P --attr|data T(attr) = data --attr delete T(attr) ExternalInterface.addCallback("Gone",Dgone); *** should be Gone empty P delete the branch of the run tree X del from A X = U(X) empty R ExternalInterface.addCallback("Chop",Dchop); *** should be Chop abs P from A delete A(P) X = U(A(P)) empty R ExternalInterface.addCallback("Trim",Dtrim); *** should be Trim rel P from X delete X(P) X = U(X(P)) empty R ExternalInterface.addCallback("Spot",Spot); typename P --typename xml R = xml of X --typename addr R = L(X) --typename dance R = F(X) rel P from X ExternalInterface.addCallback("Beam",Beam); relocate X to relative P X = X(P) R is L(X) abs P from A ExternalInterface.addCallback("Shine",Shine); relocate X to absolute P X = A(P) R is L(X) ExternalInterface.addCallback("DanceRun",DanceRun); empty P R = F(A) xml P A = P ExternalInterface.addCallback("XmlDance",XmlDanceUn); xml P create code for xml P R = F(P) or R = error/errmsg */ |Apex % % stack: xml-string % % set X with the xml content to be attached at the Apex % "Apan" exch *xmlztack |Initial % % stack: xml-string tack-addr % % set X with the first time Web branch content % exch *xmlztack pop % % focus the tree on the Atos branch % "Apan.Web" "runTree" @^Adance pop |Row % % stack: run-addr % "rowXml" @^Adance % % response has structure: % local-node-name % row-member-count % [ % local-node-name local-node-content % . . . % ] % |Attr % % stack: run-addr % "attrXml" @^Adance % % response has structure: % attr-member-count % [ % attr-name attr-value % . . . % ] %