25 messages in org.ibiblio.lists.xom-interest[XOM-interest] Recursion
FromSent OnAttachments
Wolfgang HoschekFeb 9, 2004 6:42 pm 
Elliotte Rusty HaroldFeb 10, 2004 9:25 am 
Wolfgang HoschekFeb 10, 2004 3:23 pm 
jco...@reutershealth.comFeb 10, 2004 3:48 pm 
Elliotte Rusty HaroldFeb 11, 2004 1:21 pm 
Wolfgang HoschekFeb 11, 2004 1:24 pm 
jco...@reutershealth.comFeb 11, 2004 2:15 pm 
Elliotte Rusty HaroldFeb 11, 2004 3:18 pm 
jco...@reutershealth.comFeb 11, 2004 4:20 pm 
Francois BeausoleilFeb 11, 2004 8:08 pm 
Trimmer, ToddFeb 12, 2004 11:57 am 
Elliotte Rusty HaroldFeb 12, 2004 2:53 pm 
Trimmer, ToddFeb 13, 2004 1:26 pm 
Elliotte Rusty HaroldMar 8, 2004 3:17 pm 
jco...@reutershealth.comMar 8, 2004 4:06 pm 
Elliotte Rusty HaroldMar 8, 2004 4:34 pm 
Elliotte Rusty HaroldMar 9, 2004 11:55 am 
Bradley S. HuffmanMar 9, 2004 12:09 pm 
Elliotte Rusty HaroldMar 9, 2004 1:05 pm 
jco...@reutershealth.comMar 9, 2004 2:04 pm 
jco...@reutershealth.comMar 9, 2004 4:32 pm 
Elliotte Rusty HaroldMar 9, 2004 10:43 pm 
John CowanMar 9, 2004 10:58 pm 
Elliotte Rusty HaroldMar 10, 2004 6:12 am 
Dirk BergstromMar 10, 2004 6:25 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[XOM-interest] RecursionActions...
From:Elliotte Rusty Harold (elh@metalab.unc.edu)
Date:Mar 9, 2004 1:05:31 pm
List:org.ibiblio.lists.xom-interest

I've now pulled the recursion out of the Canonicalizer. Outside of samples, (hmm, should probably add a non-recursive sample as well) there are now by my count three significant places that use recursion when walking a tree:

1. The Serializer, which I'm pretty sure I'm not going to fix because the changes to the API and consequent limited functionality would be too severe. The Canonicalizer's API is not nearly as rich so I was able to fix it there. Possibly I'll add a NonRecursiveSerializer to the samples package.

2. XInclude, whose code is so yucky and nasty I don't want to touch it, at least not yet. I'll probably throw a lot of this away and rewrite the internals at some point in the future. When I do that, I may make it non-recursive, but not just yet.

3. The Element copy constructor, and by extension Element's copy method. This is the one I'm on the fence about. It's not that much harder to make it non-recursive. The problem is that if I do so, then descendant elements can lose their subclasses since the copies will be created with the Element constructor and copy() method rather than the Element subclass copy constructor and copy method. This could be fixed but only by adding an additional protected method to the Element API that creates an empty element of the right subclass which copy could then call. That's a fairly large wart in the API just to avoid an uncommon problem that can be solved by setting a larger stack size when invoking the Java virtual machine. What do people think?