Handbook
Glossary
simple-page ( title head body -- xml )
Vocabulary
html
Inputs
title
a
string
head
XML data
body
XML data
Outputs
xml
a
xml
Word description
Constructs a simple XHTML page with a
head
and
body
tag. The given XML data is spliced into the two child tags, and a title is also added to the head tag.
Definition
USING:
accessors
xml.data
xml.syntax.private
;
IN:
html
:
simple-page
( title head body -- xml )
3
nenum
T{
xml
{
prolog
T{
prolog
{
version
"1.0"
}
{
encoding
"UTF-8"
}
}
}
{
before
V{
T{
doctype-decl
{
name
"html"
}
}
"\n "
}
}
{
body
T{
tag
{
name
T{
name
{
space
""
}
{
main
"html"
}
{
url
"http://www.w3.org/1999/xhtml"
}
}
}
{
attrs
T{
attrs
{
alist ~vector~
}
}
}
{
children
V{
"\n "
~tag~
"\n "
~tag~
"\n "
}
}
}
}
{
after
V{
""
}
}
}
interpolate-xml
<empty-prolog>
>>prolog
;