]> gitweb.factorcode.org Git - factor.git/commitdiff
Fixing everything I broke?
authorDaniel Ehrenberg <littledan@Macintosh-103.local>
Thu, 29 Jan 2009 19:33:04 +0000 (13:33 -0600)
committerDaniel Ehrenberg <littledan@Macintosh-103.local>
Thu, 29 Jan 2009 19:33:04 +0000 (13:33 -0600)
16 files changed:
basis/farkup/farkup.factor
basis/html/components/components.factor
basis/html/elements/elements.factor
basis/html/templates/chloe/compiler/compiler.factor
basis/http/server/server.factor
basis/lcs/diff2html/diff2html-tests.factor
basis/syndication/syndication.factor
basis/xml/errors/errors.factor
basis/xml/interpolate/interpolate-tests.factor
basis/xml/interpolate/interpolate.factor
basis/xml/tests/templating.factor
basis/xml/tests/xmltest.factor
basis/xml/utilities/utilities.factor
basis/xml/writer/writer-docs.factor
basis/xml/writer/writer-tests.factor
basis/xml/writer/writer.factor

index ccd12b83f216d50b7894d1f2fc027545be776566..b9e62717ebaf3b67c21f72ad3cde313f9bf0c1d0 100644 (file)
@@ -236,7 +236,7 @@ M: f (write-farkup) ;
     parse-farkup (write-farkup) ;
 
 : write-farkup ( string -- )
-    farkup>xml write-xml-chunk ;
+    farkup>xml write-xml ;
 
 : convert-farkup ( string -- string' )
     [ write-farkup ] with-string-writer ;
index e63447ec55ae95ac1b9db1c348182b84bd5881d0..462c9b3c789dc48ac81bcec1a62e89437bb26de5 100644 (file)
@@ -19,7 +19,7 @@ GENERIC: render* ( value name renderer -- xml )
         [ f swap ]
         if
     ] 2dip
-    render* write-xml-chunk
+    render* write-xml
     [ render-error ] when* ;
 
 <PRIVATE
@@ -176,4 +176,4 @@ M: comparison render*
 ! HTML component
 SINGLETON: html
 
-M: html render* 2drop string>xml-chunk ;
+M: html render* 2drop <unescaped> ;
index 7bca545df53776d7f5a62d090626cdfc54c704b3..9e7504d436fa50446e8d10d2f2801f7bfecd19b1 100644 (file)
@@ -1,11 +1,9 @@
-! cont-html v0.6
-!
-! Copyright (C) 2004 Chris Double.
+! Copyright (C) 2004, 2009 Chris Double, Daniel Ehrenberg.
 ! 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
-urls math math.parser combinators present fry ;
+xml.data xml.interpolate urls math math.parser combinators
+present fry io.streams.string xml.writer ;
 
 IN: html.elements
 
@@ -135,17 +133,18 @@ SYMBOL: html
     "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" write-html ;
 
 : simple-page ( title head-quot body-quot -- )
-    #! Call the quotation, with all output going to the
-    #! body of an html page with the given title.
-    spin
-    xhtml-preamble
-    <html "http://www.w3.org/1999/xhtml" =xmlns "en" =xml:lang "en" =lang html>
-        <head>
-            <title> write </title>
-            call
-        </head>
-        <body> call </body>
-    </html> ; inline
+    [ with-string-writer <unescaped> ] bi@
+    <XML
+        <?xml version="1.0"?>
+        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+            <head>
+                <title><-></title>
+                <->
+            </head>
+            <body><-></body>
+        </html>
+    XML> write-xml ;
 
 : render-error ( message -- )
-    <span "error" =class span> escape-string write </span> ;
+    [XML <span class="error"><-></span> XML] write-xml ;
index 4410cd75994141bf9d2472b875dbe14bd8a56402..cd5de4ceb6bba544ba6ad8b49c470866c2bd5ef7 100644 (file)
@@ -90,7 +90,7 @@ ERROR: unknown-chloe-tag tag ;
         { [ dup [ tag? ] [ xml? ] bi or ] [ compile-tag ] }
         { [ dup string? ] [ escape-string [write] ] }
         { [ dup comment? ] [ drop ] }
