init-keywords: : name (required) default required? name (required) minimal-occurences maximal-occurences wrapped-type define stanza foo () name "foobar"; namespace "foo:bar"; attribute barf :: , required?: #t, default: "foobar", name: "barf"; attribute foofoo :: , name: "foofoo"; repeated element foobar :: , wrapped: , name: "xml:foo"; element bar :: , minimal: 1, name: "bar"; sequence { element foo :: , wrapped: , name: "foo"; repeated element fnord :: , maximal: 2, name: "fnord"; element error :: , name: "error"; } end; define stanza client-message () name "message"; namespace "jabber:client"; sequence-of { one-of { element subject :: , wrapped: ; element body :: , wrapped: ; element thread :: , wrapped: ; }, min-occurrences: 0, max-occurrences: unbounded; element error :: , wrpaaed: , min-occurrences: 0; }; attribute from :: ; attribute id :: ; attribute to :: ; attribute type :: one-of(#"chat", #"error", #"groupchat", #"headline", #"normal"), default: #"normal"; attribute xml-lang :: , name: "xml-lang"; end; define wrapped stanza client-body () name "body"; namespace "jabber:client"; content :: , check: content.size >= 1; end; define wrapped stanza client-subject () name "subject"; namespace "jabber:client"; content :: ; end; define wrapped stanza client-thread () name "thread"; namespace "jabber:client"; content :: ; end; define stanza client-presence () name "presence"; namespace "jabber:client"; sequence-of { one-of { element show :: wrapped(, one-of(#"away", #"chat", #"dnd", #"xa")); element status :: wrapped(, ); element priority :: wrapped(, ); }, min-occurrences: 0, max-occurrences: unbounded; element error :: wrapped(, ), min-occurrences: 0; }; attribute from :: ; attribute id :: ; attribute to :: ; attribute type :: one-of(#"error", #"probe", #"subscribe", #"subscribed", #"unavailable", #"unsubscribe", #"unsubscribed"); attribute xml:lang :: ; end; define wrapped stanza client-show () name "show"; namespace "jabber:client"; content :: one-of(#"away", #"chat", #"dnd", #"xa"); end; define wrapped stanza client-status () name "status"; namespace "jabber:client"; content :: , check: content.size >= 1; end; define wrapped stanza client-priority () name "priority"; namespace "jabber:client"; content :: ; end; define stanza client-iq () name "iq"; namespace "jabber:client"; sequence-of { element error :: wrapped(, ), min-occurrences: 0; }; attribute from :: ; required attribute id :: ; attribute to :: ; required attribute type :: one-of(#"error", #"get", #"result", #"set"); attribute xml:lang :: ; end; define stanza client-error () name "error"; namespace "jabber:client"; sequence-of { element text :: wrapped(, ), min-occurrences: 0; }; attribute code :: ; required attribute type :: one-of(#"auth", #"cancel", #"continue", #"modify", #"wait"); end;