fix xml for new accessors

db4
Doug Coleman 2008-09-02 00:45:40 -05:00
parent 52acaa47e7
commit 046b8b9cbe
2 changed files with 5 additions and 5 deletions
basis/xml

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences sequences.private assocs arrays
delegate.protocols delegate vectors accessors multiline
macros words quotations combinators ;
macros words quotations combinators slots ;
IN: xml.data
TUPLE: name space main url ;
@ -89,7 +89,7 @@ TUPLE: tag name attrs children ;
tag boa ;
! For convenience, tags follow the assoc protocol too (for attrs)
CONSULT: assoc-protocol tag tag-attrs ;
CONSULT: assoc-protocol tag attrs>> ;
INSTANCE: tag assoc
! They also follow the sequence protocol (for children)
@ -100,14 +100,14 @@ CONSULT: name tag name>> ;
M: tag like
over tag? [ drop ] [
[ name>> ] keep tag-attrs
[ name>> ] keep attrs>>
rot dup [ V{ } like ] when <tag>
] if ;
MACRO: clone-slots ( class -- tuple )
[
"slots" word-prop
[ reader>> 1quotation [ clone ] compose ] map
[ name>> reader-word 1quotation [ clone ] compose ] map
[ cleave ] curry
] [ [ boa ] curry ] bi compose ;

View File

@ -171,7 +171,7 @@ M: bad-directive summary ( obj -- str )
[
dup call-next-method write
"Misplaced directive:" print
bad-directive-dir write-item nl
dir>> write-item nl
] with-string-writer ;
UNION: xml-parse-error multitags notags extra-attrs nonexist-ns