<html><head></head><body>Thanks, David! To have this broken note shown in the middle of the Bible text without being asked for is rather distracting in my opinion. I'd rather choose the "validate and fall back to plain text" option recommended by Peter.<br>
<br>
Best regards,<br>
Tobias<br><br><div class="gmail_quote">Am 17. Juli 2019 22:19:13 MESZ schrieb David Haslam <dfhdfh@protonmail.com>:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>I installed the aforementioned module in PocketSword and sent a screenshot of the invalid XML verse to Tobias via Facebook Messenger. </div><div><br></div><div>It does seem to display the errant markup text <caret></caret>as best it can, with footnote references shown as links, etc. </div><div><br></div><div>David</div><div><br></div><div id="protonmail_mobile_signature_block"><div>Sent from ProtonMail Mobile</div></div> <div><br></div><div><br></div>On Wed, Jul 17, 2019 at 21:12, Tobias Klein <<a href="mailto:contact@tklein.info" class="">contact@tklein.info</a>> wrote:<blockquote class="protonmail_quote" type="cite">
<p>Thanks, good advice! Especially the idea about dynamically
validating markup text and then going for the plain text version
as a fallback. I'll think about using that option in
node-sword-interface (Ezra Project's SWORD integration library).</p>
<p>Best regards,<br>
Tobias<br>
</p>
<div class="moz-cite-prefix">On 17.07.19 13:59, Peter Von Kaehne
wrote:<br>
</div>
<blockquote type="cite">
<div style="font-family: Verdana;font-size: 12.0px;">
<div>1) The best way is to recognise it and either fall back to
something sane or refuse to deal with the module without
crashing. You could presumably if an xml chunk is delivered by
the engine to you and is not internally valid ask the engine
to re-render it plainly and spit out some message to that
effect on the terminal. Then a use may be in the position to
see this and send a bug report to whoever is responsible for
the dodgy module.
<div> </div>
<div>2) CrossWire modules are for teh last 10 years or so
always tested and validated before they are published but
other repositories are subject to their own rules. The
module you reference is from eBible and not CrossWire. But -
admittedly - we have in CrossWire still a lot of old modules
which may well have bugs which only show up slowly.</div>
<div> </div>
<div>Peter</div>
<div> </div>
<div> </div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding:
10px 0 10px 10px; border-left:2px solid #C3D9E5;
word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Mittwoch,
17. Juli 2019 um 07:13 Uhr<br>
<b>Von:</b> "Tobias Klein" <a class="moz-txt-link-rfc2396E" href="mailto:contact@tklein.info"><contact@tklein.info></a><br>
<b>An:</b> "SWORD Developers' Collaboration Forum"
<a class="moz-txt-link-rfc2396E" href="mailto:sword-devel@crosswire.org"><sword-devel@crosswire.org></a><br>
<b>Betreff:</b> [sword-devel] How to deal with invalid
markup?</div>
<div name="quoted-content">
<div style="background-color: rgb(255,255,255);">
<p>Hi everyone,</p>
<p>Is there a recommended way on how to deal with
invalid markup (in a frontend) when using the text
from a Sword module?</p>
<p>To me invalid markup is basically invalid XML.<br>
You find an example below (Exodus 3:22 /
engNET2016eb).<br>
<br>
Are Sword modules validated with standard XML
validation tools before being published?</p>
<p>Best regards,<br>
Tobias<br>
</p>
<p>Module: engNET2016eb</p>
<p>Mark-up text of Exodus 3:22
(module->getRawEntry()):</p>
<p><font size="-1"><w
lemma="strong:H802">Every</w> <w
lemma="strong:H802">woman</w> <w
lemma="strong:H7592">will ask</w> <w
lemma="strong:H7934">her neighbor</w>
<w lemma="strong:H1481">and the one who
happens to be staying</w> <w
lemma="strong:H1004">in her house</w>
<w lemma="strong:H3627">for items</w>
<w lemma="strong:H3701">of silver</w>
<w lemma="strong:H2091">and gold</w>
<w lemma="strong:H8071">and for
clothing</w>. <w
lemma="strong:H7760">You will put</w>
<w lemma="strong:H3627">these
articles</w> <w
lemma="strong:H5921">on</w> <w
lemma="strong:H1121">your sons</w> <w
lemma="strong:H1323">and daughters</w>
<w lemma="strong:H5337">– thus you</w><br>
<br>
INVALID section starts here:</font></p>
<p><font size="-1"><w lemma="strong:H4713">will
plunder Egypt</w><b><font color="#ff0000">!”
‘</font></b>span class=”footnote”
id=”footnote-65”<b><font color="#ff0000">’‘</font></b>span
class=”key”’65‘<br>
<w lemma="strong:H7760">a</w><b><font color="#ff0000"> </font></b>href=”#note-65”
class=”backref”’<font color="#ff0000"><b>3:19‘/a’‘</b></font>span
class=”text”’ <hi
type="italic">tn</hi>: <hi
type="italic">Heb</hi> “<br>
<br>
<w lemma="strong:H1121">and</w> <w
lemma="strong:H1121">not</w> <w
lemma="strong:H1004">with</w> <w
lemma="strong:H7760">a</w> mighty hand.”<br>
...</font></p>
_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a> <a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at
above page</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
</blockquote>
</blockquote><div><br></div><div><br></div></blockquote></div><br>
-- <br>
Message sent from my phone. Please excuse brevity.</body></html>