From: Jean-Marc V. <jm...@fr...> - 2004-08-29 09:05:09
|
Sava wrote: >Hi All, > >I've been eXist user for almost a year, and while most of my eXist >administration tasks are related to quering or adding/removing files, I came >across annoying issue while using eXist Admin tool (which in fact I really >like!): > >- inability to sort files by file_name; In collections that consists of few >hundreds (even thousands)of files, there is no easy way of finding a file with >specific name; > > I had a look in : http://demo.exist-db.org/exist/xquery/functions.xq and found these XQuery functions: *collection($a as xs:string+, ...) node** Includes the documents contained in the specified collection into the input sequence. eXist interprets the arguments as absolute paths pointing to database collections, as for example, '/db/test'. Documents located in subcollections of a collection are included into the input set. *xcollection($a as xs:string+, ...) node** Works like fn:collection, but does not include documents found in subcollections of the specified collections. This function is specific to eXist and will be moved into a seperate module in the near future. I tested this query that seems to do what you want: for $f in collection ("/db")/* order by $f ascending return fn:document-uri($f) Or you can filter document names this way: let $document-name-substring := "t" for $f in collection ("/db")/* where contains(string($f), $document-name-substring) order by $f ascending return fn:document-uri($f) Alas, this form doesn't really filter. One more bug to correct :-( ! >- Also, is there a command that would OPEN a file for editing? > >GET xyz.xml would only display content of the file, but how to open a file for >editing (except by double-clicking!!!)? > > So you want to add a new command, say "edit" that would do the same as double-clicking on the file name. You can do it in method: org.exist.client.InteractiveClient.process(String line) The class displaying the XML editor is DocumentView Just see how it is instanciated in class ClientFrame. >------------------------------------------------- > >What is the "good" alternative to eXist administration client? > > You could extends the current Web administration menu. There is also a XMLDB client from DSTC, Australia : http://titanium.dstc.edu.au/xml/xmldbgui/ But if you could specify what features would have a "good" alternative to eXist administration client ? Myself I see a nice feature: - in the XQuery tool associate a description with the stored queries - also associate a list of parameters with each stored query |