make-element children
Per Bothner
per@bothner.com
Fri Dec 20 10:36:00 GMT 2002
Jim White wrote:
> Hi Per.
>
> I was using make-element to generate XML output with lists of children.
> Unfortunately the only two ways I found to make it work was to either
> do everything with macros or to use apply. Neither is quite satisfying,
> and mixing the two is ugly. Although perhaps there would be something I
> could do with the macros and currying make-element?
Try using define-namespace and possibly setting --output-format:
$ java kawa.repl --output-format xml
#|kawa:1|# (define-namespace xsd "http://www.w3.org/2001/XMLSchema")
#|kawa:2|# (xsd:schema (xsd:element 'x) "stuff")
<xsd:schema><xsd:element>x</xsd:element>stuff</xsd:schema>
define-namespace doesn't appear to be in the manual. Oops.
Well, it isn't fully implemented, as I don't believe it works
lexically, like it should.
You might also want to experiemnt with KRL:
http://www.gnu.org/software/kawa/KRL.html
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
More information about the Kawa
mailing list