open-tag - Factor Documentation (original) (raw)
open-tag
XML data types » XML data classes
Prev: | contained-tag |
---|---|
Next: | prolog |
Class description
This is a predicate class of tags with children, i.e. the opposite of a contained-tag.
See also
tag, , contained-tag,
Definition
USING: accessors kernel sequences ;
PREDICATE: open-tag < tag children>> empty? not ;
Methods
USING: combinators kernel namespaces xml.data xml.writer
xml.writer.private ;
M: open-tag write-xml
xml-pprint? get [
{
[ write-start-tag ]
[
sensitive? not xml-pprint? get and
xml-pprint? set
]
[ write-children ]
[ write-end-tag ]
} cleave
] dip xml-pprint? set ;