|
Hi Aron
Sorry for the slow response responding to your mail
- I've been kinda swamped lately.
A couple of quick questions before I
start...
Are you sending JDOM objects over RMI? If so I'd highly recommend
you send XML as XML text instead. Java Serialization of XML object models is
usually far slower than regular XML text parsing and writing.
Dennis Sosnoski has done some performance tests which demonstrate
this pretty conclusively:-
Again I'd recommend you pass it to the server as XML text, rather
than as an XML object model over RMI. Its more flexible (the server side can use
any XML technology to process it, JAXP, JDOM, dom4j, DOM, SAX, JAXB, XSLT etc)
and its much faster.
I think the general idea of turning input parameters into some XML
structure to that it can be processed using XML techniques is a good one. It
would be a nice way to validate form input using XML validation mechansims, such
as RelaxNG or XML Schema. Or XPath and XSLT can be used to process form results
etc.
I'd recommend that the tag simply output the text of the XML, then
it can be further processed by other tags and may be parsed into an XML object
model or XSLT engine if need be or just sent, as text to some other servlet or
web resource.
A simple tag of the form:-
<foo:parametersToXML seperator="_"/>
would do the trick so the JSP to accomplish the above could look
like:-
<someelementname>
<foo:parametersToXML seperator="_"/>
</someelementname> which is pretty cool.
Then using another taglib we could parse this XML and do something
with it - e.g. using XTags we could perform XPath on this...
<xtags:parse>
<someelementname>
<foo:parametersToXML seperator="_"/>
</someelementname> </xtags:parse>
<xtags:forEach select="//city">
City: <xtags:valueOf select="."/>
</xtags:forEach>
James
|
- JDOM taglib Aron Kramlik
- Re: JDOM taglib bayard
- James Strachan