-        [ [ write-xml-chunk ] [code-with] ]
+        [ [ write-xml ] [code-with] ]
     } cond ;
 
 : with-compiler ( quot -- quot' )
index b4af727caa3da11c99575c395facb6b4d6221b56..a886d7bae75c9a75de36506fbc0ae6b574c7d315 100755 (executable)
@@ -12,6 +12,7 @@ io.encodings.utf8
 io.encodings.ascii
 io.encodings.binary
 io.streams.limited
+io.streams.string
 io.servers.connection
 io.timeouts
 io.crlf
index d261a4659aabb64c561436148e1646ef8dcdabd6..0c2ed34f453b99958081ada4476fc5592c23d30e 100644 (file)
@@ -3,4 +3,4 @@
 USING: lcs.diff2html lcs kernel tools.test strings sequences xml.writer ;
 IN: lcs.diff2html.tests
 
-[ ] [ "hello" "heyo" [ 1string ] { } map-as diff htmlize-diff xml-chunk>string drop ] unit-test
+[ ] [ "hello" "heyo" [ 1string ] { } map-as diff htmlize-diff xml>string drop ] unit-test
index 58b2279cb19229d2f4773518fa95f1b7ee20aca5..b23910e2004361d87492e8e8ba55fcd8f36c9ca4 100644 (file)
@@ -81,7 +81,7 @@ TUPLE: entry title url description date ;
         [
             { "content" "summary" } any-tag-named
             dup children>> [ string? not ] contains?
-            [ children>> [ write-xml-chunk ] with-string-writer ]
+            [ children>> xml>string ]
             [ children>string ] if >>description
         ]
         [
index df387244123e2b9bbc546caf09b1ac03751876f0..304b38f2bda6a2915ee647f4f80db1e4a38b82b4 100644 (file)
@@ -194,7 +194,7 @@ M: bad-prolog summary ( obj -- str )
     [
         dup call-next-method write
         "Misplaced XML prolog" print
-        prolog>> write-prolog nl
+        prolog>> write-xml nl
     ] with-string-writer ;
 
 TUPLE: capitalized-prolog < xml-error-at name ;
@@ -258,7 +258,7 @@ M: misplaced-directive summary ( obj -- str )
     [
         dup call-next-method write
         "Misplaced directive:" print
-        dir>> write-xml-chunk nl
+        dir>> write-xml nl
     ] with-string-writer ;
 
 TUPLE: bad-name < xml-error-at name ;
index 35c4e793ea3896ea018cab3382d9c440d84d441e..9be85a11e245990ef373f50a8ec5ead44676ed33 100644 (file)
@@ -51,8 +51,8 @@ IN: xml.interpolate.tests
   <XML <x number=<-> false=<-> url=<-> string=<-> word=<->/> XML>
   pprint-xml>string  ] unit-test
 
-[ "<x>3</x>" ] [ 3 [XML <x><-></x> XML] xml-chunk>string ] unit-test
-[ "<x></x>" ] [ f [XML <x><-></x> XML] xml-chunk>string ] unit-test
+[ "<x>3</x>" ] [ 3 [XML <x><-></x> XML] xml>string ] unit-test
+[ "<x></x>" ] [ f [XML <x><-></x> XML] xml>string ] unit-test
 
 \ <XML must-infer
 [ { } "" interpolate-xml ] must-infer
index e28e83e47fe9dbd174d7ee43e8218bc2cc1360c7..0e551bddfab9f28d2b251ff41b7aabb599c0bcc6 100644 (file)
@@ -3,7 +3,7 @@
 USING: xml xml.state kernel sequences fry assocs xml.data
 accessors strings make multiline parser namespaces macros
 sequences.deep generalizations words combinators
-math present arrays ;
+math present arrays unicode.categories ;
 IN: xml.interpolate
 
 <PRIVATE
@@ -95,7 +95,7 @@ M: xml-chunk interpolate-xml
     } cond ;
 
 : parse-def ( accum delimiter quot -- accum )
