Collection Functions [WAS Re: Character encodings]
2004-10-01 02:42:48 GMT
On Thu, 30 Sep 2004, Wolfgang Meier wrote: > >> I have one suggestion that makes working with the "collection" based >> functions easier - it would be different from xmldb:collection(), which >> currently expects a URI as its first argument to pass to >> DatabaseManager.getCollection(uri, user, pass). As a remote user I may not >> know the database-id of the engine running the query; it is not >> necessarily correct to assume that xmldb:exist:///db points to the local >> database. Also, the user running the query is already authenticated, so >> why should they pass authentication information again in the query? > > Yes, I already asked myself how to simplify the various xmldb: functions. Do > we really need to have two collection functions (three if we add > local-collection)? We already have fn:collection() and xmldb:collection(). > Why not extend fn:collection to accept an XMLDB URI? Instead of directly > creating a document set, fn:collection would return an object representing a > collection. This can then be either used to call administrative functions or > to create a document set for a query. Also, user and password could be > specified in the URI, so no additional arguments would be required. > > Wolfgang I think the problem with overloading the functionality of fn:collection is that like fn:xcollection(), it is specified to return a Node set, not an object. Better would be to stick with two (three?) functions, and overload xmldb:collection() to be xmldb:collection($nm as xs:string, $u as xs:string?, $p as xs:string?)(Continue reading)
-----------------+
tom dyson
t: +44 (0)1608 811870
m: +44 (0)7958 752657
RSS Feed