Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
36
Task/XML-Output/Lasso/xml-output-1.lasso
Normal file
36
Task/XML-Output/Lasso/xml-output-1.lasso
Normal 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`)
|
||||
)
|
||||
8
Task/XML-Output/Lasso/xml-output-2.lasso
Normal file
8
Task/XML-Output/Lasso/xml-output-2.lasso
Normal 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 > Tam and <= Emily</Character>
|
||||
<Character name="Tam O'Shanter">Burns: "When chapman billies leave the street ..."</Character>
|
||||
<Character name="Emily">Short & shrift</Character>
|
||||
</CharacterRemarks>
|
||||
|
After Width: | Height: | Size: 456 B |
Loading…
Add table
Add a link
Reference in a new issue