comp.lang.ada
 help / color / mirror / Atom feed
From: "196...@googlemail.com" <1963bib@googlemail.com>
Subject: XMLAda & unicode symbols
Date: Sat, 19 Jun 2021 11:28:54 -0700 (PDT)	[thread overview]
Message-ID: <f9f32d7f-2265-4dd5-8bcb-c477ca449cf3n@googlegroups.com> (raw)

I'm creating SVG files with XMLAda and I need to have a degree symbol within some text.

I have:
procedure Add_Min_Max (Min_Max_Str : String; X_Pos : String; Y_Pos : String) is
      Text_Node : DOM.Core.Element;
      Text      : DOM.Core.Text;
   begin
      Text_Node := DOM.Core.Documents.Create_Element (LDocument, "text");
      DOM.Core.Elements.Set_Attribute (Text_Node, "x", X_Pos);
      DOM.Core.Elements.Set_Attribute (Text_Node, "y", Y_Pos);
      DOM.Core.Elements.Set_Attribute (Text_Node, "class", "def-maroon");
      DOM.Core.Elements.Set_Attribute (Text_Node, "text-anchor", "left");
      Text_Node := DOM.Core.Nodes.Append_Child (Root_Node, Text_Node);
      Text := DOM.Core.Documents.Create_Text_Node (LDocument, Min_Max_Str);
      Text := DOM.Core.Nodes.Append_Child (Text_Node, Text);
   end Add_Min_Max;

and I just pass a string in. The degree symbol is unicode 00B0 and you would then normally have it as &#00B0, except if I do, then XMLAda changes that initial '&' to '&amp' and so what is then  coded is '&amp#00B0' and it fails to display properly.

Nor can I apply Unicode.Names.Latin_1_Supplement.Degree_Sign to the string, since, well, strict typing...

To me it seems like XMLAda is being far too eager and is not willing to just publish what I enter.

I raised a call on the github repository, but it was closed saying basically use the unicode name, which fails.

Does anyone have a clue how this can be done?

             reply	other threads:[~2021-06-19 18:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19 18:28 196...@googlemail.com [this message]
2021-06-19 19:53 ` XMLAda & unicode symbols Jeffrey R. Carter
2021-06-20 17:02   ` 196...@googlemail.com
2021-06-20 17:23     ` Dmitry A. Kazakov
2021-06-20 17:58       ` 196...@googlemail.com
2021-06-20 18:16         ` Dmitry A. Kazakov
2021-06-21 19:40           ` 196...@googlemail.com
2021-06-21 20:18             ` Dmitry A. Kazakov
2021-06-21 15:37         ` Simon Wright
2021-06-21 19:49           ` 196...@googlemail.com
2021-06-21 20:23             ` Dmitry A. Kazakov
2021-06-21 20:47             ` Simon Wright
2021-06-22  0:30             ` Spiros Bousbouras
2021-06-20 18:21     ` Jeffrey R. Carter
2021-06-20 18:47       ` Dmitry A. Kazakov
2021-06-20 22:50         ` Jeffrey R. Carter
2021-06-21  4:16           ` Marius Amado-Alves
2021-06-21  9:39             ` Jeffrey R. Carter
2021-06-21  6:14           ` Dmitry A. Kazakov
2021-06-19 21:24 ` Simon Wright
2021-06-20 17:10   ` 196...@googlemail.com
2021-06-21 15:26     ` Simon Wright
2021-06-21 18:33       ` Emmanuel Briot
2021-06-21 20:06         ` 196...@googlemail.com
2021-06-21 21:26         ` Simon Wright
2021-06-22  6:52           ` Emmanuel Briot
2021-06-21 21:22       ` Simon Wright
2021-06-21  6:07 ` Vadim Godunko
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox