Sylvain Wallez wrote:

Vadim Gritsenko wrote:

My initial though was to have following syntax:

dom:[request|session|context]:<attribute-name>#<jxpath>

Xpath, and '#' symbol is obviously optional, and '#' was chosen for consistency with existing xmldb: protocol.



Just some thoughts: - why "dom" only? We should also allow XMLizable objects.


"dom" is good and short protocol name. XMLizable can be (and should be) easily supported, too. I thought of JXPath, actually, which would support Java Beans and collections too.


- what about using input modules?


Good idea! Do we have upload module already? This will quickly deprecate part: protocol :)


We already have some modules that give access to all the above-mentioned attributes and more. This avoids code duplication, improves consistency and allows further extension by simply adding new input-modules.

Considering this, we should find another name for the protocol: "input-module" (too long), "module" (not significant enough), "xml-module" (better)?


Still long ;-) How about "xmodule"? :)


And then the protocol syntax becomes:
 xml-module:<module-name>:<attribute-name>#<jxpath>

E.g. "xml-module:session-attr:purchase-order#item[1]"


xmodule:session:purchase-order#item[1] is even better ;-)

Vadim




Reply via email to