Hi all,
Is there any opinion on how results of the XPath query returning attribute(s), text node(s), comment node(s), etc should look like? Up to the couple of days ago, it would just add those to the resulting document, and pass those DOM nodes as is. This causes issues:
* With XML-RPC (can't build resulting document - can't have 2 attributes; merges text nodes; etc)
* With source meta data attributes (can't attach meta data attributes to attributes / text / etc)
Solution to this problem is to create result element in query namespace (<query:result>) to hold these result nodes. This solves both issues above. The only question left which I have is what should XMLResource on the client side return on getContent() and getContentAsDOM(). There are two options:
(a) Return <query:result> element containing result node (attribute / text / etc), as well as source meta attributes.
(b) Return result node alone. User would have to use getContentAsDOM().getOwnerDocument() to get hold of source meta attributes, and via getContent() those meta attributes would not be available at all. It also looses name of the result attribute (passes only value).
Any opinions? I'm think first option is better.
Vadim