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 &amp; ?

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 &lt; and &gt;
> There may be others such as &apos; and &quot;

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. &AMP;

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;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 =
&lt;<a href=3D"mailto:dfhdfh-g/[email protected]">dfhdfh-g/[email protected]</a>&gt;=
 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&nbsp;<b>FreGeneve1669</b>&nbsp;module...<br><br>Has anyone yet =
created an issue in JIRA for the failure of&nbsp;<b>libsword</b>&nbsp;to =
output the&nbsp;<b>&amp;</b>&nbsp;character wherever a module contains =
the XML entity&nbsp;<span style=3D"font-family: Menlo, Consolas, =
&quot;Courier New&quot;, =
monospace;">&amp;amp;</span>&nbsp;?<br></div></div></blockquote><div><br><=
/div>I didn=E2=80=99t see any when I surveyed the Jira issues. I noticed =
that &amp;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"{&quot;orderedStyleType&quot;:1,&quot;unorderedStyleT=
ype&quot;:1}" style=3D"margin-top: 0px; margin-bottom: 0px;"><li =
style=3D"list-style-type: disc;">Likely candidates include&nbsp;<span =
style=3D"font-family: Menlo, Consolas, &quot;Courier New&quot;, =
monospace;">&amp;lt;</span>&nbsp;and&nbsp;<span style=3D"font-family: =
Menlo, Consolas, &quot;Courier New&quot;, =
monospace;">&amp;gt;</span><br></li><li style=3D"list-style-type: =
disc;">There may be others such as&nbsp;<span style=3D"font-family: =
Menlo, Consolas, &quot;Courier New&quot;, =
monospace;">&amp;apos;</span>&nbsp;and&nbsp;<span style=3D"font-family: =
Menlo, Consolas, &quot;Courier New&quot;, =
monospace;">&amp;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&nbsp;<b>numerical</b>&nbsp;equivalents,&nbsp;</span><span =
style=3D"line-height: normal;">whether =
in&nbsp;<b>decimal</b>&nbsp;or&nbsp;<b>hexadecimal</b>&nbsp;form?&nbsp; =
e.g.&nbsp;</span><span style=3D"line-height: =
normal;">&amp;x#0027;</span><span style=3D"font-family: Menlo, Consolas, =
&quot;Courier New&quot;, =
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&nbsp;<b>uppercase</b>, =
e.g.&nbsp;</span><span style=3D"font-family: Menlo, Consolas, =
&quot;Courier New&quot;, monospace; line-height: =
normal;">&amp;AMP;</span><span style=3D"font-family: Menlo, Consolas, =
&quot;Courier New&quot;, =
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;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, &quot;Courier New&quot;, =
monospace;"><br></span></div><div =
class=3D"protonmail_signature_block-user"><span style=3D"line-height: =
normal;">Further reading:&nbsp;</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&nbsp;<a =
href=3D"https://pr.tn/ref/SWXT9A5YZ67G" target=3D"_blank">Proton =
Mail</a>&nbsp;secure =
email.</div></div></div>_______________________________________________<br=
>sword-devel mailing list:&nbsp;<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==--