Hi Hans,
2010/5/30 Hans Hübner hans.huebner@gmail.com:
I pulled your changes into my repository, thanks again!
Splendid, I'm happy that my trivial work has been useful!
I'm going to further test the changes and come up with a small list of enhancements/doubts, I'll try to be as succinct as possible. At this stage I only have one of each, which I will put here just to exemplify:
1) As it is write-to-xml defaults to *standard-output*. It seems sensible to me to do so, and one can always provide a different stream. The tutorial, however, seems to indicate that write-to-xml should return the XML output as a return value... not sure if adapting the tutorial is the best course, or changing the way write-to-xml works by using a string stream and returning the output (I've tried, it works, but returns everything escaped, which is aesthetically doubtful) 2) As it is one can't use lists (including cons) as slot values. I've found this by having a "location" slot in my "army" class which is represented by a cons like (X . Y). This returns an error (since the test is made with consp, but the cdr isn't a list). For cons the "fix" is easy (e.g. use alexandria's proper-list-p), but when a slot value is really a list the output isn't as expected: a class which has '(1 2 3) has a slot value will produce:
<element>1</element> <element>2</element> <element>3</element>
instead of what would be expected:
<element>'(1 2 3)</element>
I'm trying to find a way to deal with this. Ultimately one can always say that list values shouldn't be used.
Again, there is no pressure in terms of replying to this observations: I'll continue to tackle them as I see fit (right or wrong), and then provide something more concrete which can be reviewed.
Regards,
Frederico