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: how to have as-xml output to e.g. a (Scheme) string/port?


Hoehle, Joerg-Cyril wrote:
> As an old Common Lisper, I got very confused that
> (list (values 1 2)) -> (12)   ; all values represented as an object

The word "object" may not be quite right, and to the extent that it
is an object that is part of the implementation, not the intended
sementics.  (The main difference is that objects have identity, and
multiple values don't.)

> whereas in Common Lisp -> (1) ; extra values are dropped.

Yes.  The Kawa beheviour is allowed but not required by R5RS, since
R5RS only let you use multiple values in very restricted contexts.
However, the Kawa semantics are useful - and required for XQuery.

> #|kawa:33|# (invoke (as-xml (make-element 'p ...)) 'get-class)
> class gnu.mapping.Values

This of course is just how the implementation works, not part of
the Kawa specification.

> That has consequences: Common Lisp in kawa can only be a rough approximation.
 > Behaviour of multiple values is radically different.

Yes.  Of course when/if we add mutliple language support to the Kawa
implementation of Common Lisp, then we have to make sure extra values
get dropped as required by the CL spec.

> PS: I started editing kawa.texi from 1.68. I suppose it's the root of
 > all the other documents.

Yes, in the sense that the online documentation is generated from
kawa.texi.  However four things to note:

(1) The most current version is the one in CVS, so it is best to start
from the CVS version.  However, the differences are not big.

(2) I much prefer to receive changes as patches, not updated files,
since I might have edited the file myself in the meanwhile.  I.e. use
cvs diff -u kawa.texi
and send the output to the kawa list.

(3) Unrelated fixes should generally be sent as multiple patches, rather
than one big patch.  A single big patch makes it difficult to evaluate
which patches I want to apply, which I don't want, and which need more
work.  On the other hand, if it is 10 obvious typos, you can send that
as a single message, rather than 10.

(4) Kawa and its documentation are copyrighted in my name, so do not
submit any changes to Kawa unless you intend me to do what I want with
them.  Of course I try to give credit, at least in the ChangeLogs.

Thanks!  Any help is appreciated.
-- 
	--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]