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 : directive, ( string -- ) <directive> , ;
9 : instruction, ( string -- ) <instruction> , ;
12 : (tag,) ( name attrs quot -- tag )
13 -rot >r >r V{ } make r> r> rot <tag> ; inline
14 : tag*, ( name attrs quot -- )
17 : contained*, ( name attrs -- )
20 : tag, ( name quot -- ) f swap tag*, ; inline
21 : contained, ( name -- ) f contained*, ; inline
23 : make-xml* ( name attrs quot -- xml )
24 (tag,) build-xml ; inline
25 : make-xml ( name quot -- xml )
26 f swap make-xml* ; inline