| description | XML and markup-related molds for handling structured document formats. | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| layout |
|
XML name+space.
XML tag name and optional namespace.
+$ mane $@(@tas [@tas @tas])> (en-xml:html ;foo;)
"<foo></foo>"
> (en-xml:html ;foo_bar;)
"<foo:bar></foo:bar>"
> `manx`;foo_bar;
[g=[n=[%foo %bar] a=~] c=~]
> `mane`n.g:`manx`;foo_bar;
[%foo %bar]
> `mane`n.g:`manx`;foo;
%foo
Dynamic XML node.
An XML element which may contain text, attributes, and other elements.
.g is a $marx (a tag) and .c is a $marl (its contents).
+$ manx $~([[%$ ~] ~] [g=marx c=marl])> *manx
[g=[n=%$ a=~] c=~
> `manx`;foo;
[g=[n=%foo a=~] c=~]
> (en-xml:html `manx`;foo;)
"<foo></foo>"
> =a ^- manx
;foo
;bar: abc
;baz
;xxx: hello
==
==
> a
[ g=[n=%foo a=~]
c
~[
[ g=[n=%bar a=~]
c=~[[g=[n=%$ a=~[[n=%$ v="abc"]]] c=~]]
]
[ g=[n=%baz a=~]
c
~[
[ g=[n=%xxx a=~]
c=~[[g=[n=%$ a=~[[n=%$ v="hello"]]] c=~]]
]
]
]
]
]
> (en-xml:html a)
"<foo><bar>abc</bar><baz><xxx>hello</xxx></baz></foo>"
XML node list.
A list of XML nodes ($marx).
+$ marl (list manx)> *marl
~
> ^- marl
;=
;foo: abc
;bar: def
==
~[
[g=[n=%foo a=~] c=~[[g=[n=%$ a=~[[n=%$ v=~['a' 'b' 'c']]]] c=~]]]
[g=[n=%bar a=~] c=~[[g=[n=%$ a=~[[n=%$ v=~['d' 'e' 'f']]]] c=~]]]
]
> %- en-xml:html
;baz
;=
;foo: abc
;bar: def
==
==
"<baz><foo>abc</foo><bar>def</bar></baz>"
XML cdata.
+$ mars [t=[n=%$ a=[i=[n=%$ v=tape] t=~]] c=~]XML attributes.
A list of atributes for an XML tag. For each list item, .n is a $mane (an attribute name with optional namespace) and .v is a $tape (the attribute itself).
+$ mart (list [n=mane v=tape])> *mart
~
> `manx`;foo.bar;
[g=[n=%foo a=~[[n=%class v="bar"]]] c=~]
> `mart`a.g:`manx`;foo.bar;
~[[n=%class v="bar"]]
> (en-xml:html ;foo.bar;)
"<foo class=\"bar\"></foo>"
Dynamic XML tag.
An XML tag with optional attributes. .n is a $mane (the tag name with optional namespace) and .a is a $mart (any XML attributes).
+$ marx $~([%$ ~] [n=mane a=mart])> `manx`;foo.bar;
[g=[n=%foo a=~[[n=%class v="bar"]]] c=~]
> `marx`g:`manx`;foo.bar;
[n=%foo a=~[[n=%class v="bar"]]]
> (en-xml:html ;foo.bar;)
"<foo class=\"bar\"></foo>"
MIME type.
This type represents a MIME type like 'text/plain' as a $path like /text/plain.
+$ mite (list @ta)> `mite`/text/plain
/text/plain
Public key.
This type is used for a ship's public key, as an $atom.
+$ pass @Private key.
This type is used for a ship's private key, as an $atom.
+$ ring @Network identity.
Just a @p.
+$ ship @p> *ship
~zod
> `ship`~sampel-palnet
~sampel-palnet
Urbit/DNS identity.
Either a $ship or a domain name as a $path.
+$ shop (each ship (list @ta))Ship, desk, case, spur.
The part of a Clay $path after the %.
+$ spur pathGalactic time.
Just a @da
+$ time @da> *time
~2000.1.1