[cxml-devel] Possible bug in cxml-stp

David Lichteblau david at lichteblau.com
Tue May 22 22:02:04 UTC 2012


Quoting Raymond Wiker (rwiker at gmail.com):
> 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.

Possibly...  cxml currently has such a macro only for its serialization
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.


d.




More information about the cxml-devel mailing list