Handbook
Glossary
html-writer
HTML streams
Next:
<html-writer> ( -- html-writer )
Vocabulary
html
.
streams
Class description
A formatted output stream which accumulates HTML markup as
xml
.
data
types. The
data
slot contains a sequence with all markup so far.
Definition
USING:
destructors
;
IN:
html.streams
TUPLE:
html-writer
<
disposable
data
;
Methods
USING:
destructors
html.streams
kernel
;
M:
html-writer
dispose*
drop
;
USING:
html.streams
html.streams.private
io.styles
;
M:
html-writer
make-block-stream
html-block-stream
new-html-sub-stream
;
USING:
html.streams
html.streams.private
io.styles
;
M:
html-writer
make-cell-stream
html-sub-stream
new-html-sub-stream
;
USING:
html.streams
html.streams.private
io.styles
;
M:
html-writer
make-span-stream
html-span-stream
new-html-sub-stream
;
USING:
html.streams
io
kernel
;
M:
html-writer
stream-flush
drop
;
USING:
html.streams
html.streams.private
io.styles
;
M:
html-writer
stream-format
format-html-span
;
USING:
html.streams
html.streams.private
io
xml.data
;
M:
html-writer
stream-nl
[
T{
xml-chunk
{
seq
V{
""
T{
tag
{
name ~name~
}
}
""
}
}
}
]
emit-html
;
USING:
html.streams
html.streams.private
io
;
M:
html-writer
stream-write
[
]
emit-html
;
USING:
accessors
html.streams
html.streams.private
io.styles
kernel
sequences
xml.data
xml.syntax.private
;
M:
html-writer
stream-write-table
[
table-style
swap
[
[
data>>
2
nenum
T{
xml-chunk
{
seq ~vector~
}
}
interpolate-xml
]
with
map
1
nenum
T{
xml-chunk
{
seq
V{
""
~tag~
""
}
}
}
interpolate-xml
]
with
map
1
nenum
T{
xml-chunk
{
seq
V{
""
T{
tag
{
name ~name~
}
{
attrs ~attrs~
}
{
children ~vector~
}
}
""
}
}
}
interpolate-xml
]
emit-html
;
USING:
html.streams
html.streams.private
io
strings
;
M:
html-writer
stream-write1
[
1string
]
emit-html
;