speaking as the Nottingham person who was tasked with writing regular expressions ;)<br><br>I would assume that would be the case<br><br><div class="gmail_quote">On Fri, Oct 5, 2012 at 9:57 AM, Ron Mitchell <span dir="ltr"><<a href="mailto:ronm@mitchellmedia.co.uk" target="_blank">ronm@mitchellmedia.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" link="blue" vlink="purple" lang="EN-GB"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">It seems like as Fay mentioned only terms with a space either side are picked up?<u></u><u></u></span></p>
<p class="MsoNormal"><a name="13a302364d42a14c__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></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 href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk" target="_blank">xerte-dev-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk" target="_blank">xerte-dev-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Ron Mitchell<br>
<b>Sent:</b> 05 October 2012 09:53<br><b>To:</b> 'For Xerte technical developers'<br><b>Subject:</b> [Xerte-dev] Re: Glossary<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">You can have them they're all free! ;-)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></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 href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk" target="_blank">xerte-dev-bounces@lists.nottingham.ac.uk</a> [<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk" target="_blank">mailto:xerte-dev-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Tom Reijnders<br>
<b>Sent:</b> 05 October 2012 09:49<br><b>To:</b> For Xerte technical developers<br><b>Subject:</b> [Xerte-dev] Re: Glossary<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" style="margin-bottom:12.0pt">
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.<u></u><u></u></p>
<div><p class="MsoNormal">Op 5-10-2012 10:44, Ron Mitchell schreef:<u></u><u></u></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">That's curious Tom</span><u></u><u></u></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:</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">about xerte and</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">about xot and</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">about moodle and</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></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 <a href="http://vle.jisctechdis.ac.uk/xot/play.php?template_id=143" target="_blank">http://vle.jisctechdis.ac.uk/xot/play.php?template_id=143</a></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></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 href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk" target="_blank">xerte-dev-bounces@lists.nottingham.ac.uk</a> [<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk" target="_blank">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</span><u></u><u></u></p></div></div><p class="MsoNormal"> <u></u><u></u></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>\\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<u></u><u></u></p><div><p class="MsoNormal">Op 5-10-2012 10:34, Fay Cross schreef:<u></u><u></u></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><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></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><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></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 href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk" target="_blank">xerte-dev-bounces@lists.nottingham.ac.uk</a> [<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk" target="_blank">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><u></u><u></u></p></div></div><p class="MsoNormal" style="margin-left:36.0pt"> <u></u><u></u></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><u></u><u></u></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><u></u><u></u></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><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></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><u></u><u></u></p><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><img src="cid:image001.jpg@01CDA2DF.E49EC6F0" border="0" height="480" width="640"></span><u></u><u></u></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><u></u><u></u></p><p class="MsoNormal" style="margin-left:36.0pt">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><img src="cid:image002.jpg@01CDA2DF.E49EC6F0" border="0" height="480" width="640"></span><u></u><u></u></p><p class="MsoNormal" style="margin-left:36.0pt">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></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><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><img src="cid:image003.jpg@01CDA2DF.E49EC6F0" border="0" height="480" width="640"></span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></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 href="http://vle.jisctechdis.ac.uk/xot/play.php?template_id=143" target="_blank">http://vle.jisctechdis.ac.uk/xot/play.php?template_id=143</a></span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal" style="margin-left:36.0pt">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></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 href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk" target="_blank">xerte-dev-bounces@lists.nottingham.ac.uk</a> [<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk" target="_blank">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 href="mailto:xerte-dev@lists.nottingham.ac.uk" target="_blank">xerte-dev@lists.nottingham.ac.uk</a><br><b>Subject:</b> [Xerte-dev] Glossary</span><u></u><u></u></p></div>
</div><p class="MsoNormal" style="margin-left:36.0pt"> <u></u><u></u></p><p class="MsoNormal" style="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>\\b</a> from the regexp. I tried to find a manual page to figure out what <a>\\b</a> means in RegExp, but I can't find it. Do you have any idea what the <a>\\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> }<u></u><u></u></p><pre style="margin-left:36.0pt">-- <u></u><u></u></pre><pre style="margin-left:36.0pt">--<u></u><u></u></pre><pre style="margin-left:36.0pt"> <u></u><u></u></pre><pre style="margin-left:36.0pt">
Tom Reijnders<u></u><u></u></pre><pre style="margin-left:36.0pt">TOR Informatica<u></u><u></u></pre><pre style="margin-left:36.0pt">Chopinlaan 27<u></u><u></u></pre><pre style="margin-left:36.0pt">5242HM Rosmalen<u></u><u></u></pre>
<pre style="margin-left:36.0pt">Tel: 073 5226191<u></u><u></u></pre><pre style="margin-left:36.0pt">Fax: 073 5226196<u></u><u></u></pre><pre style="margin-left:36.0pt"> <u></u><u></u></pre><p class="MsoNormal" style="margin-left:36.0pt">
<u></u><u></u></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. <u></u><u></u></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. <u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br><br><br><u></u><u></u></p><pre>_______________________________________________<u></u><u></u></pre><pre>Xerte-dev mailing list<u></u><u></u></pre><pre><a href="mailto:Xerte-dev@lists.nottingham.ac.uk" target="_blank">Xerte-dev@lists.nottingham.ac.uk</a><u></u><u></u></pre>
<pre><a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><u></u><u></u></pre><pre> <u></u><u></u></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.<u></u><u></u></pre>
<pre> <u></u><u></u></pre><pre>This message has been checked for viruses but the contents of an attachment<u></u><u></u></pre><pre>may still contain software viruses which could damage your computer system:<u></u><u></u></pre>
<pre>you are advised to perform your own checks. Email communications with the<u></u><u></u></pre><pre>University of Nottingham may be monitored as permitted by UK legislation.<u></u><u></u></pre><pre> <u></u><u></u></pre>
</blockquote><p class="MsoNormal" style="margin-bottom:12.0pt"><br><br><u></u><u></u></p><pre>-- <u></u><u></u></pre><pre>--<u></u><u></u></pre><pre> <u></u><u></u></pre><pre>Tom Reijnders<u></u><u></u></pre><pre>TOR Informatica<u></u><u></u></pre>
<pre>Chopinlaan 27<u></u><u></u></pre><pre>5242HM Rosmalen<u></u><u></u></pre><pre>Tel: 073 5226191<u></u><u></u></pre><pre>Fax: 073 5226196<u></u><u></u></pre><pre> <u></u><u></u></pre><p class="MsoNormal" style="margin-bottom:12.0pt">
<br><br><u></u><u></u></p><pre>_______________________________________________<u></u><u></u></pre><pre>Xerte-dev mailing list<u></u><u></u></pre><pre><a href="mailto:Xerte-dev@lists.nottingham.ac.uk" target="_blank">Xerte-dev@lists.nottingham.ac.uk</a><u></u><u></u></pre>
<pre><a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><u></u><u></u></pre><pre><u></u> <u></u></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.<u></u><u></u></pre>
<pre><u></u> <u></u></pre><pre>This message has been checked for viruses but the contents of an attachment<u></u><u></u></pre><pre>may still contain software viruses which could damage your computer system:<u></u><u></u></pre>
<pre>you are advised to perform your own checks. Email communications with the<u></u><u></u></pre><pre>University of Nottingham may be monitored as permitted by UK legislation.<u></u><u></u></pre><pre><u></u> <u></u></pre>
</blockquote><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><pre>-- <u></u><u></u></pre><pre>--<u></u><u></u></pre><pre><u></u> <u></u></pre><pre>Tom Reijnders<u></u><u></u></pre><pre>TOR Informatica<u></u><u></u></pre>
<pre>Chopinlaan 27<u></u><u></u></pre><pre>5242HM Rosmalen<u></u><u></u></pre><pre>Tel: 073 5226191<u></u><u></u></pre><pre>Fax: 073 5226196<u></u><u></u></pre><pre><u></u> <u></u></pre></div></div><br>_______________________________________________<br>
Xerte-dev mailing list<br>
<a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><br>
<br>
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.<br>
<br>
This message has been checked for viruses but the contents of an attachment<br>
may still contain software viruses which could damage your computer system:<br>
you are advised to perform your own checks. Email communications with the<br>
University of Nottingham may be monitored as permitted by UK legislation.<br>
<br>
<br></blockquote></div><br>