htmlize-stream ( path stream -- xml )


Vocabulary
xmode.code2html

Inputs
pathan object
streaman object


Outputs
xmlan object


Definition


:: 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 ;