-    [ parse-multiline-string 1 short head* ] dip call
+    [ parse-multiline-string [ blank? ] trim ] dip call
     [ extract-variables collect ] keep swap
     [ number<-> parsed ] dip
     [ \ interpolate-xml parsed ] when ; inline
index b35d7372e3fd1cca657602d093f748c736e65d0a..618e785d057c7556cec8a97f4890944445f31c7a 100644 (file)
@@ -9,10 +9,10 @@ SYMBOL: ref-table
 
 GENERIC: (r-ref) ( xml -- )
 M: tag (r-ref)
-    sub-tag over at* [
+    dup sub-tag attr [
         ref-table get at
         >>children drop
-    ] [ 2drop ] if ;
+    ] [ drop ] if* ;
 M: object (r-ref) drop ;
 
 : template ( xml -- )
index a6a28e15a3c3af520b35da3a821bfb61fda853d1..a8024ce151bebe0b58aaf7c1f7cb290487cb88de 100644 (file)
@@ -11,7 +11,7 @@ TUPLE: xml-test id uri sections description type ;
         [ "ID" attr >>id ]
         [ "URI" attr >>uri ]
         [ "SECTIONS" attr >>sections ]
-        [ children>> xml-chunk>string >>description ]
+        [ children>> xml>string >>description ]
     } cleave ;
 
 : parse-tests ( xml -- tests )
index 48cbeceb224eebe0d6855bc50c78cd434cfba094..924ae56aa466f1152f33dd6c8279eba22de7453d 100644 (file)
@@ -38,7 +38,7 @@ IN: xml.utilities
     tags@ swap [ tag-named? ] with filter ;
 
 : tag-with-attr? ( elem attr-value attr-name -- ? )
-    rot dup tag? [ at = ] [ 3drop f ] if ;
+    rot dup tag? [ swap attr = ] [ 3drop f ] if ;
 
 : tag-with-attr ( tag attr-value attr-name -- matching-tag )
     assure-name '[ _ _ tag-with-attr? ] find nip ;
index b470403e843f29504f77d32b6500c59f6b4ec448..a26a7377fd7db018d9d3e55fefbe235348dc0362 100644 (file)
@@ -1,56 +1,41 @@
 ! Copyright (C) 2005, 2009 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: help.syntax help.markup io strings ;
+USING: help.syntax help.markup io strings xml.data ;
 IN: xml.writer
 
 ABOUT: "xml.writer"
 
 ARTICLE: "xml.writer" "Writing XML"
-    "These words are used in implementing prettyprint"
-    { $subsection write-xml-chunk }
-    "These words are used to print XML normally"
-    { $subsection xml>string }
+    "These words are used to print XML preserving whitespace in text nodes"
     { $subsection write-xml }
+    { $subsection xml>string }
     "These words are used to prettyprint XML"
     { $subsection pprint-xml>string }
-    { $subsection pprint-xml>string-but }
     { $subsection pprint-xml }
-    { $subsection pprint-xml-but } ;
-
-HELP: write-xml-chunk
-{ $values { "object" "an XML element" } }
-{ $description "writes an XML element to " { $link output-stream } "." }
-{ $see-also write-xml-chunk write-xml } ;
+    "Certain variables can be changed to mainpulate prettyprinting"
+    { $subsection sensitive-tags }
+    { $subsection indenter }
+    "All of these words operate on arbitrary pieces of XML: they can take, as in put, XML documents, comments, tags, strings (text nodes), XML chunks, etc." ;
 
 HELP: xml>string
