Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
41
Task/XML-Output/Forth/xml-output.fth
Normal file
41
Task/XML-Output/Forth/xml-output.fth
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
include ffl/est.fs
|
||||
include ffl/xos.fs
|
||||
|
||||
\ Input lists
|
||||
0 value names
|
||||
here ," Emily"
|
||||
here ," Tam O'Shanter"
|
||||
here ," April"
|
||||
here to names
|
||||
, , ,
|
||||
|
||||
0 value remarks
|
||||
here ," Short & shrift"
|
||||
here ,\" Burns: \"When chapman billies leave the street ...\""
|
||||
here ," Bubbly: I'm > Tam and <= Emily"
|
||||
here to remarks
|
||||
, , ,
|
||||
|
||||
: s++ ( c-addr1 -- c-addr2 c-addr3 u3 )
|
||||
dup cell+ swap @ count
|
||||
;
|
||||
|
||||
\ Create xml writer
|
||||
tos-create xml
|
||||
|
||||
: create-xml ( c-addr1 c-addr2 -- )
|
||||
0 s" CharacterRemarks" xml xos-write-start-tag
|
||||
3 0 DO
|
||||
swap s++ s" name" 2swap 1
|
||||
s" Character" xml xos-write-start-tag
|
||||
swap s++ xml xos-write-text
|
||||
s" Character" xml xos-write-end-tag
|
||||
LOOP
|
||||
drop drop
|
||||
s" CharacterRemarks" xml xos-write-end-tag
|
||||
;
|
||||
|
||||
names remarks create-xml
|
||||
|
||||
\ Output xml string
|
||||
xml str-get type cr
|
||||
Loading…
Add table
Add a link
Reference in a new issue