Handbook
Glossary
tag-init-form ( spec -- quot )
Vocabulary
xmode
.
utilities
Inputs
spec
an
object
Outputs
quot
an
object
Definition
USING:
combinators
kernel
namespaces
quotations
sequences
xml.data
xml.traversal
;
IN:
xmode.utilities
:
tag-init-form
( spec -- quot )
{
{
[
dup
quotation?
]
[
[
object
get
tag
get
]
prepose
]
}
{
[
dup
length
2
=
]
[
first2
'[
tag
get
children>string
_
[
execute
]
when*
object
get
_
execute
]
]
}
{
[
dup
length
3
=
]
[
first3
'[
tag
get
_
attr
_
[
execute
]
when*
object
get
_
execute
]
]
}
}
cond
;