<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD><TITLE>Trying to create a function with arguments</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR>
<STYLE>@font-face {
        font-family: SimSun;
}
@font-face {
        font-family: SimSun;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @SimSun;
}
@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman","serif"; mso-style-priority: 99; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
        COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-reply
}
.MsoChpDefault {
        FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-GB vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=595523115-29102008><FONT face=Verdana
color=#0000ff size=2>Why didn't I think of that? ;o)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=595523115-29102008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=595523115-29102008><FONT face=Verdana
color=#0000ff size=2>Works perfectly, Julian.
Thanks!</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Julian
Tenney<BR><B>Sent:</B> Wednesday, October 29, 2008 1:29 AM<BR><B>To:</B> Xerte
discussion list<BR><B>Subject:</B> RE: [Xerte] Trying to create a function
with arguments<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">I
wouldn’t include all the aryEntities definitions in the function, otherwise
you are going through that code, rebuilding your array, every time you call
the function. There’s no need to do that. Instead, define the array somewhere
near the top of the piece (in a setup script is ideal, as that code will only
run once, or somewhere in the entry frame of the main
framework):<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">myLookup
= new Array();<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">myLookup["&nbsp"]
= “\u00A0”; <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">--etc--<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Then
there is no need to call a function – just lookup the value you
want:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">myValue
= myLookup[entity];<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">J<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><B><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Paul
Swanson<BR><B>Sent:</B> Tuesday, October 28, 2008 10:36 PM<BR><B>To:</B>
xerte@lists.nottingham.ac.uk<BR><B>Subject:</B> [Xerte] Trying to create a
function with arguments<o:p></o:p></SPAN></P></DIV></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><o:p> </o:p></P>
<P style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'">I'm trying to
create a function in Xerte that will display HTML entities. The function takes
the normal HTML entity name, and should return the unicode equivalent, so I
need to pass it an argument.</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'">From the Help, I
see that Xerte does not recognize the keyword 'function' so I'm confused on
how to pass it an argument. Here is the function (found it through Google,
then added some missing entities that I think I might use
someday):</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">// create the entity
mapping array </SPAN><BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">// which allows decoding
html entities into their unicode equivalents
</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">function
GetEntityArray(entity) {</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities = Array();</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&nbsp;"] = "\u00A0"; // non-breaking space</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&iexcl;"] = "\u00A1"; // inverted exclamation
mark</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&cent;"] = "\u00A2"; // cent sign</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&pound;"] = "\u00A3"; // pound sign</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&curren;"] = "\u00A4"; // currency sign</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&yen;"] = "\u00A5"; // yen sign</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&euro;"] = "\u20AC"; // Euro sign</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&brvbar;"] = "\u00A6"; // broken vertical bar (|)</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&sect;"] = "\u00A7"; // section sign</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&uml;"] = "\u00A8"; // diaeresis</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&copy;"] = "\u00A9"; // copyright sign</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&reg;"] = "\u00AE"; // registered
sign</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&trade;"] = "\u2122"; // trademark sign</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&deg;"] = "\u00B0"; // degree sign</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&plusmn;"] = "\u00B1"; // plus-minus sign</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&sup1;"] = "\u00B9"; // superscript one</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&sup2;"] = "\u00B2"; // superscript two</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&sup3;"] = "\u00B3"; // superscript three</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&acute;"] = "\u00B4"; // acute accent</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&micro;"] = "\u00B5"; // micro sign</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&frac14;"] = "\u00BC"; // vulgar fraction one quarter</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&frac12;"] = "\u00BD"; // vulgar fraction one half</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&frac34;"] = "\u00BE"; // vulgar fraction three
quarters</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&iquest;"] = "\u00BF"; // inverted question mark</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Agrave;"] = "\u00C0"; // Latin capital letter A with
grave</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Aacute;"] = "\u00C1"; // Latin capital letter A with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Acirc;"] = "\u00C2"; // Latin capital letter A with
circumflex</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Atilde;"] = "\u00C3"; // Latin capital letter A with
tilde</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Auml;"] = "\u00C4"; // Latin capital letter A
with diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Aring;"] = "\u00C5"; // Latin capital letter A with
ring above</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&AElig;"] = "\u00C6"; // Latin capital letter AE</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Ccedil;"] = "\u00C7"; // Latin capital letter C with
cedilla</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Egrave;"] = "\u00C8"; // Latin capital letter E with
grave</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Eacute;"] = "\u00C9"; // Latin capital letter E with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Ecirc;"] = "\u00CA"; // Latin capital letter E with
circumflex</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Euml;"] = "\u00CB"; // Latin capital letter E
with diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Igrave;"] = "\u00CC"; // Latin capital letter I with
grave</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Iacute;"] = "\u00CD"; // Latin capital letter I with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Icirc;"] = "\u00CE"; // Latin capital letter I with
circumflex</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Iuml;"] = "\u00CF"; // Latin capital letter I
with diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&ETH;"] = "\u00D0"; // Latin capital letter
ETH</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Ntilde;"] = "\u00D1"; // Latin capital letter N with
tilde</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Ograve;"] = "\u00D2"; // Latin capital letter O with
grave</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Oacute;"] = "\u00D3"; // Latin capital letter O with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Ocirc;"] = "\u00D4"; // Latin capital letter O with
circumflex</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Otilde;"] = "\u00D5"; // Latin capital letter O with
tilde</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Ouml;"] = "\u00D6"; // Latin capital letter O
with diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Oslash;"] = "\u00D8"; // Latin capital letter O with
stroke</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Ugrave;"] = "\u00D9"; // Latin capital letter U with
grave</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Uacute;"] = "\u00DA"; // Latin capital letter U with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Ucirc;"] = "\u00DB"; // Latin capital letter U with
circumflex</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Uuml;"] = "\u00DC"; // Latin capital letter U
with diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&Yacute;"] = "\u00DD"; // Latin capital letter Y with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&THORN;"] = "\u00DE"; // Latin capital letter
THORN</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&szlig;"] = "\u00DF"; // Latin small letter sharp s =
ess-zed</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&agrave;"] = "\u00E0"; // Latin small letter a with
grave</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&aacute;"] = "\u00E1"; // Latin small letter a with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&acirc;"] = "\u00E2"; // Latin small letter a with
circumflex</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&atilde;"] = "\u00E3"; // Latin small letter a with
tilde</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&auml;"] = "\u00E4"; // Latin small letter a with
diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&aring;"] = "\u00E5"; // Latin small letter a with ring
above</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&aelig;"] = "\u00E6"; // Latin small letter ae</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&ccedil;"] = "\u00E7"; // Latin small letter c with
cedilla</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&egrave;"] = "\u00E8"; // Latin small letter e with
grave</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&eacute;"] = "\u00E9"; // Latin small letter e with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&ecirc;"] = "\u00EA"; // Latin small letter e with
circumflex</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&euml;"] = "\u00EB"; // Latin small letter e with
diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&igrave;"] = "\u00EC"; // Latin small letter i with
grave</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&iacute;"] = "\u00ED"; // Latin small letter i with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&icirc;"] = "\u00EE"; // Latin small letter i with
circumflex</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&iuml;"] = "\u00EF"; // Latin small letter i with
diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&eth;"] = "\u00F0"; // Latin small letter
eth</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&ntilde;"] = "\u00F1"; // Latin small letter n with
tilde</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&ograve;"] = "\u00F2"; // Latin small letter o with
grave</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&oacute;"] = "\u00F3"; // Latin small letter o with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&ocirc;"] = "\u00F4"; // Latin small letter o with
circumflex</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&otilde;"] = "\u00F5"; // Latin small letter o with
tilde</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&ouml;"] = "\u00F6"; // Latin small letter o with
diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&oslash;"] = "\u00F8"; // Latin small letter o with
stroke</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&ugrave;"] = "\u00F9"; // Latin small letter u with
grave</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&uacute;"] = "\u00FA"; // Latin small letter u with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&ucirc;"] = "\u00FB"; // Latin small letter u with
circumflex</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&uuml;"] = "\u00FC"; // Latin small letter u with
diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&yacute;"] = "\u00FD"; // Latin small letter y with
acute</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&thorn;"] = "\u00FE"; // Latin small letter
thorn</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&yuml;"] = "\u00FF"; // Latin small letter y with
diaeresis</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&ndash;"] = "\u2013"; // N-dash</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&mdash;"] = "\u2014"; // M-dash</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&quot;"] = "\u0022"; // Quotation mark</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&amp;"] = "\u0026"; // Ampersand</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&lt;"] = "\u003C"; // Less-than
sign</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&gt;"] = "\u003E"; // Greater-than
sign</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&radic;"] = "\u221A"; // Square root symbol</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&infin;"] = "\u221E"; // Infinity symbol</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&loz;"] = "\u25CA"; // Lozenge shape</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&spades;"] = "\u2660"; // Spade suit</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&clubs;"] = "\u2663"; // Club suit / shamrock</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&hearts;"] = "\u2665"; // Heart suit / valentine</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
aryEntities["&diams;"] = "\u2666"; // Diamond suit</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
</SPAN><BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> return
aryEntities[entity]; </SPAN><BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">}</SPAN> <o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'">When I try to use
the function to set a variable, I get 'undefined.' Any pointers? Incidentally,
I think this would be a really useful addition to the core
Xerte.</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'">_____________________________</SPAN>
<o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'"> Paul
Swanson</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'"> Instructional
Designer</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'"> Harland
Financial Solutions</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'"> 800.274.7280
Ext. 2462</SPAN> <BR><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'"> Paul.Swanson@harlandfs.com</SPAN>
<BR><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'">_____________________________</SPAN>
<o:p></o:p></P></DIV></BLOCKQUOTE></BODY></HTML>