/*REXX program creates an HTML (XML) list of character names and corresponding remarks. */ charname. = charname.1 = "April" charname.2 = "Tam O'Shanter" charname.3 = "Emily" do i=1 while charname.i\=='' say 'charname' i '=' charname.i end /*i*/; say remark. = remark.1 = "I'm > Tam and <= Emily" remark.2 = "When chapman billies leave the street ..." remark.3 = "Short & shift" do k=1 while remark.k\=='' say ' remark' k '=' remark.k end /*k*/; say items = 0 header = 'CharacterRemarks' header = header'>' do j=1 while charname.j\=='' _=charname.j if j==1 then call create '<'header call create ' "' ||, char2xml(remark.j)'"' end /*j*/ if create.0\==0 then call create '',"gt") $=XML_('Æ','#x00c6') ; $=XML_('║',"boxV") ; $=XML_('ε',"epsilon") ; $=XML_('?',"quest") $=XML_('ô',"ocirc") ; $=XML_('╗',"boxDL") ; $=XML_('∩',"cap") ; $=XML_('_',"commat") $=XML_('ô','#x00f4') ; $=XML_('╝',"boxUL") ; $=XML_('≡',"equiv") ; $=XML_('[',"lbrack") $=XML_('ö',"ouml") ; $=XML_('╜',"boxUl") ; $=XML_('±',"plusmn") ; $=XML_('\',"bsol") $=XML_('ö','#x00f6') ; $=XML_('╛',"boxuL") ; $=XML_('±',"pm") ; $=XML_(']',"rbrack") $=XML_('ò',"ograve") ; $=XML_('┐',"boxdl") ; $=XML_('±',"PlusMinus") ; $=XML_('^',"Hat") $=XML_('ò','#x00f2') ; $=XML_('└',"boxur") ; $=XML_('≥',"ge") ; $=XML_('`',"grave") $=XML_('û',"ucirc") ; $=XML_('┴',"bottom"); $=XML_('≤',"le") ; $=XML_('{',"lbrace") $=XML_('û','#x00fb') ; $=XML_('┴',"boxhu") ; $=XML_('÷',"div") ; $=XML_('{',"lcub") $=XML_('ù',"ugrave") ; $=XML_('┬',"boxhd") ; $=XML_('÷',"divide") ; $=XML_('|',"vert") $=XML_('ù','#x00f9') ; $=XML_('├',"boxvr") ; $=XML_('≈',"approx") ; $=XML_('|',"verbar") $=XML_('ÿ',"yuml") ; $=XML_('─',"boxh") ; $=XML_('∙',"bull") ; $=XML_('}',"rbrace") $=XML_('ÿ','#x00ff') ; $=XML_('┼',"boxvh") ; $=XML_('°',"deg") ; $=XML_('}',"rcub") $=XML_('Ö',"Ouml") ; $=XML_('╞',"boxvR") ; $=XML_('·',"middot") ; $=XML_('Ç',"Ccedil") $=XML_('Ö','#x00d6') ; $=XML_('╟',"boxVr") ; $=XML_('·',"middledot") ; $=XML_('Ç','#x00c7') $=XML_('Ü',"Uuml") ; $=XML_('╚',"boxUR") ; $=XML_('·',"centerdot") ; $=XML_('ü',"uuml") $=XML_('Ü','#x00dc') ; $=XML_('╔',"boxDR") ; $=XML_('·',"CenterDot") ; $=XML_('ü','#x00fc') $=XML_('¢',"cent") ; $=XML_('╩',"boxHU") ; $=XML_('√',"radic") ; $=XML_('é',"eacute") $=XML_('£',"pound") ; $=XML_('╦',"boxHD") ; $=XML_('²',"sup2") ; $=XML_('é','#x00e9') $=XML_('¥',"yen") ; $=XML_('╠',"boxVR") ; $=XML_('■',"square ") ; $=XML_('â',"acirc") if amper then $=xml_(?, "amp") /*Was there an ampersand? Translate it*/ if semi then $=xml_(??, "semi") /* " " " semicolon? " "*/ return $ /*──────────────────────────────────────────────────────────────────────────────────────*/ create: items= items + 1 /*bump the count of items in the list. */ create.items= arg(1) /*add item to the CREATE list. */ create.0 = items /*indicate how many items in the list. */ return /*──────────────────────────────────────────────────────────────────────────────────────*/ xml_: parse arg _ /*make an XML entity (&xxxx;) */ if pos(_, $)\==0 then return changestr(_, $, "&"arg(2)";") return $