XML/Output: Difference between revisions
Content added Content deleted
(→{{header|REXX}}: made REXX entry compitable to older REXXes. -- ~~~~) |
m (→{{header|REXX}}: added a comment. -- ~~~~) |
||
Line 1,492:
charname.2="Tam O'Shanter"
charname.3="Emily"
do
say 'charname'
end /*i*/; say
remark.=
remark.1="I'm > Tam and <= Emily"
Line 1,501:
do j=1 while remark.j\==''
say ' remark' j '=' remark.j
end /*i*/; say
items=0
header='CharacterRemarks'
Line 1,516:
if create.0\==0 then call create '</'header
do
say create.
end /*m*/
exit /*stick a fork in it, we're done.*/
/*──────────────────────────────────CREATE subroutine───────────────────*/
create: items=items+1 /*bump the count of items in list*/
create.items=arg(1) /*add item to the CREATE list. */
create.0=items /*indicate how many items in list*/
return
/*──────────────────────────────────XML_ subroutine─────────────────────*/
xml_: parse arg _ /*make an XML entity (&xxxx;) */
if pos(_,x)\==0 then return changestr(_,x,"&"arg(2)";")
return x
/*──────────────────────────────────CHAR2XML subroutine─────────────────*/
char2xml: procedure; parse arg x
a=pos('&',x)\==0 /*ampersands have to be treated special.*/
Line 1,548:
/*Following are a few of the chars in */
/*the DOS (DOS under Windows) codepage.*/
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=XML_('┴',"boxhu")
x=XML_('┬',"boxhd")
x=XML_('├',"boxvr")
x=XML_('─',"boxh")
x=XML_('┼',"boxvh")
x=XML_('╞',"boxvR")
x=XML_('╟',"boxVr")
x=XML_('╚',"boxUR")
x=XML_('╔',"boxDR")
x=XML_('╩',"boxHU")
x=XML_('╦',"boxHD")
x=XML_('╠',"boxVR")
x=XML_('═',"boxH")
x=XML_('╬',"boxVH")
x=XML_('╧',"boxHu")
x=XML_('╨',"boxhU")
x=XML_('╤',"boxHd")
x=XML_('╥',"boxhD")
x=XML_('╙',"boxUr")
x=XML_('╘',"boxuR")
x=XML_('╒',"boxdR")
x=XML_('╓',"boxDr")
x=XML_('╫',"boxVh")
x=XML_('╪',"boxvH")
x=XML_('┘',"boxul")
x=XML_('┌',"boxdr")
x=XML_('█',"block")
x=XML_('▄',"lhblk")
x=XML_('▀',"uhblk")
x=XML_('α',"alpha")
x=XML_('ß',"beta")
x=XML_('ß',"szlig")
x=XML_('ß','#x00df')
x=XML_('Γ',"Gamma")
x=XML_('π',"pi")
x=XML_('Σ',"Sigma")
x=XML_('σ',"sigma")
x=XML_('µ',"mu")
x=XML_('τ',"tau")
x=XML_('Φ',"phi")
x=XML_('Θ',"Theta")
x=XML_('δ',"delta")
x=XML_('∞',"infin")
x=XML_('φ',"Phi")
x=XML_('ε',"epsilon")
x=XML_('∩',"cap")
x=XML_('≡',"equiv")
x=XML_('±',"plusmn")
x=XML_('±',"pm")
x=XML_('±',"PlusMinus")
x=XML_('≥',"ge")
x=XML_('≤',"le")
x=XML_('÷',"div")
x=XML_('÷',"divide")
x=XML_('≈',"approx")
x=XML_('∙',"bull")
x=XML_('°',"deg")
x=XML_('·',"middot")
x=XML_('·',"middledot")
x=XML_('·',"centerdot")
x=XML_('·',"CenterDot")
x=XML_('√',"radic")
x=XML_('²',"sup2")
x=XML_('■',"squart ")
if a then x=xml_(?,"amp") /*if we had an ampersand, translate it now.*/
|