<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Never mind.<br>
    <br>
    If you later find some time to review the code, disregard my first
    proposal, and check what I've just sent to the list:
    UnsavedChangesTo-YAXO-jmv.002.cs.st . This changeset enables the
    conversion that Hilaire found disabled in YAXO, but only if the
    result is a valid Cuis Character.<br>
    <br>
    Thanks,<br>
    <br>
    On 9/27/2021 3:15 PM, Phil B via Cuis-dev wrote:
    <blockquote
cite="mid:CAMJMOegSQX8c4==acLPTag5YZkG1NYXpKK8_pUYyiLrQZWzu4g@mail.gmail.com"
      type="cite">
      <div dir="auto">Sorry, I didn't have time to review the code.  I
        just mentioned these in case you were considering changing YAXO
        behavior.  Disregard if not helpful. :-)</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Sep 27, 2021, 2:09 PM
          Juan Vuletich <<a moz-do-not-send="true"
            href="mailto:juan@jvuletich.org">juan@jvuletich.org</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000"> On 9/27/2021 1:10 PM,
            Phil B via Cuis-dev wrote:
            <blockquote type="cite">
              <div dir="ltr">
                <div dir="ltr">Juan,
                  <div><br>
                  </div>
                  <div>Two things:</div>
                  <div><br>
                  </div>
                  <div>1) When reading XML files you have to be able to
                    consume CR and/or LF as the majority of XML files
                    are going to come from non-Smalltalk sources using
                    who-knows-what conventions.  This goes for the
                    structure as well as the content.  So we can't say
                    'just use LF'.  It is fine (even preferred) to emit
                    only LF (for a generic end of line, not an encoded
                    entity) when writing XML files.  See <a
                      moz-do-not-send="true"
                      href="https://www.w3.org/TR/REC-xml/#sec-line-ends"
                      target="_blank" rel="noreferrer">https://www.w3.org/TR/REC-xml/#sec-line-ends</a></div>
                </div>
              </div>
            </blockquote>
            <br>
            Isn't this currently the case? Can you attach an XML (inside
            a zip!) showing it is not?<br>
            <br>
            <blockquote type="cite">
              <div dir="ltr">
                <div dir="ltr">
                  <div>2) When you want to ensure your CR's and/or LF's
                    are preserved 'as is' in attributes/nodes, they need
                    to be encoded as Hilaire is doing.  They need to be
                    unencoded along with other entities when parsed.</div>
                </div>
              </div>
            </blockquote>
            <br>
            Same as before. Isn't this the case? Do you have an example
            to show otherwise?<br>
            <br>
            <blockquote type="cite">
              <div dir="ltr">
                <div dir="ltr">
                  <div>If you don't encode your CR's inside
                    attributes/nodes, I believe many/most XML generators
                    will translate them to LF's (or even omit them) when
                    the XML file is written per item 1.  Now whether or
                    not Hilaire's code should want the CR's encoded is a
                    valid point to consider as that's a content question
                    rather than an XML one.  But it is valid from an XML
                    standpoint to do what he is doing.</div>
                </div>
              </div>
            </blockquote>
            <br>
            Of course. I guess you didn't see or try the code I attached
            on Hilaire's example.<br>
            <br>
            My suggestion was to ask # withCuisLineEndings to the
            Smalltalk code extracted from the XML, prior to filing it
            into Cuis, so Cuis code will honor the Cuis convention. In
            any case, it is not really mandatory. Cuis will compile and
            run Smalltalk code in any line ending convention...<br>
            <br>
            <blockquote type="cite">
              <div dir="ltr">
                <div dir="ltr">
                  <div>Thanks,<br>
                  </div>
                  <div>Phil</div>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">On Mon, Sep 27, 2021
                    at 6:53 AM Juan Vuletich via Cuis-dev <<a
                      moz-do-not-send="true"
                      href="mailto:cuis-dev@lists.cuis.st"
                      target="_blank" rel="noreferrer">cuis-dev@lists.cuis.st</a>>

                    wrote:<br>
                  </div>
                  <blockquote class="gmail_quote" style="margin: 0px 0px
                    0px 0.8ex; border-left: 1px solid rgb(204, 204,
                    204); padding-left: 1ex;">
                    <div bgcolor="#ffffff"> On 9/26/2021 10:27 AM,
                      Hilaire Fernandes via Cuis-dev wrote:
                      <blockquote type="cite">
                        <p><font size="+1">Hi Nicolas, <br>
                          </font></p>
                        <p><font size="+1">I can read most of DrGeo xml
                            files, only xml entity like &#13;
                            (carriage return I guess) and &#9;
                            (tabulation) are not translated and kept as
                            is when I read the file.<br>
                          </font></p>
                        <p>Hilaire<br>
                        </p>
                        <div>Le 26/09/2021 à 10:57, Nicola Mingotti a
                          écrit :<br>
                        </div>
                        <blockquote type="cite">
                          <div dir="auto">i was parsing successfully a
                            libreoffice file with YAXO. </div>
                        </blockquote>
                        <pre cols="72">-- 
GNU Dr. Geo
<a moz-do-not-send="true" href="http://drgeo.eu" target="_blank" rel="noreferrer">http://drgeo.eu</a>
<a moz-do-not-send="true" href="http://blog.drgeo.eu" target="_blank" rel="noreferrer">http://blog.drgeo.eu</a></pre>
                      </blockquote>
                      <br>
                      It looks like the attached works. Test adding
                      #withCuisLineEndings, so that CR characters from
                      Pharo are converted to LF:<br>
                      <br>
                      | doc |<br>
                      doc _ XMLDOMParser parseDocumentFrom:  'Curve and
                      slope.fgeo' asFileEntry readStream.<br>
                      ((doc elementAt: #drgenius) firstTagNamed: #code)
                      contentString withCuisLineEndings.<br>
                      <br>
                      I don't know the XML spec in full detail, but it
                      looks like the conversions in the attach are
                      needed. Anyone knows better?<br>
                      <br>
                      Thanks,<br>
                      <pre cols="72">-- 
Juan Vuletich
<a moz-do-not-send="true" href="http://www.cuis-smalltalk.org" target="_blank" rel="noreferrer">www.cuis-smalltalk.org</a>
<a moz-do-not-send="true" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" target="_blank" rel="noreferrer">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a moz-do-not-send="true" href="https://github.com/jvuletich" target="_blank" rel="noreferrer">https://github.com/jvuletich</a>
<a moz-do-not-send="true" href="https://www.linkedin.com/in/juan-vuletich-75611b3" target="_blank" rel="noreferrer">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
                    </div>
                    -- <br>
                    Cuis-dev mailing list<br>
                    <a moz-do-not-send="true"
                      href="mailto:Cuis-dev@lists.cuis.st"
                      target="_blank" rel="noreferrer">Cuis-dev@lists.cuis.st</a><br>
                    <a moz-do-not-send="true"
                      href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
                      rel="noreferrer noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
                  </blockquote>
                </div>
              </div>
            </blockquote>
            <br>
            Thanks,<br>
            <pre cols="72">-- 
Juan Vuletich
<a moz-do-not-send="true" href="http://www.cuis-smalltalk.org" target="_blank" rel="noreferrer">www.cuis-smalltalk.org</a>
<a moz-do-not-send="true" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" target="_blank" rel="noreferrer">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a moz-do-not-send="true" href="https://github.com/jvuletich" target="_blank" rel="noreferrer">https://github.com/jvuletich</a>
<a moz-do-not-send="true" href="https://www.linkedin.com/in/juan-vuletich-75611b3" target="_blank" rel="noreferrer">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
  </body>
</html>