List all raw files
Tuesday, 23 September 2014 · 5 messages
CG
Hi France,
this is another, more efficient solution:
db:list-details('input')[@raw = 'true']/string()Hope this helps,
Christian
Quoted text · France Baril · 19 lines
On Mon, Sep 22, 2014 at 11:40 PM, France Baril <france.baril at architextus.com > wrote: > Hi, > > Is there a way to list files based on their properties. I'm trying to list > all raw files. > > So far, the approach I found takes a while to execute: > * db:list > * for each listed item check if is-raw > > Is there a better way to approach this? > > > -- > France Baril > Architecte documentaire / Documentation architect > france.baril at architextus.com >
FB
France Baril23 Sep 2014 01:41 #
Hi,
Is there a way to list files based on their properties. I'm trying to list all raw files.
So far, the approach I found takes a while to execute:
*
db:list
* for each listed item check if is-raw
Is there a better way to approach this?--
France Baril
Architecte documentaire / Documentation architect
france.baril at architextus.com
FB
Perfect! Big thanks! That's exactly what I was looking for.
It might be useful to have at least one resource element as an example in the documentation. It was not obvious to me that I could get the raw property from list-details. Even as I read it again with the extra knowledge, it's not obvious to me. I'm guessing it falls under 'resource type'.
Quoted text · Christian Grün · 34 lines
On Mon, Sep 22, 2014 at 3:08 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi France, > > this is another, more efficient solution: > > db:list-details('input')[@raw = 'true']/string() > > Hope this helps, > Christian > > > On Mon, Sep 22, 2014 at 11:40 PM, France Baril < > france.baril at architextus.com> wrote: > >> Hi, >> >> Is there a way to list files based on their properties. I'm trying to >> list all raw files. >> >> So far, the approach I found takes a while to execute: >> * db:list >> * for each listed item check if is-raw >> >> Is there a better way to approach this? >> >> >> -- >> France Baril >> Architecte documentaire / Documentation architect >> france.baril at architextus.com >> > >
--
France Baril
Architecte documentaire / Documentation architect
france.baril at architextus.com
CG
Christian Grün23 Sep 2014 15:14 #
Quoted text · France Baril · 5 lines
> It might be useful to have at least one resource element as an example in > the documentation. It was not obvious to me that I could get the raw > property from list-details. Even as I read it again with the extra > knowledge, it's not obvious to me. I'm guessing it falls under 'resource > type'.
I have slightly modified the description of the function. You are invited to edit our Wiki articles whenever you feel that some particular information is missing!
FB
France Baril23 Sep 2014 21:39 #
Thanks!
Written for BaseX 7.9. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery