<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I agree, that works. But I want:<br>
<br>
xerte<br>
xot<br>
moodle<br>
<br>
to work.<br>
<br>
I added a space after each word, and that doesn't work, only 'xerte
' gets highlighted. I have it working, but I want to understand why.<br>
<br>
<div class="moz-cite-prefix">Op 5-10-2012 10:44, Ron Mitchell
schreef:<br>
</div>
<blockquote cite="mid:006d01cda2d5$a0a87220$e1f95660$@co.uk"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";
color:black;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle24
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></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]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">That's
curious Tom<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
changed the text on each page to:<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">about
xerte and<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">about
xot and<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">about
moodle and<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">and
the links get created and work on each page </span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a
moz-do-not-send="true"
href="http://vle.jisctechdis.ac.uk/xot/play.php?template_id=143">http://vle.jisctechdis.ac.uk/xot/play.php?template_id=143</a></span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><a moz-do-not-send="true"
name="_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"
lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"
lang="EN-US"> <a class="moz-txt-link-abbreviated" href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a>
[<a class="moz-txt-link-freetext" href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">mailto:xerte-dev-bounces@lists.nottingham.ac.uk</a>] <b>On
Behalf Of </b>Tom Reijnders<br>
<b>Sent:</b> 05 October 2012 09:38<br>
<b>To:</b> For Xerte technical developers<br>
<b>Subject:</b> [Xerte-dev] Re: Glossary<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">I agree, but
it was not sufficient. Somehow the second and third word in
Ron's example still did not get highlighted for me.<br>
To fix this issue I had to add the \r to the RegExp.<br>
<br>
And to fix the other issue I had to remove the <a
moz-do-not-send="true" href="file:///%5C%5Cb">\\b</a>, but
that bothers me, because I don't know why it was in there and
what it is supposed to do....<br>
<br>
Tom<o:p></o:p></p>
<div>
<p class="MsoNormal">Op 5-10-2012 10:34, Fay Cross schreef:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
think it’s a problem with the regular expression – if you
add a space after each word before you do a line break it
will highlight the word but if it’s at the end of a line/
sentence like your examples it won’t.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
think it’s looking for “ xot “ rather than just “xot” to
avoid things like <u>cat</u>alogue happening if you have
the word cat in the glossary.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:36.0pt"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"
lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"
lang="EN-US"> <a moz-do-not-send="true"
href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a>
[<a moz-do-not-send="true"
href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">mailto:xerte-dev-bounces@lists.nottingham.ac.uk</a>]
<b>On Behalf Of </b>Ron Mitchell<br>
<b>Sent:</b> 05 October 2012 09:33<br>
<b>To:</b> 'For Xerte technical developers'<br>
<b>Subject:</b> [Xerte-dev] Re: Glossary</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi
Tom</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">is
this XOT or xerte?</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
can't get the Glossary to work in XOT at all - am I
missing something stupid?...</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">As
a test I added the following:</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><img
id="Picture_x0020_1"
src="cid:part6.06050107.06080401@tor.nl" border="0"
height="480" width="640"></span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Then
a plain text page with</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><img
id="Picture_x0020_2"
src="cid:part7.05060706.08040103@tor.nl" border="0"
height="480" width="640"></span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">and
a text and graphics page with the same words</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><img
id="Picture_x0020_3"
src="cid:part8.01050406.09060707@tor.nl" border="0"
height="480" width="640"></span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">But
neither page shows any clickable links <a
moz-do-not-send="true"
href="http://vle.jisctechdis.ac.uk/xot/play.php?template_id=143">http://vle.jisctechdis.ac.uk/xot/play.php?template_id=143</a></span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:36.0pt"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"
lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"
lang="EN-US"> <a moz-do-not-send="true"
href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a>
[<a moz-do-not-send="true"
href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">mailto:xerte-dev-bounces@lists.nottingham.ac.uk</a>]
<b>On Behalf Of </b>Tom Reijnders<br>
<b>Sent:</b> 05 October 2012 08:34<br>
<b>To:</b> <a moz-do-not-send="true"
href="mailto:xerte-dev@lists.nottingham.ac.uk">xerte-dev@lists.nottingham.ac.uk</a><br>
<b>Subject:</b> [Xerte-dev] Glossary</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">Julain,<br>
<br>
I suppose this is one for you:<br>
<br>
I have a teacher that wants to create a kind of dictionary,
so he's created a big glossary, and then for each letter a
separate text page containing a list of the terms.<br>
<br>
However, the terms are not all transformed into a link. <br>
1. The regular expression doesn't like the sentence ending
on a 'newline', I've added '\r' to the set of characters
that may 'end' a term in the RegExp of line 6662 (or the
teacher has to add a space at the end of the term.<br>
<br>
That still is not enough, it will only transform the first
term to a link. I had to remove the <a
moz-do-not-send="true" href="file:///%5C%5C%5C%5Cb">\\b</a>
from the regexp. I tried to find a manual page to figure out
what <a moz-do-not-send="true" href="file:///%5C%5C%5C%5Cb">\\b</a>
means in RegExp, but I can't find it. Do you have any idea
what the <a moz-do-not-send="true"
href="file:///%5C%5C%5C%5Cb">\\b</a> is doing there?<br>
<br>
For quick reference I needed to change this:<br>
<br>
if (Glossary.enabled && highlight != false){<br>
for (var i = 0; i<Glossary.terms.length;
i++) {<br>
//new code with regexp<br>
var re = new RegExp('\\b(' +
Glossary.terms[i] + ')([.,!? -])', 'gi');<br>
myText = myText.replace(re, '<font
color = "'+STYLES.glossaryColour+'"><a
class="glossary" href =
"asfunction:_root.engine.rootIcon.showGlosTerm,'+i+'">$1</a></font>$2');<br>
}<br>
}<br>
<br>
into this:<br>
<br>
if (Glossary.enabled && highlight != false){<br>
for (var i = 0; i<Glossary.terms.length;
i++) {<br>
//new code with regexp<br>
<span style="color:red"> var re = new
RegExp('(' + Glossary.terms[i] + ')([.,!? -\n\r])', 'gi');<br>
</span> myText = myText.replace(re,
'<font color = "'+STYLES.glossaryColour+'"><a
class="glossary" href =
"asfunction:_root.engine.rootIcon.showGlosTerm,'+i+'">$1</a></font>$2');<br>
}<br>
}<o:p></o:p></p>
<pre style="margin-left:36.0pt">-- <o:p></o:p></pre>
<pre style="margin-left:36.0pt">--<o:p></o:p></pre>
<pre style="margin-left:36.0pt"> <o:p></o:p></pre>
<pre style="margin-left:36.0pt">Tom Reijnders<o:p></o:p></pre>
<pre style="margin-left:36.0pt">TOR Informatica<o:p></o:p></pre>
<pre style="margin-left:36.0pt">Chopinlaan 27<o:p></o:p></pre>
<pre style="margin-left:36.0pt">5242HM Rosmalen<o:p></o:p></pre>
<pre style="margin-left:36.0pt">Tel: 073 5226191<o:p></o:p></pre>
<pre style="margin-left:36.0pt">Fax: 073 5226196<o:p></o:p></pre>
<pre style="margin-left:36.0pt"> <o:p></o:p></pre>
<p class="MsoNormal" style="margin-left:36.0pt"> <o:p></o:p></p>
<p style="margin-left:36.0pt">This message and any attachment
are intended solely for the addressee and may contain
confidential information. If you have received this message
in error, please send it back to me, and immediately delete
it. Please do not use, copy or disclose the information
contained in this message or in any attachment. Any views or
opinions expressed by the author of this email do not
necessarily reflect the views of the University of
Nottingham. <o:p></o:p></p>
<p style="margin-left:36.0pt">This message has been checked
for viruses but the contents of an attachment may still
contain software viruses which could damage your computer
system: you are advised to perform your own checks. Email
communications with the University of Nottingham may be
monitored as permitted by UK legislation. <o:p></o:p></p>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Xerte-dev mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>This message has been checked for viruses but the contents of an attachment<o:p></o:p></pre>
<pre>may still contain software viruses which could damage your computer system:<o:p></o:p></pre>
<pre>you are advised to perform your own checks. Email communications with the<o:p></o:p></pre>
<pre>University of Nottingham may be monitored as permitted by UK legislation.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
</blockquote>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>--<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Tom Reijnders<o:p></o:p></pre>
<pre>TOR Informatica<o:p></o:p></pre>
<pre>Chopinlaan 27<o:p></o:p></pre>
<pre>5242HM Rosmalen<o:p></o:p></pre>
<pre>Tel: 073 5226191<o:p></o:p></pre>
<pre>Fax: 073 5226196<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Xerte-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a>
<a class="moz-txt-link-freetext" href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a>
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
--
Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196
</pre>
</body>
</html>