Hi Jan,


Op 8 apr 2011, om 08:26 heeft Jan Vlčinský (CAD) het volgende geschreven:

I like the feature, this is something, I was dreaming about, as we archive old xml files in zip files and importing them this way would easy the work quite well.
It does not work perfecktly as my test is failing on some archives with 
Command: CREATE DB ZipTest D:\var\TICEReports\aws1\ziptest
Error: "..." (Line 1): The processing instruction target matching "[xX][mM][lL]" is not allowed.

Looks like there's an error in one of your XML files, there's probably some whitespace before the XML declaration, that would trigger this error.


Another wish for importing: sometime I have hundreds of xml files and some might be broken xml documents. Currently import always fails. It would be great to have an option "ignore invalid documents" which would allow quick import

Oooo yes! I want that too. Usecase: Sometimes during development some crud ends up in the folder I'm trying to import, f.i. from a bad export from another system. Then I have to clean everything first before importing into BaseX. But really, I don't care if a couple of documents fail to import, it's development and I don't need all of the documents in the DB.

and which would print out file names of those invalid documents.

So for cleaning I use a shell script with a for loop and 'xmllint -noout "$f"'. That automates it, but it would be a "nice to have" anyway if I can tell BaseX to just ignore files with errors, that would also work with .zip files, a shell script doesn't. 

Hartelijke groet,

Huib.

--
Drs. Huib Verweij
Senior software developer - The Language Archive
Max Planck Institute for Psycholinguistics
P.O. Box 310
6500 AH Nijmegen
The Netherlands