Quoting Raymond Wiker (rwiker@gmail.com):Possibly... cxml currently has such a macro only for its serialization
> Would it be an idea to add functionality similar to what
> plexippus-xpath provides via with-namespaces? I.e, a special variable
> that holds the current set of namespace tag/uri mappings, and have
> some some additional constructors that use split-qname to extract the
> tag and look-up the url from the current set of mappings.
API, i.e.
CL-USER> (cxml:with-xml-output (stp:make-builder)
(cxml:with-namespace ("a" "http://a")
(cxml:with-element "a:b"
(cxml:text "xyz"))))
#.(CXML-STP-IMPL::DOCUMENT
:CHILDREN '(#.(CXML-STP:ELEMENT
#| :PARENT of type DOCUMENT |#
:CHILDREN '(#.(CXML-STP:TEXT
#| :PARENT of type ELEMENT |#
:DATA
"xyz"))
:LOCAL-NAME "b"
:NAMESPACE-PREFIX "a"
:NAMESPACE-URI "http://a")))
That API can't really modify STP in place though; the builder only knows
how to set up a full document.