<> <> <> <<>> <> <<>> <> << A node may transform into one or more sibling nodes,>> << A node may not be deleted by a transformation,>> << The transformation procedure is responsible for making any necessary changes in the document tree, i.e. reestablishing proper child and next links for new nodes; these changes must obey the previous two rules,>> << An active node may transform into another active node, however, in this case, the new active node may been seen by clients; the transformation on it will not occur until the next time the node is requested.>> <<>> DIRECTORY TextNode USING [Ref]; TextNodeRegistry: CEDAR DEFINITIONS ~ BEGIN Ref: TYPE ~ TextNode.Ref; TransformProc: TYPE ~ PROC [node: Ref, parent: Ref, wantFirst: BOOLEAN, clientData: REF ANY] RETURNS [new: Ref]; <> <<>> SizeProc: TYPE ~ PROC [node: Ref, clientData: REF ANY] RETURNS [size: INT]; <> ActivityProc: TYPE ~ PROC [on: BOOLEAN, clientData: REF ANY] RETURNS []; <> <<>> ProcSet: TYPE = REF ProcSetRec; ProcSetRec: TYPE = RECORD[ activityOn: BOOLEAN _ FALSE, transformProc: TransformProc _ NIL, transformProcData: REF ANY _ NIL, sizeProc: SizeProc _ NIL, sizeProcData: REF ANY _ NIL, activityProc: ActivityProc _ NIL, activityProcData: REF ANY _ NIL]; Register: PROC [activity: ATOM, procs: ProcSet] RETURNS []; <> <<>> UnRegister: PROC [activity: ATOM] RETURNS []; <> <<>> GetProcs: PROC[activity: ATOM] RETURNS [procs: ProcSet]; <> <<>> ActivityOn: PROC [activity: ATOM, on: BOOLEAN _ TRUE] RETURNS [wasOn: BOOLEAN]; <> <<>> DoTransform: PROC [activity: ATOM, node: Ref, parent: Ref _ NIL, wantFirst: BOOLEAN _ TRUE] RETURNS [new: Ref]; <> <<>> GetSize: PROC [activity: ATOM, node: Ref] RETURNS [size: INT]; <> <<>> END.