Dear Robby,
the collection concept doesnt support to store collections in collections, so i recommend that you create one database for each folder of your files: create db released (from folder released) create db wip (from folder released) create db workflow (from folder workflow)
Then you can get the Product 'X' of State 'Y' like the following: xquery doc('Y')//X
I hope this helps, dont hesitate to ask for more.
Kind regards, Andreas (BaseX Team)
Robby Pelssers schrieb:
Hi Andreas,
Thx for the quick answer...
But I'm not 100% sure we're on the same line here.
If I try to explain the structure on the file system it would be
${repository}
released
products -product1 product1.xml some images -product2 product2.xml -...
packages -package1 Package1.xml Some images -package2 Package2.xml ...
wip
products -product1 product1.xml some images -product2 product2.xml -...
packages -package1 Package1.xml Some images -package2 Package2.xml ...
workflow
products -product1 product1.xml some images -product2 product2.xml -...
packages -package1 Package1.xml Some images -package2 Package2.xml ...
So from your mail I understand I could first create 3 collections
- create coll released
- create coll wip
- create coll workflow
And then probably change dir into the released collection and create a collection for 'products' and 'packages'.
I was actually looking into the documentation (tab REST) and wondering if a client could insert a product by using a fully qualified path for addressing the correct collection.
Cheers, Robby
-----Original Message----- From: Andreas Weiler [mailto:andreas.weiler@uni-konstanz.de] Sent: Friday, May 07, 2010 5:24 PM To: Robby Pelssers Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] ways to insert and query for documents
Dear Robby Pelssers,
of course BaseX supports the concept of collections. You can add all three documents to one collection. Start with creating an empty collection: create coll states and then continue with adding the documents: add workflow.xml add workInProgress.xml add released.xml
or do it all in one by calling: basex -c "create coll states; add workflow.xml; add workInProgress.xml; add released.xml". Now you can use XQuery for getting your results.
I hope this helps, dont hesitate to ask for more.
Kind regards, Andreas (BaseX Team)
Robby Pelssers schrieb:
Hi all,
I was wondering if BaseX also supports the concept of having collections in the database.
The reason why I need collections is that I have xml files with the same identifier. My customer exports product information for different states (workflow | work in progress | released) to the file system currently but we would like to export everything to an xml database.
So I'd like to create 3 separate collections for the 3 states and being able to query for product 'X' in state 'Y'. Is this possible?
Robby Pelssers
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk