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]

Re: Kawa interface to TreeList?


Jocelyn Paine <popx@pop3.ifs.org.uk> writes:

> Are there plans to provide Kawa selectors and constructors for
> manipulating TreeLists? It would be useful for manipulating the
> structures generated by Per's XML parser.

There are a couple of convenient functions for constructing TreeLists.
Here is the limited documentation I just wrote:

 - Function: make-element tag [attribute ...] child ...
     Create a representation of a XML element, corresponding to
          <TAG ATTRIBUTE...>CHILD...</TAG>
     The result is a `TreeList', though if the result context is a
     consumer the result is instead "written" to the consumer.  Thus
     nested calls to `make-element' only result in a single `TreeList'.
     More generally, whether an ATTRIBUTE or CHILD is includded by
     copying or by reference is (for now) undefined.  The TAG should
     currently be a symbol, though in the future it should be a
     qualified name.  An ATTRIBUTE is typically a call to
     `amke-attribute', but it can be any attribute-valued expression.

 - Function: make-attribute name value...
     Create an "attribute", which is a name-value pair.  For now, NAME
     should be a symbol

The xquery implementation used (the Java implementation) of these.
-- 
	--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]