Handbook
Glossary
htmlize-stream ( path stream -- xml )
Vocabulary
xmode
.
code2html
Inputs
path
an
object
stream
an
object
Outputs
xml
an
object
Definition
USING:
io
kernel
sequences
xml.data
xml.syntax.private
xmode.catalog
;
IN:
xmode.code2html
::
htmlize-stream
( path stream -- xml )
stream
stream-lines
[
""
]
[
path
over
first
find-mode
htmlize-lines
]
if-empty
:>
input
default-stylesheet
:>
stylesheet
H{
{
"stylesheet"
stylesheet
}
{
"input"
input
}
{
"path"
path
}
}
T{
xml
{
prolog
T{
prolog
{
version
"1.0"
}
{
encoding
"UTF-8"
}
}
}
{
before
V{
T{
doctype-decl
{
name
"html"
}
}
" "
}
}
{
body
T{
tag
{
name
T{
name
{
space
""
}
{
main
"html"
}
{
url
""
}
}
}
{
children
V{
"\n "
~tag~
"\n "
~tag~
"\n "
}
}
}
}
{
after
V{
""
}
}
}
interpolate-xml
;