On Thursday, January 10, 2002, at 11:04 PM, Dare Obasanjo wrote:


From the point of view of an implementor the XPathService returns Resources
within ResourceSets and this is way too coarse grained. In fact I feel the
concept of making ResourceSets the return value of XPath queries is a bad idea
for a few reasons


1.) It is inconsistent with standard XPath.
2.) It is confusing to novice developers.
3.) Very rarely is a user simply interested in just the documents that match
the query but in the actual nodes even for queries that return node lists.


Let's try a relational database analogy...

* Having queries return ResourceSets is like having all SQL queries return
WHOLE tables and not rows or computed values.


No, I think you're misunderstanding what resources are. They're an abstraction for any database content, be it a document, a blob, or a node someplace within a document. The only problem area is on retrieving atomic values like the value of an attribute and that is only a problem because of XPathQueryService returning XMLResources by default. An atomic value is not XML An atomic value would have to be some other type of resource.


If you execute a query that looks something like /some/path/to/a/[EMAIL PROTECTED] then the resource set of results should only contain the value of the selected nodes not the entire document. If the query returns a node set then each node from the node set is returned as an individual resource. Try this with Xindice or the ref. impl and you'll see that it works as you want. What won't work is trying to select /some/path/to/a/node/@blah, that would return an atomic value like a string or a number. That is the issue that needs to be resolved, the rest already works as you expect.

OK, how about an OODBMS analogy,

* Having queries return ResourceSets is like having all SQL queries return
WHOLE class instances and not fields or computed values.

I think, however you slice it there needs to be a seperate class of objects
returned by querys that are not as strongly related to Resources.


--
THINGS TO DO IF I BECOME AN EVIL OVERLORD #44
I will only employ bounty hunters who work for money. Those who work for the
pleasure of the hunt tend to do dumb things like even the odds to give the
other guy a sporting chance.


--
THINGS TO DO IF I BECOME AN EVIL OVERLORD #44
I will only employ bounty hunters who work for money. Those who work for the
pleasure of the hunt tend to do dumb things like even the odds to give the
other guy a sporting chance.



_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com

----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact administrator:  mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------


Kimbro Staken
XML Database Software, Consulting and Writing
http://www.xmldatabases.org/

----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact administrator:  mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------

Reply via email to