Re: [basex-talk] Problem with using XInclude in BaseX
Hi Virgile, I think the best solution for you will be to use the default XML parser, which is by default enabled. Only if you enable the internal parser (by selecting it in the GUI or setting INTPARSE to true), XInclude will not be supported. Hope this helps? Christian > Thank you for this explanation. If I understand correctly, using the > Internal XML parser does not generate an error only because it does > not process XInclude and keeps the files as is. This is only partially > convenient for me: I can at least generate my files, manipulate them > and export them but I don't take full advantage of the possibilities > allowed by XInclude. Do you know if it is possible to do something > about this? Is this something that depends on the functionality of > BaseX? > > Thanks in advance > > Bien cordialement, > > Virgile Reignier > > Christian Grün a écrit : > > > Bonjour Virgile, > > > > Merci bien pour l’observation. The internal XML parser does not > > support XInclude, only the standard parser does. I realized this had > > gone unnoticed in our documentation, and I’ve just revised the > > corresponding entry [1]. > > > > If a new installation of BaseX behaves differently, the contents of > > your .basex configuration files may differ [2]. > > > > Cordialement, > > Christian > > > > [1] https://docs.basex.org/wiki/Options#INTPARSE > > [2] https://docs.basex.org/wiki/Configuration > > > > On Wed, Mar 15, 2023 at 10:26 AM Virgile Reignier > > wrote: > >> > >> Hi Daniel, > >> > >> Even if it is indirect, you have solved my problem. As I read you, I > >> quickly reinstalled BaseX to see if the problem could be with version > >> 10.4. And re-importing my database made me pay attention to a little > >> "Use internal XML parser" checkbox in the import dialog. If I check > >> it, everything suddenly starts working properly. I tried again with > >> the 10.4 and it's really this checkbox that makes the difference. I > >> don't realise what impact this might have, but I can get on with my > >> work. > >> > >> A huge thank you. > >> > >> Virgile Reignier > >> > >> "Zimmel, Daniel" a écrit : > >> > >> > While this may not solve your problem, I can confirm that your files > >> > import just fine with BaseX 10.3 GUI on my Windows machine. > >> > There is a checkbox in the import dialog "Use XInclude", but it > >> > works regardless whether the I check or uncheck the box. > >> > > >> > -Ursprüngliche Nachricht- > >> > Von: BaseX-Talk Im > >> > Auftrag von Virgile Reignier > >> > Gesendet: Dienstag, 14. März 2023 18:55 > >> > An: basex-talk@mailman.uni-konstanz.de > >> > Betreff: [basex-talk] Problem with using XInclude in BaseX > >> > > >> > Bonjour, > >> > > >> > Je me permets de vous contacter dans le cadre de mon doctorat en > >> > histoire médiévale. Je souhaiterai en effet organiser le > >> > dépouillement de mes archives à l'aide d'une base de données en XML > >> > en utilisant le logiciel BaseX, mais je suis face à une difficulté > >> > que je n'arrive pas à surmonter dans son utilisation. Cette > >> > difficulté est liée à l'utilisation de la balise . > >> > > >> > J'ai tenté de produire un exemple minimaliste avec deux fichiers > >> > dans un même répertoire pour voir ce qui ne marche pas : > >> > > >> > file music.xml : > >> > > >> > http://www.w3.org/2001/XInclude;> > >> > Smoke on the water > >> > Deep Purple > >> > > >> > > >> > > >> > file label.xml : > >> > > >> > Purple Records > >> > > >> > Alors que ces deux fichiers sont décrits comme valides par Oxygen, > >> > l'importation du fichier music.xml avec BaseX (que ce soit avec > >> > l'interface DBA ou l'interface GUI) génère systématiquement l'erreur > >> > suivante : "An include with href 'label.xml'failed, and no fallback > >> > element was found". Je peux en revanche importer le fichier dans la > >> > base de données via Oxygen et l'utilisation du WebDAV de BaseX, mais > >> > le fichier est alors indiqué comme étant de type "binary" et est > >> > absolument inemployable pour réaliser des requêtes. > >> > > >> > J'ai pourtant tenté de réaliser la requête suivante au sein de ma DB > >> > dans BaseX GUI, ce qui n'a pas renvoyé d'erreurs : > >> > > >> > declare namespace xi = "http://www.w3.org/2001/XInclude;; > >> > > >> > xi:include > >> > > >> > J'ai également tenté de charger ces mêmes fichiers dans eXist DB, et > >> > l'inclusion s'est réalisée sans problèmes. Je ne comprends donc pas > >> > ce qui ne va pas avec l'utilisation de XInclude dans BaseX. Est-ce > >> > qu'il y a un problème avec la résolution des URI ? > >> > > >> > Je travaille sous Windows 10 (j'ai aussi fait des tests sur Ubuntu > >> > et obtenu le même résultat), BaseX 10.4 et Java 1.8.0_361. > >> > > >> > Est-ce que c'est quelque chose qui vous est déjà arrivé ? J'ai > >> > essayé de chercher dans les archives mail de basex-talk et trouvé > >> > quelques problèmes similaires, mais qui ont été résolus par l'emploi > >> > de BaseX GUI. Or chez moi cela
Re: [basex-talk] Problem with using XInclude in BaseX
Bonjour Christian, Thank you for this explanation. If I understand correctly, using the Internal XML parser does not generate an error only because it does not process XInclude and keeps the files as is. This is only partially convenient for me: I can at least generate my files, manipulate them and export them but I don't take full advantage of the possibilities allowed by XInclude. Do you know if it is possible to do something about this? Is this something that depends on the functionality of BaseX? Thanks in advance Bien cordialement, Virgile Reignier Christian Grün a écrit : Bonjour Virgile, Merci bien pour l’observation. The internal XML parser does not support XInclude, only the standard parser does. I realized this had gone unnoticed in our documentation, and I’ve just revised the corresponding entry [1]. If a new installation of BaseX behaves differently, the contents of your .basex configuration files may differ [2]. Cordialement, Christian [1] https://docs.basex.org/wiki/Options#INTPARSE [2] https://docs.basex.org/wiki/Configuration On Wed, Mar 15, 2023 at 10:26 AM Virgile Reignier wrote: Hi Daniel, Even if it is indirect, you have solved my problem. As I read you, I quickly reinstalled BaseX to see if the problem could be with version 10.4. And re-importing my database made me pay attention to a little "Use internal XML parser" checkbox in the import dialog. If I check it, everything suddenly starts working properly. I tried again with the 10.4 and it's really this checkbox that makes the difference. I don't realise what impact this might have, but I can get on with my work. A huge thank you. Virgile Reignier "Zimmel, Daniel" a écrit : > While this may not solve your problem, I can confirm that your files > import just fine with BaseX 10.3 GUI on my Windows machine. > There is a checkbox in the import dialog "Use XInclude", but it > works regardless whether the I check or uncheck the box. > > -Ursprüngliche Nachricht- > Von: BaseX-Talk Im > Auftrag von Virgile Reignier > Gesendet: Dienstag, 14. März 2023 18:55 > An: basex-talk@mailman.uni-konstanz.de > Betreff: [basex-talk] Problem with using XInclude in BaseX > > Bonjour, > > Je me permets de vous contacter dans le cadre de mon doctorat en > histoire médiévale. Je souhaiterai en effet organiser le > dépouillement de mes archives à l'aide d'une base de données en XML > en utilisant le logiciel BaseX, mais je suis face à une difficulté > que je n'arrive pas à surmonter dans son utilisation. Cette > difficulté est liée à l'utilisation de la balise . > > J'ai tenté de produire un exemple minimaliste avec deux fichiers > dans un même répertoire pour voir ce qui ne marche pas : > > file music.xml : > > http://www.w3.org/2001/XInclude;> > Smoke on the water > Deep Purple > > > > file label.xml : > > Purple Records > > Alors que ces deux fichiers sont décrits comme valides par Oxygen, > l'importation du fichier music.xml avec BaseX (que ce soit avec > l'interface DBA ou l'interface GUI) génère systématiquement l'erreur > suivante : "An include with href 'label.xml'failed, and no fallback > element was found". Je peux en revanche importer le fichier dans la > base de données via Oxygen et l'utilisation du WebDAV de BaseX, mais > le fichier est alors indiqué comme étant de type "binary" et est > absolument inemployable pour réaliser des requêtes. > > J'ai pourtant tenté de réaliser la requête suivante au sein de ma DB > dans BaseX GUI, ce qui n'a pas renvoyé d'erreurs : > > declare namespace xi = "http://www.w3.org/2001/XInclude;; > > xi:include > > J'ai également tenté de charger ces mêmes fichiers dans eXist DB, et > l'inclusion s'est réalisée sans problèmes. Je ne comprends donc pas > ce qui ne va pas avec l'utilisation de XInclude dans BaseX. Est-ce > qu'il y a un problème avec la résolution des URI ? > > Je travaille sous Windows 10 (j'ai aussi fait des tests sur Ubuntu > et obtenu le même résultat), BaseX 10.4 et Java 1.8.0_361. > > Est-ce que c'est quelque chose qui vous est déjà arrivé ? J'ai > essayé de chercher dans les archives mail de basex-talk et trouvé > quelques problèmes similaires, mais qui ont été résolus par l'emploi > de BaseX GUI. Or chez moi cela marche aussi mal avec GUI qu'avec > DBA. Je peux transférer mon travail sur eXist DB, mais j'avoue > m'être assez familiarisé avec BaseX et souhaiterai rester sur ce > logiciel tant que possible. Je suis donc preneur de toutes vos > propositions. > > En vous remerciant par avance pour vos réponses, > > Bien cordialement, > > Virgile Reignier > > Hello, > > I am contacting you as part of my PhD in medieval history. I would > like to organise the analysis of my archives with the help of an XML > database using the BaseX software, but I am encountering a > difficulty that I cannot overcome in its use. This difficulty is > related to the use of the tag. > > I tried to produce a minimalist example with two files in the same >
Re: [basex-talk] Progress bar (again)
Yes, this works great in the console! However I can see why it is better to stick to the standard functions. In my case, this does not work when running via an Ant apply task, since Ant has its own loggers and is doing something internally which prevents jumping to the start of the line. Perhaps there is a way to do this with Ant, but I do not think this is a good idea for portability... Thanks for the insight, Daniel -Ursprüngliche Nachricht- Von: Christian Grün Gesendet: Mittwoch, 15. März 2023 17:37 An: Zimmel, Daniel Cc: basex-talk@mailman.uni-konstanz.de Betreff: Re: [basex-talk] Progress bar (again) > Thanks, I was hoping there might be some way to update the output result > instead of simply adding to output. > I just ran a 420 minutes regular expressions query, which I might be > going to optimize now because there is not much visible progress > anymore :-P Sorry, now I got it. You could try something like this: for $i in 1 to 100 let $string := string-join(( (: yields , and jumps to the beginning of the current line :) string:cr(), 'FORTSCHRITT: ', (1 to $i idiv 5) ! '.', $i, '%' )) return ( prof:sleep(50), (: calls System.err.println($string) :) Q{java.lang.System}err() => Q{java.io.PrintStream}print($string) ) I think we won’t offer a built-in function for that, as the result of functions like fn:trace, prof:dump, etc. will be sent to different output channels, some of which won’t allow the overwriting of output that has previously been sent. Hope this helps, Christian