[Laszlo-dev] full featured server-side xpath implementation
msanty at mac.com
Fri Mar 25 15:00:54 PST 2005
In evaluating Laszlo by developing a simple application, I have been
very frustrated with Laszlo's limited XPath support. Without the
ability to evaluate nested predicates and compound expressions, I find
myself writing quite a bit of code that I could avoid if the XPath
implementation was more robust. I've seen recommendations on the lists
for incorporating more feature-complete ECMAScript or ActionScript
XPath evaluators into xpath. While those might be great simple to
moderately complex queries, they do not seem to have the features that
Apache's Xalan-J processor supports. I realize that it wouldn't be
feasible (or possible) to use Xalan-J in a Laszlo application on the
client-side, so I started thinking that Xalan-J could be used on the
server-side to support arbitrary XPath queries. A servlet/JSP could be
created that took the XML structure and XPath expression as HTTP POST
data, and returned the resulting text or XML structure. This would
involve more latency for each XPath expression evaluation, but I think
that the added capabilities would warrant this cost in many situations.
As an additional idea, maybe we could programatically specify this
behavior when complex evaluations must be performed, but default to the
current client-side mechanism.
I'm looking for feedback on:
1) any more elegant methods for accomplishing full XPath 1.0 compliance
2) where to modify the existing Laszlo codebase to communicate back to
a server as described above.
Let me know what you think.
More information about the Laszlo-dev