Hi Frank,

On Fri, 2005-11-25 at 10:58 -0500, Frank W. Zammetti wrote:
> Has any thought been given to, or has any work been done already, to 
> creating a Javascript-based client-side version of Digester?  I'm 
> starting on a new project soon where I'll potentially have to be doing a 
> fair amount of client-side XML parsing, and it occurs to me that using 
> Digester would make my life A LOT easier.
> 
> Even if only a subset of functionality was available, I think it would 
> be a nice thing to have.  If this idea HASN'T been explored yet, would 
> there be any interest in it besides me?  I could possibly roll it into 
> my project as a to-do and get it done.

You may find difficulties trying to duplicate the general concept of
Digester in javascript. I tried to do it in Ruby, and found that it
doesn't fit terribly well with dynamically-typed languages. Quite a lot
of Digester depends upon the ability to perform reflection upon the
object on the top of the stack to determine what its properties are, and
what types they have. This information just isn't available in Ruby, nor
in Javascript. Some kind of "type declaration" framework (eg something
like java's BeanInfo descriptors) is really needed, I think, to provide
the info that Java classes give by default. I got stuck on this with the
Ruby port, and then got distracted by other stuff.

I don't mean to discourage you from attempting this, just give warning
that a 1:1 translation of Digester to a dynamically-typed language may
not be possible.

And of course if Digester is being reimplemented then that's a good
chance to clean things up quite a bit. Digester2 may be a good starting
point, or the ruby stuff at rubyforge:
  http://rubyforge.org/projects/xmldigester/

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to