diff --git a/basis/farkup/farkup.factor b/basis/farkup/farkup.factor
index ebd0bdb748..a752694764 100755
--- a/basis/farkup/farkup.factor
+++ b/basis/farkup/farkup.factor
@@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays combinators html.elements io
io.streams.string kernel math namespaces peg peg.ebnf
-sequences sequences.deep strings xml.entities xml.interpolate
+sequences sequences.deep strings xml.entities xml.literals
vectors splitting xmode.code2html urls.encoding xml.data
xml.writer ;
IN: farkup
diff --git a/basis/html/components/authors.txt b/basis/html/components/authors.txt
index 1901f27a24..a44f8d7f8d 100644
--- a/basis/html/components/authors.txt
+++ b/basis/html/components/authors.txt
@@ -1 +1,2 @@
Slava Pestov
+Daniel Ehrenberg
diff --git a/basis/html/components/components.factor b/basis/html/components/components.factor
index 462c9b3c78..eec7508c5e 100644
--- a/basis/html/components/components.factor
+++ b/basis/html/components/components.factor
@@ -1,10 +1,10 @@
-! Copyright (C) 2008 Slava Pestov
+! Copyright (C) 2008, 2009 Slava Pestov, Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel namespaces io math.parser assocs classes
classes.tuple words arrays sequences splitting mirrors
hashtables combinators continuations math strings inspector
fry locals calendar calendar.format xml.entities xml.data
-validators urls present xml.writer xml.interpolate xml
+validators urls present xml.writer xml.literals xml
xmode.code2html lcs.diff2html farkup io.streams.string
html.elements html.streams html.forms ;
IN: html.components
diff --git a/basis/html/elements/elements.factor b/basis/html/elements/elements.factor
index a6e1928f83..005d67f221 100644
--- a/basis/html/elements/elements.factor
+++ b/basis/html/elements/elements.factor
@@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: io io.styles kernel namespaces prettyprint quotations
sequences strings words xml.entities compiler.units effects
-xml.data xml.interpolate urls math math.parser combinators
+xml.data xml.literals urls math math.parser combinators
present fry io.streams.string xml.writer ;
IN: html.elements
diff --git a/basis/lcs/diff2html/diff2html.factor b/basis/lcs/diff2html/diff2html.factor
index ee303cc5a5..16e6cc8d97 100644
--- a/basis/lcs/diff2html/diff2html.factor
+++ b/basis/lcs/diff2html/diff2html.factor
@@ -1,6 +1,6 @@
! Copyright (C) 2008 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
-USING: lcs xml.interpolate xml.writer kernel strings ;
+USING: lcs xml.literals xml.writer kernel strings ;
FROM: accessors => item>> ;
FROM: io => write ;
FROM: sequences => each if-empty when-empty map ;
diff --git a/basis/syndication/syndication.factor b/basis/syndication/syndication.factor
index 76da6f049d..4cd5ef17b3 100755
--- a/basis/syndication/syndication.factor
+++ b/basis/syndication/syndication.factor
@@ -4,7 +4,7 @@
USING: xml.utilities kernel assocs math.order
strings sequences xml.data xml.writer
io.streams.string combinators xml xml.entities.html io.files io
- http.client namespaces make xml.interpolate hashtables
+ http.client namespaces make xml.literals hashtables
calendar.format accessors continuations urls present ;
IN: syndication
diff --git a/basis/xml-rpc/xml-rpc.factor b/basis/xml-rpc/xml-rpc.factor
index 52e175ca3a..d9028756f2 100644
--- a/basis/xml-rpc/xml-rpc.factor
+++ b/basis/xml-rpc/xml-rpc.factor
@@ -1,9 +1,9 @@
-! Copyright (C) 2005, 2006 Daniel Ehrenberg
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel xml arrays math generic http.client
combinators hashtables namespaces io base64 sequences strings
calendar xml.data xml.writer xml.utilities assocs math.parser
-debugger calendar.format math.order xml.interpolate xml.dispatch ;
+debugger calendar.format math.order xml.literals xml.dispatch ;
IN: xml-rpc
! * Sending RPC requests
diff --git a/basis/xml/autoencoding/autoencoding.factor b/basis/xml/autoencoding/autoencoding.factor
index 20a661cfa7..fe4762acbe 100644
--- a/basis/xml/autoencoding/autoencoding.factor
+++ b/basis/xml/autoencoding/autoencoding.factor
@@ -6,11 +6,14 @@ io.encodings.string io.encodings combinators accessors
xml.data io.encodings.iana ;
IN: xml.autoencoding
+: decode-stream ( encoding -- )
+ spot get [ swap re-decode ] change-stream drop ;
+
: continue-make-tag ( str -- tag )
parse-name-starting middle-tag end-tag ;
: start-utf16le ( -- tag )
- utf16le decode-input
+ utf16le decode-stream
"?\0" expect
check instruct ;
@@ -22,25 +25,25 @@ IN: xml.autoencoding
! that the first letter of the document is < and second is
! not ASCII
ascii?
- [ utf8 decode-input next make-tag ] [
+ [ utf8 decode-stream next make-tag ] [
next
[ get-next 10xxxxxx? not ] take-until
get-char suffix utf8 decode
- utf8 decode-input next
+ utf8 decode-stream next
continue-make-tag
] if ;
: prolog-encoding ( prolog -- )
encoding>> dup "UTF-16" =
- [ drop ] [ name>encoding [ decode-input ] when* ] if ;
+ [ drop ] [ name>encoding [ decode-stream ] when* ] if ;
: instruct-encoding ( instruct/prolog -- )
dup prolog?
[ prolog-encoding ]
- [ drop utf8 decode-input ] if ;
+ [ drop utf8 decode-stream ] if ;
: go-utf8 ( -- )
- check utf8 decode-input next next ;
+ check utf8 decode-stream next next ;
: start< ( -- tag )
! What if first letter of processing instruction is non-ASCII?
@@ -52,11 +55,11 @@ IN: xml.autoencoding
} case ;
: skip-utf8-bom ( -- tag )
- "\u0000bb\u0000bf" expect utf8 decode-input
+ "\u0000bb\u0000bf" expect utf8 decode-stream
"<" expect check make-tag ;
: decode-expecting ( encoding string -- tag )
- [ decode-input next ] [ expect ] bi* check make-tag ;
+ [ decode-stream next ] [ expect ] bi* check make-tag ;
: start-utf16be ( -- tag )
utf16be "<" decode-expecting ;
@@ -74,6 +77,6 @@ IN: xml.autoencoding
{ HEX: EF [ skip-utf8-bom ] }
{ HEX: FF [ skip-utf16le-bom ] }
{ HEX: FE [ skip-utf16be-bom ] }
- [ drop utf8 decode-input check f ]
+ [ drop utf8 decode-stream check f ]
} case ;
diff --git a/basis/xml/char-classes/char-classes.factor b/basis/xml/char-classes/char-classes.factor
index b47d4c66df..d510c8a881 100644
--- a/basis/xml/char-classes/char-classes.factor
+++ b/basis/xml/char-classes/char-classes.factor
@@ -1,6 +1,7 @@
-! Copyright (C) 2005, 2007 Daniel Ehrenberg
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences unicode.syntax math math.order combinators ;
+USING: kernel sequences unicode.syntax math math.order combinators
+hints ;
IN: xml.char-classes
CATEGORY: 1.0name-start* Ll Lu Lo Lt Nl \u000559\u0006E5\u0006E6_: ;
@@ -31,3 +32,5 @@ CATEGORY: 1.1name-char Ll Lu Lo Lm Ln Nl Mc Mn Nd Pc Cf _-.\u0000b7: ;
{ [ dup HEX: E000 < ] [ drop f ] }
[ { HEX: FFFE HEX: FFFF } member? not ]
} cond ;
+
+HINTS: text? { object fixnum } ;
diff --git a/basis/xml/errors/errors-tests.factor b/basis/xml/errors/errors-tests.factor
index 4204979941..8a469bc08f 100644
--- a/basis/xml/errors/errors-tests.factor
+++ b/basis/xml/errors/errors-tests.factor
@@ -6,11 +6,11 @@ IN: xml.errors.tests
'[ _ string>xml ] swap '[ _ = ] must-fail-with ;
T{ no-entity f 1 10 "nbsp" } " " xml-error-test
-T{ mismatched f 1 8 T{ name f "" "x" "" } T{ name f "" "y" "" } }
+T{ mismatched f 1 7 T{ name f "" "x" "" } T{ name f "" "y" "" } }
"" xml-error-test
-T{ unclosed f 1 4 V{ T{ name f "" "x" "" } } } "" xml-error-test
+T{ unclosed f 1 3 V{ T{ name f "" "x" "" } } } "" xml-error-test
T{ nonexist-ns f 1 5 "x" } "" xml-error-test
-T{ unopened f 1 5 } "" xml-error-test
+T{ unopened f 1 4 } "" xml-error-test
T{ not-yes/no f 1 41 "maybe" }
"" xml-error-test
T{ extra-attrs f 1 32 V{ T{ name f "" "foo" f } }
@@ -19,13 +19,13 @@ T{ bad-version f 1 28 "5 million" }
"" xml-error-test
T{ notags f } "" xml-error-test
T{ multitags } "" xml-error-test
-T{ bad-prolog f 1 26 T{ prolog f "1.0" "UTF-8" f } }
+T{ bad-prolog f 1 25 T{ prolog f "1.0" "UTF-8" f } }
"" xml-error-test
T{ capitalized-prolog f 1 6 "XmL" } ""
xml-error-test
T{ pre/post-content f "x" t } "x" xml-error-test
T{ versionless-prolog f 1 8 } "" xml-error-test
-T{ unclosed-quote f 1 13 } "" xml-error-test
T{ bad-name f 1 3 "-" } "<-/>" xml-error-test
T{ quoteless-attr f 1 12 } "/>" xml-error-test
T{ quoteless-attr f 1 10 } "" xml-error-test
@@ -37,6 +37,6 @@ T{ bad-cdata f 1 7 } "" xml-error-test
T{ pre/post-content f "&" t } " " xml-error-test
T{ bad-doctype f 1 17 "a" } "" xml-error-test
T{ bad-doctype f 1 22 T{ opener { name T{ name f "" "foo" "" } } { attrs T{ attrs } } } } " ]>" xml-error-test
-T{ disallowed-char f 1 3 1 } "\u000001" xml-error-test
-T{ missing-close f 1 9 } "