Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,40 +0,0 @@
with Ada.Strings.Unbounded;
with Ada.Text_IO.Text_Streams;
with DOM.Core.Documents;
with DOM.Core.Elements;
with DOM.Core.Nodes;
procedure Character_Remarks is
package DC renames DOM.Core;
package IO renames Ada.Text_IO;
package US renames Ada.Strings.Unbounded;
type Remarks is record
Name : US.Unbounded_String;
Text : US.Unbounded_String;
end record;
type Remark_List is array (Positive range <>) of Remarks;
My_Remarks : Remark_List :=
((US.To_Unbounded_String ("April"),
US.To_Unbounded_String ("Bubbly: I'm > Tam and <= Emily")),
(US.To_Unbounded_String ("Tam O'Shanter"),
US.To_Unbounded_String ("Burns: ""When chapman billies leave the street ...""")),
(US.To_Unbounded_String ("Emily"),
US.To_Unbounded_String ("Short & shrift")));
My_Implementation : DC.DOM_Implementation;
My_Document : DC.Document := DC.Create_Document (My_Implementation);
My_Root_Node : DC.Element := DC.Nodes.Append_Child (My_Document,
DC.Documents.Create_Element (My_Document, "CharacterRemarks"));
My_Element_Node : DC.Element;
My_Text_Node : DC.Text;
begin
for I in My_Remarks'Range loop
My_Element_Node := DC.Nodes.Append_Child (My_Root_Node,
DC.Documents.Create_Element (My_Document, "Character"));
DC.Elements.Set_Attribute (My_Element_Node, "Name", US.To_String (My_Remarks (I).Name));
My_Text_Node := DC.Nodes.Append_Child (My_Element_Node,
DC.Documents.Create_Text_Node (My_Document, US.To_String (My_Remarks (I).Text)));
end loop;
DC.Nodes.Write (IO.Text_Streams.Stream (IO.Standard_Output),
N => My_Document,
Pretty_Print => True);
end Character_Remarks;

View file

@ -1,53 +0,0 @@
with Ada.Wide_Wide_Text_IO;
with League.Strings;
with XML.SAX.Attributes;
with XML.SAX.Pretty_Writers;
procedure Main is
function "+"
(Item : Wide_Wide_String) return League.Strings.Universal_String
renames League.Strings.To_Universal_String;
type Remarks is record
Name : League.Strings.Universal_String;
Remark : League.Strings.Universal_String;
end record;
type Remarks_Array is array (Positive range <>) of Remarks;
------------
-- Output --
------------
procedure Output (Remarks : Remarks_Array) is
Writer : XML.SAX.Pretty_Writers.SAX_Pretty_Writer;
Attributes : XML.SAX.Attributes.SAX_Attributes;
begin
Writer.Set_Offset (2);
Writer.Start_Document;
Writer.Start_Element (Qualified_Name => +"CharacterRemarks");
for J in Remarks'Range loop
Attributes.Clear;
Attributes.Set_Value (+"name", Remarks (J).Name);
Writer.Start_Element
(Qualified_Name => +"Character", Attributes => Attributes);
Writer.Characters (Remarks (J).Remark);
Writer.End_Element (Qualified_Name => +"Character");
end loop;
Writer.End_Element (Qualified_Name => +"CharacterRemarks");
Writer.End_Document;
Ada.Wide_Wide_Text_IO.Put_Line (Writer.Text.To_Wide_Wide_String);
end Output;
begin
Output
(((+"April", +"Bubbly: I'm > Tam and <= Emily"),
(+"Tam O'Shanter", +"Burns: ""When chapman billies leave the street ..."""),
(+"Emily", +"Short & shrift")));
end Main;