1 USING: kernel xml sequences assocs tools.test io arrays namespaces fry
2 accessors xml.data xml.traversal xml.writer generic sequences.deep multiline ;
6 T{ name f f "sub" "http://littledan.onigirihouse.com/namespaces/replace" }
10 GENERIC: (r-ref) ( xml -- )
16 M: object (r-ref) drop ;
19 [ (r-ref) ] deep-each ;
24 <html xmlns:f='http://littledan.onigirihouse.com/namespaces/replace'>
28 <p f:sub='baz'>paragraph</p>
32 STRING: expected-result
33 <?xml version="1.0" encoding="UTF-8"?>
34 <html xmlns:f="http://littledan.onigirihouse.com/namespaces/replace">
48 : test-refs ( -- string )
52 { "bar" { "blah" T{ tag f T{ name f "" "a" "" } T{ attrs } f } } }
55 sample-doc string>xml dup template pprint-xml>string
58 expected-result '[ _ ] [ test-refs ] unit-test