<p dir="ltr">Yes, that was my point. However, Sword does not use standard XML parsing tools that operate this way and thus we might be able to handle an entity and the raw character differently. This would still permitting the file to validate with standard XML tools as well.</p>
<p dir="ltr">--Greg</p>
<div class="gmail_quote">On Dec 12, 2014 8:52 AM, &quot;Sebastien KOECHLIN&quot; &lt;<a href="mailto:seb.sword@koocotte.org">seb.sword@koocotte.org</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
In fact, an entity can store more than a single character. It can be a string (less<br>
common) or a more complex structure (I&#39;ve never seen it in real usage).<br>
<br>
See<br>
<a href="http://msdn.microsoft.com/en-US/en-en/library/ms256483%28v=vs.110%29.aspx" target="_blank">http://msdn.microsoft.com/en-US/en-en/library/ms256483%28v=vs.110%29.aspx</a><br>
for examples.<br>
<br>
<br>
To answer Greg, when you read an XML file, you create a memory tree<br>
structure of elements (having attributes) and text nodes (and less common<br>
nodes: comments, processing instructions...).<br>
<br>
When the text node is parsed, any escaping or entity is substitued with its<br>
final value, resulting in a &quot;canonical&quot; string.  You can not tell if any<br>
character was put raw in the file, or if it was an entity.  So &quot;Sword&quot;,<br>
&quot;&amp;#83;word&quot;, &quot;&amp;#x53;word&quot; and &quot;&lt;[CDATA[Sword]]&gt;&quot; result in the same text<br>
node. You don&#39;t have to care how the text was writen in the file, you got<br>
the same final result.<br>
<br>
<br>
HTTP (not HTML) use a different encoding system with %&lt;hexa&gt;, (for example<br>
%20 for space) that allow to mix easilly both escaping systems.  This could<br>
be used for escaping space(%20), colons(%3A) and percents(%25) in gloss,<br>
lemma and morph.  It should allow to represent any character in the content.<br>
<br>
<br>
<br>
On Fri, Dec 12, 2014 at 08:01:31AM -0600, Greg Hellings wrote:<br>
&gt; If that&#39;s the case, how does it handle escaping &lt;&gt;? I believe entity<br>
&gt; replacement is after XML validation but before passing them to a<br>
&gt; transformer or such.<br>
&gt; On Dec 12, 2014 7:52 AM, &quot;DM Smith&quot; &lt;<a href="mailto:dmsmith@crosswire.org">dmsmith@crosswire.org</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Best I can recall:<br>
&gt; &gt; Nope. An entity is merely an alternate way of specifying a character. The<br>
&gt; &gt; XML parser is supposed to replace the entity with the corresponding code<br>
&gt; &gt; point before the value is evaluated against the schema.<br>
&gt; &gt;<br>
&gt; &gt; On Dec 12, 2014, at 8:49 AM, Greg Hellings &lt;<a href="mailto:greg.hellings@gmail.com">greg.hellings@gmail.com</a>&gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; It should be possible to escape any such characters with an XML entity, no?<br>
&gt; &gt; On Dec 12, 2014 7:44 AM, &quot;DM Smith&quot; &lt;<a href="mailto:dmsmith@crosswire.org">dmsmith@crosswire.org</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt; On Dec 12, 2014, at 8:26 AM, Peter Von Kaehne &lt;<a href="mailto:refdoc@gmx.net">refdoc@gmx.net</a>&gt; wrote:<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Gesendet: Freitag, 12. Dezember 2014 um 13:16 Uhr<br>
&gt; &gt;&gt; &gt; Von: &quot;Troy A. Griffitts&quot; &lt;<a href="mailto:scribe@crosswire.org">scribe@crosswire.org</a>&gt;<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;&gt; Not sure, but I thought we used optional prefixes to specify the kind<br>
&gt; &gt;&gt; of gloss if there are multiple, e.g., &gt; gloss=&quot;en_US:18&amp;nbsp;wheeler<br>
&gt; &gt;&gt; en_UK:articulated&amp;nbsp;lorry&quot;<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Should there be an option to escape colons?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; IMHO:<br>
&gt; &gt;&gt; Yes.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The definition of gloss in the schema is xs:string, not osisGenRegex.<br>
&gt; &gt;&gt; The former places no semantic on the content an allows for an empty<br>
&gt; &gt;&gt; string.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; If gloss should have a semantic, then it should be changed in the OSIS<br>
&gt; &gt;&gt; spec.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The latter is used by lemma and morph and is specified as:<br>
&gt; &gt;&gt; ((((\p{L}|\p{N}|_)+)(\.(\p{L}|\p{N}|_))*:)?([^:\s])+)<br>
&gt; &gt;&gt; which basically is work:value.<br>
&gt; &gt;&gt; If I read this right it does not allow for :  to be escaped. I know we<br>
&gt; &gt;&gt; allow lemma=“x:a y:b” but I don’t see that this allows for the pattern to<br>
&gt; &gt;&gt; be repeated, separated by spaces.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The pattern would need to change ([^:\s])+ to (\\:|[^:\s])+  [ not<br>
&gt; &gt;&gt; tested ]<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; In His Service,<br>
&gt; &gt;&gt;         DM<br>
&gt; &gt;&gt; _______________________________________________<br>
&gt; &gt;&gt; sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
&gt; &gt;&gt; <a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
&gt; &gt;&gt; Instructions to unsubscribe/change your settings at above page<br>
&gt; &gt;<br>
<br>
_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page</blockquote></div>