You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Gary Shea <sh...@gtsdesign.com> on 2002/10/01 04:08:21 UTC

coll not found should return null, right?

I'm working with CVS from a few days ago, trying to figure out how to
use the xindice-embed stuff.  I have a bit of XML:DB experience, but
all with eXist.  Thought I'd have a look at xindice, since it has
supposedly functioning XPathQuery and XUpdate services, which I could
really use.

I am under the impression that if I have the code (post-registration):

    Collection collection = DatabaseManager.getCollection (
        "xmldb:xindice-embed:///db/dog"
    );

and there is no 'dog' collection in /db, then collection will be
returned null.  The spec says the returned value is "A Collection
instance for the requested collection or null fi the collection could
not be found".

As far as I can see there's no way embed.DatabaseImpl.getCollection()
can ever return null, since it returns "new CollectionImpl (...)".

Am I missing something or is this a bug?  Or did the spec perhaps
'mature' since the code was originally written?

	Gary



Re: coll not found should return null, right?

Posted by Vladimir Bossicard <vl...@adnovum.com>.
> and there is no 'dog' collection in /db, then collection will be
> returned null.  The spec says the returned value is "A Collection
> instance for the requested collection or null fi the collection could
> not be found".

if the implementation and the specification are not in sync, there's a
bug.  What I would do:

- create a bug report (http://nagoya.apache.org/bugzilla/)
- (recommanded) if the xmlrpc implementation differs from the embed
version, write an integration test that shows the behaviour
- (optional) fix the embed version to correct the problem

-Vladimir