Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,36 @@
define character2xml(names::array, remarks::array) => {
fail_if(#names -> size != #remarks -> size, -1, 'Input arrays not of same size')
local(
domimpl = xml_domimplementation,
doctype = #domimpl -> createdocumenttype(
'svg:svg',
'-//W3C//DTD SVG 1.1//EN',
'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'
),
character_xml = #domimpl -> createdocument(
'http://www.w3.org/2000/svg',
'svg:svg',
#docType
),
csnode = #character_xml -> createelement('CharacterRemarks'),
charnode
)
#character_xml -> appendChild(#csnode)
loop(#names -> size) => {
#charnode = #character_xml -> createelement('Character')
#charnode -> setAttribute('name', #names -> get(loop_count))
#charnode -> nodeValue = encode_xml(#remarks -> get(loop_count))
#csnode -> appendChild(#charnode)
}
return #character_xml
}
character2xml(
array(`April`, `Tam O'Shanter`, `Emily`),
array(`Bubbly: I'm > Tam and <= Emily`, `Burns: "When chapman billies leave the street ..."`, `Short & shrift`)
)

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:svg="http://www.w3.org/2000/svg"/>
<CharacterRemarks>
<Character name="April">Bubbly: I'm &gt; Tam and &lt;= Emily</Character>
<Character name="Tam O'Shanter">Burns: "When chapman billies leave the street ..."</Character>
<Character name="Emily">Short &amp; shrift</Character>
</CharacterRemarks>

After

Width:  |  Height:  |  Size: 456 B