Hello all!

I've been having a look at the TODO for Struts 1.1, and some of the
suggestions are quite interesting. Of particular interest is the proposal
to introduce XPath as a mechanism to reference property names. Although it
maybe early to discuss this, I'm interested in floating a few
ideas/questions (although these may have already been addressed?)

1. Is it intended that the Struts team would implement their own XPath
processing engine, or simply a set of interfaces and adapter classes to
existing XPath implementations? (ie. Xalan, Saxon, etc)
2. How will beans become the target of an XPath expression? I have thought
of the possibility of a class 'BeanDOMAdapter', that implements the
org.w3c.Node interface... the standard bean introspection methods, BeanInfo
and FeatureDescriptor classes, etc will then be used to determine which
properties of a bean become elements, and which become attributes
(although, possibly a simpler approach is to just assume that all
properties of a bean become elements?). Evaluating an XPath expression
against a bean is then simply a matter of passing the bean intto an
instance of BeanDOMAdapter and feeding the DOMAdapter (which implements
Node) into the XPath engine... (okay, its a little more complicated when
you consider expressions that return node-sets).
3. How will the standard tags change such that XPaths will be introduced as
an access path to properties. Will we test the 'property' attribute to see
if it starts with an 'xpath:' prefix, otherwise treat it as a property name
under the current syntax? Or will we introduce an 'xpath' attribute to each
tag?

Regards,
James W.

--------------------------------------------------------------------------
This e-mail is from Cards Etc Pty Ltd (ACN: 069 533 302). It may contain
privileged and confidential information. It is intended for the named
recipient(s) only. If you are not an intended recipient, please notify us
immediately by reply e-mail or by phone on +61 2 9212 7773 & delete this
e-mail from your system.
--------------------------------------------------------------------------


Reply via email to