Re: libsword issue in handling XML entities such as &
DM Smith <[email protected]> Thu, 31 Jul 2025 09:34:42 -0400
| Newsgroups | gmane.comp.literature.sword.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============3262881876628361583== Content-Type: multipart/alternative; boundary="Apple-Mail=_1D23B68B-D373-474E-BC57-1434207BAB36" --Apple-Mail=_1D23B68B-D373-474E-BC57-1434207BAB36 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 See below. > On Jul 31, 2025, at 8:53=E2=80=AFAM, David Haslam = <dfhdfh-g/[email protected] <mailto:dfhdfh-g/[email protected]>> wrote: >=20 > Hi DM, >=20 > Further to the feedback relating to the recent updates of the = FreGeneve1669 module... >=20 > Has anyone yet created an issue in JIRA for the failure of libsword to = output the & character wherever a module contains the XML entity & ? I didn=E2=80=99t see any when I surveyed the Jira issues. I noticed that = &c. is quite common in the KJV margin notes, and front matter. >=20 > Which other XML entities have the same issue? > Likely candidates include < and > > There may be others such as ' and " Yes these are other possible problems. >=20 > Does the issue also pertain to their numerical equivalents, whether in = decimal or hexadecimal form? e.g. &x#0027; We have a Jira issue to convert these to their unicode equivalent. I=E2=80= =99m almost done with that code, having started yesterday. > Any remedy should also take account that some such entities are also = valid when the name is uppercase, e.g. & The remedy is that xmllint will complain as it is not valid in xml. This = should be a friend of all OSIS module makers. Also, osis2mod will properly convert it to &AMP; And it will output = a diagnostic for the conversion. >=20 > Further reading: = https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_refere= nces >=20 > Best regards, >=20 > David >=20 > Sent with Proton Mail <https://pr.tn/ref/SWXT9A5YZ67G> secure email. > _______________________________________________ > sword-devel mailing list: [email protected] = <mailto:[email protected]> > http://crosswire.org/mailman/listinfo/sword-devel > Instructions to unsubscribe/change your settings at above page --Apple-Mail=_1D23B68B-D373-474E-BC57-1434207BAB36 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"content-type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;">See below.<br = id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote = type=3D"cite"><div>On Jul 31, 2025, at 8:53=E2=80=AFAM, David Haslam = <<a href=3D"mailto:dfhdfh-g/[email protected]">dfhdfh-g/[email protected]</a>>= wrote:</div><br class=3D"Apple-interchange-newline"><div><div = style=3D"font-family: Arial, sans-serif; font-size: 14px;">Hi = DM,<br><br>Further to the feedback relating to the recent updates of = the <b>FreGeneve1669</b> module...<br><br>Has anyone yet = created an issue in JIRA for the failure of <b>libsword</b> to = output the <b>&</b> character wherever a module contains = the XML entity <span style=3D"font-family: Menlo, Consolas, = "Courier New", = monospace;">&amp;</span> ?<br></div></div></blockquote><div><br><= /div>I didn=E2=80=99t see any when I surveyed the Jira issues. I noticed = that &c. is quite common in the KJV margin notes, and front = matter.</div><div><br><blockquote type=3D"cite"><div style=3D"font-family:= Arial, sans-serif; font-size: 14px;"><br>Which other XML entities have = the same issue?<br></div><div style=3D"font-family: Arial, sans-serif; = font-size: 14px;"><ul = data-editing-info=3D"{"orderedStyleType":1,"unorderedStyleT= ype":1}" style=3D"margin-top: 0px; margin-bottom: 0px;"><li = style=3D"list-style-type: disc;">Likely candidates include <span = style=3D"font-family: Menlo, Consolas, "Courier New", = monospace;">&lt;</span> and <span style=3D"font-family: = Menlo, Consolas, "Courier New", = monospace;">&gt;</span><br></li><li style=3D"list-style-type: = disc;">There may be others such as <span style=3D"font-family: = Menlo, Consolas, "Courier New", = monospace;">&apos;</span> and <span style=3D"font-family: = Menlo, Consolas, "Courier New", = monospace;">&quot;</span><br></li></ul></div></blockquote><div><br></d= iv>Yes these are other possible problems.</div><div><br><blockquote = type=3D"cite"><div style=3D"font-family: Arial, sans-serif; font-size: = 14px;"><br><div class=3D"protonmail_signature_block"><div = class=3D"protonmail_signature_block-user"><span style=3D"line-height: = normal;">Does the issue also pertain to = their <b>numerical</b> equivalents, </span><span = style=3D"line-height: normal;">whether = in <b>decimal</b> or <b>hexadecimal</b> form? = e.g. </span><span style=3D"line-height: = normal;">&x#0027;</span><span style=3D"font-family: Menlo, Consolas, = "Courier New", = monospace;"><br></span></div></div></div></blockquote><div><br></div>We = have a Jira issue to convert these to their unicode equivalent. I=E2=80=99= m almost done with that code, having started = yesterday.</div><div><br><blockquote type=3D"cite"><div = style=3D"font-family: Arial, sans-serif; font-size: 14px;"><div = class=3D"protonmail_signature_block"><div = class=3D"protonmail_signature_block-user"><span style=3D"line-height: = normal;">Any remedy should also take account that some such entities are = also valid when the name is <b>uppercase</b>, = e.g. </span><span style=3D"font-family: Menlo, Consolas, = "Courier New", monospace; line-height: = normal;">&AMP;</span><span style=3D"font-family: Menlo, Consolas, = "Courier New", = monospace;"><br></span></div></div></div></blockquote><div><br></div>The = remedy is that xmllint will complain as it is not valid in xml. This = should be a friend of all OSIS module = makers.</div><div><br></div><div>Also, osis2mod will properly convert it = to &amp;AMP; And it will output a diagnostic for the = conversion.</div><div><br><blockquote type=3D"cite"><div = style=3D"font-family: Arial, sans-serif; font-size: 14px;"><div = class=3D"protonmail_signature_block"><div = class=3D"protonmail_signature_block-user"><span style=3D"font-family: = Menlo, Consolas, "Courier New", = monospace;"><br></span></div><div = class=3D"protonmail_signature_block-user"><span style=3D"line-height: = normal;">Further reading: </span><a target=3D"_blank" = rel=3D"noreferrer nofollow noopener" = href=3D"https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entit= y_references"><span style=3D"line-height: = normal;">https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_enti= ty_references</span></a></div><div = class=3D"protonmail_signature_block-user"><br></div><div = class=3D"protonmail_signature_block-user">Best = regards,<br><br>David</div><div><br></div><div = class=3D"protonmail_signature_block-proton">Sent with <a = href=3D"https://pr.tn/ref/SWXT9A5YZ67G" target=3D"_blank">Proton = Mail</a> secure = email.</div></div></div>_______________________________________________<br= >sword-devel mailing list: <a = href=3D"mailto:[email protected]">[email protected]</a><br= ><a = href=3D"http://crosswire.org/mailman/listinfo/sword-devel">http://crosswir= e.org/mailman/listinfo/sword-devel</a><br>Instructions to = unsubscribe/change your settings at above = page</blockquote></div></body></html>= --Apple-Mail=_1D23B68B-D373-474E-BC57-1434207BAB36-- --===============3262881876628361583== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ sword-devel mailing list: [email protected] http://crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page --===============3262881876628361583==--