5e: Molds and mold builders

+$mane

XML name+space

XML tag name and optional namespace.

Source

+$ mane $@(@tas [@tas @tas])

Examples

> (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

+$manx

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).

Source

+$ manx $~([[%$ ~] ~] [g=marx c=marl])

Examples

> *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>"

+$marl

XML node list

A list of XML nodes ($marx).

Source

+$ marl (list manx)

Examples

> *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>"

+$mars

XML cdata

Source

+$ mars [t=[n=%$ a=[i=[n=%$ v=tape] t=~]] c=~]

+$mart

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).

Source

+$ mart (list [n=mane v=tape])

Examples

> *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>"

+$marx

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).

Source

+$ marx $~([%$ ~] [n=mane a=mart])

Examples

> `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>"

+$mite

MIME type

This type represents a MIME type like text/plain as a path.

Source

+$ mite (list @ta)

Examples

> `mite`/text/plain
/text/plain

+$pass

Public key

This type is used for a ship's public key, as an atom.

Source

+$ pass @

+$ring

Private key

This type is used for a ship's private key, as an atom.

Source

+$ ring @

+$ship

Network identity

Just an @p

Source

+$ ship @p

Examples

> *ship
~zod
> `ship`~sampel-palnet
~sampel-palnet

+$shop

Urbit/DNS identity

Either a $ship or a domain name as a path.

Source

+$ shop (each ship (list @ta))

+$spur

ship desk case spur

The part of a Clay path after the %.

Source

+$ spur path

+$time

Galactic time

Just a @da

Source

+$ time @da

Examples

> *time
~2000.1.1