This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: make-element children


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]