Input: PSTNode
Output: TPSTNode
TPSTNode = new TPSTNode;
if is a leaf node then
if Entry is a route node then
(4)   return null;
(5) else
(6)   .type = “Active”;
(7)   .label = Entry.getName;
(8)   return ;
(9) end
(10) else
(11) .label = getName;
(12) .type = getNodeType;
(13) return ;
(14) end
Algorithm 2 transToTPSTNode.