stream-write-table ( table-cells style stream -- )
Factor handbook » Input and output » Formatted output » Formatted stream protocol

Prev:make-cell-stream ( style stream -- stream' )


Vocabulary
io.styles

Inputs
table-cellsa sequence of sequences of table cells
stylean assoc
streaman output stream


Outputs
None

Generic word contract
Prints a table of cells produced by with-cell.

The style hashtable holds table style information. See Table styles.

Notes
Most code only works on one stream at a time and should instead use tabular-output; see Default input and output streams.

Errors
Throws an error if the I/O operation fails.

See also
table-gap, table-border, tabular-output

Definition

GENERIC: stream-write-table ( table-cells style stream -- )


Methods













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 ;