[Cuis-dev] YAXO and entity

Juan Vuletich juan at jvuletich.org
Mon Sep 27 12:00:48 PDT 2021


This is my second take. Please review it (and disregard my previous 
proposal).

What I did is to enable the NCR decoding in YAXO, but if the result is 
not a valid Cuis Character, then embed the NCR in the answer, as the 
examples in the commet at String >> #asUtf8:

Output looks reasonable, and as I said before, I suggest sending 
#withCuisLineEndings prior to filing into Cuis.

Thanks,

On 9/27/2021 3:25 PM, Juan Vuletich via Cuis-dev wrote:
> On 9/27/2021 2:52 PM, Hilaire Fernandes via Cuis-dev wrote:
>>
>> Should not decoding the xml entity 
 	  etc. be done in the 
>> YAXO package.
>>
>> Enabling entity decoding in the nextPCData method make the xml entity 
>> correctly decoded:
>>
>>    nextChar == $&
>>         ifTrue: [
>>             self next.
>>             self peek == $#
>>                 ifTrue: [
>>                     nextPeek _ nil.
>>                     nextChar _ self nextCharReference]
>>
>>
>> But it is disabled in YAXO, likely there is a reason for that.
>>
>> Hilaire
>>
>
> Oh. I wasn't aware of that code, at least not nowadays!
>
> I guess I disabled it when porting to Cuis. If this can be enabled, 
> the code I posted earlier today is not needed. But it only should 
> decode NCRs that can be represented in a Cuis Character (as Cuis 
> Character can not represent full Unicode). I'll give it a try, and 
> post some code later.
>
>> Le 27/09/2021 à 12:52, Juan Vuletich a écrit :
>>> I don't know the XML spec in full detail, but it looks like the 
>>> conversions in the attach are needed. Anyone knows better?
>> -- 
>> GNU Dr. Geo
>> http://drgeo.eu
>> http://blog.drgeo.eu
>
> Thanks,
> -- 
> Juan Vuletich
> www.cuis-smalltalk.org
> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
> https://github.com/jvuletich
> https://www.linkedin.com/in/juan-vuletich-75611b3
> @JuanVuletich


-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210927/806dd75e/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: UnsavedChangesTo-YAXO-jmv.002.cs.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210927/806dd75e/attachment-0001.ksh>


More information about the Cuis-dev mailing list