-{ $values { "xml" "an xml document" } { "string" "a string" } }
-{ $description "converts an XML document into a string" }
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
+{ $values { "xml" "an XML document" } { "string" "a string" } }
+{ $description "This converts an XML document " { $link xml } " into a string. It can also be used to convert any piece of XML to a string, eg an " { $link xml-chunk } " or " { $link comment } "." }
+{ $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. The whitespace in the text nodes of the original document is preserved." } ;
 
 HELP: pprint-xml>string
-{ $values { "xml" "an xml document" } { "string" "a string" } }
+{ $values { "xml" "an XML document" } { "string" "a string" } }
 { $description "converts an XML document into a string in a prettyprinted form." }
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
+{ $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. The whitespace in the text nodes of the original document is preserved." } ;
 
 HELP: write-xml
 { $values { "xml" "an XML document" } }
 { $description "prints the contents of an XML document to " { $link output-stream } "." }
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
+{ $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. The whitespace in the text nodes of the original document is preserved." } ;
 
 HELP: pprint-xml
 { $values { "xml" "an XML document" } }
 { $description "prints the contents of an XML document to " { $link output-stream } " in a prettyprinted form." }
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
-
-HELP: pprint-xml-but
-{ $values { "xml" "an XML document" } { "sensitive-tags" "a sequence of names" } }
-{ $description "Prettyprints an XML document, leaving the whitespace of the tags with names in sensitive-tags intact." }
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
-
-HELP: pprint-xml>string-but
-{ $values { "xml" "an XML document" } { "sensitive-tags" "a sequence of names" } { "string" string } }
-{ $description "Prettyprints an XML document, returning the result as a string and leaving the whitespace of the tags with names in sensitive-tags intact." }
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
+{ $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. Whitespace is also not preserved." } ;
 
-{ xml>string write-xml pprint-xml pprint-xml>string pprint-xml>string-but pprint-xml-but } related-words
+{ xml>string write-xml pprint-xml pprint-xml>string } related-words
 
index dcf7f1023d1fe2e283c4482638b3416f69267d5b..d09ae08b3fa6ca26134b42a2ba333d55d1818d4f 100644 (file)
@@ -7,7 +7,7 @@ IN: xml.writer.tests
 \ write-xml must-infer
 \ xml>string must-infer
 \ pprint-xml must-infer
-\ pprint-xml-but must-infer
+! Add a test for pprint-xml with sensitive-tags
 
 [ "foo" ] [ T{ name { main "foo" } } name>string ] unit-test
 [ "foo" ] [ T{ name { space "" } { main "foo" } } name>string ] unit-test
@@ -51,11 +51,11 @@ IN: xml.writer.tests
 ]>
 <x>&foo;</x>"} pprint-reprints-as
 
-[ t ] [ "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd' >" dup string>xml-chunk xml-chunk>string = ] unit-test
+[ t ] [ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\" >" dup string>xml-chunk xml>string = ] unit-test
 [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><a b=\"c\"/>" ]
     [ "<a b='c'/>" string>xml xml>string ] unit-test
 [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><foo>bar baz</foo>" ]
 [ "<foo>bar</foo>" string>xml [ " baz" append ] map xml>string ] unit-test
 [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<foo>\n  bar\n</foo>" ]
 [ "<foo>         bar            </foo>" string>xml pprint-xml>string ] unit-test
-[ "<foo'>" ] [ "<foo'>" <unescaped> xml-chunk>string ] unit-test
+[ "<foo'>" ] [ "<foo'>" <unescaped> xml>string ] unit-test
index 8e2dc4bfbf43483ef0e2916e2772251a56c27151..600c9d233d29573197d5ed2633bae61115c5c2e8 100644 (file)
@@ -5,14 +5,15 @@ assocs combinators io io.streams.string accessors
 xml.data wrap xml.entities unicode.categories fry ;\r
 IN: xml.writer\r
 \r
-SYMBOL: xml-pprint?\r
 SYMBOL: sensitive-tags\r
-SYMBOL: indentation\r
 SYMBOL: indenter\r
 "  " indenter set-global\r
 \r
 <PRIVATE\r
 \r
+SYMBOL: xml-pprint?\r
+SYMBOL: indentation\r
+\r
 : sensitive? ( tag -- ? )\r
     sensitive-tags get swap '[ _ names-match? ] contains? ;\r
 \r
@@ -49,22 +50,22 @@ PRIVATE>
 \r
 <PRIVATE\r
 \r
+: write-quoted ( string -- )\r
+    CHAR: " write1 write CHAR: " write1 ;\r
+\r
 : print-attrs ( assoc -- )\r
     [\r
-        " " write\r
-        swap print-name\r
-        "=\"" write\r
-        escape-quoted-string write\r
-        "\"" write\r
+        [ bl print-name "=" write ]\r
+        [ escape-quoted-string write-quoted ] bi*\r
     ] assoc-each ;\r
 \r
 PRIVATE>\r
 \r
-GENERIC: write-xml-chunk ( object -- )\r
+GENERIC: write-xml ( object -- )\r
 \r
 <PRIVATE\r
 \r
-M: string write-xml-chunk\r
+M: string write-xml\r
     escape-string xml-pprint? get [\r
         dup [ blank? ] all?\r
         [ drop "" ]\r
@@ -78,17 +79,17 @@ M: string write-xml-chunk
 : write-start-tag ( tag -- )\r
     write-tag ">" write ;\r
 \r
-M: contained-tag write-xml-chunk\r
+M: contained-tag write-xml\r
     write-tag "/>" write ;\r
 \r
 : write-children ( tag -- )\r
     indent children>> ?filter-children\r
-    [ write-xml-chunk ] each unindent ;\r
+    [ write-xml ] each unindent ;\r
 \r
 : write-end-tag ( tag -- )\r
     ?indent "</" write print-name CHAR: > write1 ;\r
 \r
-M: open-tag write-xml-chunk\r
+M: open-tag write-xml\r
     xml-pprint? get [\r
         {\r
             [ sensitive? not xml-pprint? get and xml-pprint? set ]\r
@@ -98,110 +99,95 @@ M: open-tag write-xml-chunk
         } cleave\r
     ] dip xml-pprint? set ;\r
 \r
-M: unescaped write-xml-chunk\r
+M: unescaped write-xml\r
     string>> write ;\r
 \r
-M: comment write-xml-chunk\r
+M: comment write-xml\r
     "<!--" write text>> write "-->" write ;\r
 \r
-M: element-decl write-xml-chunk\r
-    "<!ELEMENT " write\r
-    [ name>> write " " write ]\r
-    [ content-spec>> write ">" write ]\r
-    bi ;\r
+: write-decl ( decl name quot: ( decl -- slot ) -- )\r
+    "<!" write swap write bl\r
+    [ name>> write bl ]\r
+    swap '[ @ write ">" write ] bi ; inline\r
 \r
-M: attlist-decl write-xml-chunk\r
-    "<!ATTLIST " write\r
-    [ name>> write " " write ]\r
-    [ att-defs>> write ">" write ]\r
-    bi ;\r
+M: element-decl write-xml\r
+    "ELEMENT" [ content-spec>> ] write-decl ;\r
 \r
-M: notation-decl write-xml-chunk\r
-    "<!NOTATION " write\r
-    [ name>> write " " write ]\r
-    [ id>> write ">" write ]\r
-    bi ;\r
+M: attlist-decl write-xml\r
+    "ATTLIST" [ att-defs>> ] write-decl ;\r
 \r
-M: entity-decl write-xml-chunk\r
+M: notation-decl write-xml\r
+    "NOTATION" [ id>> ] write-decl ;\r
+\r
+M: entity-decl write-xml\r
     "<!ENTITY " write\r
     [ pe?>> [ " % " write ] when ]\r
     [ name>> write " \"" write ] [\r
         def>> f xml-pprint?\r
-        [ write-xml-chunk ] with-variable\r
+        [ write-xml ] with-variable\r
         "\">" write\r
     ] tri ;\r
 \r
-M: system-id write-xml-chunk\r
-    "SYSTEM '" write system-literal>> write "'" write ;\r
+M: system-id write-xml\r
+    "SYSTEM" write bl system-literal>> write-quoted ;\r
 \r
-M: public-id write-xml-chunk\r
-    "PUBLIC '" write\r
-    [ pubid-literal>> write "' '" write ]\r
-    [ system-literal>> write "'" write ] bi ;\r
+M: public-id write-xml\r
+    "PUBLIC" write bl\r
+    [ pubid-literal>> write-quoted bl ]\r
+    [ system-literal>> write-quoted ] bi ;\r
 \r
 : write-internal-subset ( dtd -- )\r
     [\r
         "[" write indent\r
-        directives>> [ ?indent write-xml-chunk ] each\r
+        directives>> [ ?indent write-xml ] each\r
         unindent ?indent "]" write\r
     ] when* ;\r
 \r
-M: doctype-decl write-xml-chunk\r
+M: doctype-decl write-xml\r
     ?indent "<!DOCTYPE " write\r
     [ name>> write " " write ]\r
-    [ external-id>> [ write-xml-chunk " " write ] when* ]\r
+    [ external-id>> [ write-xml " " write ] when* ]\r
     [ internal-subset>> write-internal-subset ">" write ] tri ;\r
 \r
-M: directive write-xml-chunk\r
+M: directive write-xml\r
     "<!" write text>> write CHAR: > write1 nl ;\r
 \r
-M: instruction write-xml-chunk\r
+M: instruction write-xml\r
     "<?" write text>> write "?>" write ;\r
 \r
-M: number write-xml-chunk\r
+M: number write-xml\r
     "Numbers are not allowed in XML" throw ;\r
 \r
-M: sequence write-xml-chunk\r
-    [ write-xml-chunk ] each ;\r
-\r
-PRIVATE>\r
+M: sequence write-xml\r
+    [ write-xml ] each ;\r
 \r
-: write-prolog ( xml -- )\r
-    "<?xml version=\"" write dup version>> write\r
-    "\" encoding=\"" write dup encoding>> write\r
-    standalone>> [ "\" standalone=\"yes" write ] when\r
-    "\"?>" write ;\r
+M: prolog write-xml\r
+    "<?xml version=" write\r
+    [ version>> write-quoted ]\r
+    [ " encoding=" write encoding>> write-quoted ]\r
+    [ standalone>> [ " standalone=\"yes\"" write ] when ] tri\r
+    "?>" write ;\r
 \r
-: write-xml ( xml -- )\r
+M: xml write-xml\r
     {\r
-        [ prolog>> write-prolog ]\r
-        [ before>> write-xml-chunk ]\r
-        [ body>> write-xml-chunk ]\r
-        [ after>> write-xml-chunk ]\r
+        [ prolog>> write-xml ]\r
+        [ before>> write-xml ]\r
+        [ body>> write-xml ]\r
+        [ after>> write-xml ]\r
     } cleave ;\r
 \r
-M: xml write-xml-chunk\r
-    body>> write-xml-chunk ;\r
+PRIVATE>\r
 \r
 : xml>string ( xml -- string )\r
     [ write-xml ] with-string-writer ;\r
 \r
-: xml-chunk>string ( object -- string )\r
-    [ write-xml-chunk ] with-string-writer ;\r
-\r
-: pprint-xml-but ( xml sensitive-tags -- )\r
+: pprint-xml ( xml -- )\r
     [\r
-        [ assure-name ] map sensitive-tags set\r
+        sensitive-tags [ [ assure-name ] map ] change\r
         0 indentation set\r
         xml-pprint? on\r
         write-xml\r
     ] with-scope ;\r
 \r
-: pprint-xml ( xml -- )\r
-    f pprint-xml-but ;\r
-\r
-: pprint-xml>string-but ( xml sensitive-tags -- string )\r
-    [ pprint-xml-but ] with-string-writer ;\r
-\r
 : pprint-xml>string ( xml -- string )\r
-    f pprint-xml>string-but ;\r
+    [ pprint-xml ] with-string-writer ;\r