1 ! Copyright (C) 2006, 2007 Daniel Ehrenberg
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: namespaces make kernel xml.data xml.utilities assocs
7 : comment, ( string -- ) <comment> , ;
8 : instruction, ( string -- ) <instruction> , ;
11 : (tag,) ( name attrs quot -- tag )
12 -rot [ V{ } make ] 2dip rot <tag> ; inline
13 : tag*, ( name attrs quot -- )
16 : contained*, ( name attrs -- )
19 : tag, ( name quot -- ) f swap tag*, ; inline
20 : contained, ( name -- ) f contained*, ; inline
22 : make-xml* ( name attrs quot -- xml )
23 (tag,) build-xml ; inline
24 : make-xml ( name quot -- xml )
25 f swap make-xml* ; inline