BaseX standalone with multiple catalog files

Friday, 3 October 2025 · 5 messages · last reply 6 Oct 2025
AG
Amanda Galtman3 Oct 2025 01:13 #
Hi, all. Does someone have a syntax example for using multiple catalogs with BaseX v12.0 standalone on Windows? The Options page in the BaseX documentation says CATALOG can be a semicolon-separated list of files, so I tried the following, where both catalog files are in my working directory: %BASEX120%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml" -q"doc('mycat1:/document.xml')"
java -cp "%BASEX120%\BaseX.jar" -Dorg.basex.CATALOG="catalog1.xml;catalog2.xml" org.basex.BaseX -q"doc('mycat1:/document.xml')"
The error messages suggest that the catalogs are not being used. I also tried several syntax variations without success. Both syntaxes above work fine if I specify only one catalog instead of a semicolon-separated list. For the record, the catalog1.xml file in my example commands is as below, and my document.xml file is in a subdirectory named "docs".
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteURI rewritePrefix="./docs/" uriStartString="mycat1:/" />
</catalog>
Thanks, Amanda
CG
Christian Grün6 Oct 2025 08:41 #
Hi Amanda, Thanks for the observation. It seems that we have accidentally dropped support for semicolon-separated catalog lists in a recent release (possibly with the alignments to the changed catalog resolver of a new JDK). I have just uploaded a fix [1, 2]; I hope it does what I hope it does. Best, Christian [1] https://files.basex.org/releases/latest/ [2] https://github.com/BaseXdb/basex/commit/e1e6f51859db807773a55e206232fb57462746a4
Quoted text · Amanda Galtman · 15 lines
Von: Amanda Galtman via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> Gesendet: Freitag, 3. Oktober 2025 01:13 An: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Betreff: [basex-talk] BaseX standalone with multiple catalog files Hi, all. Does someone have a syntax example for using multiple catalogs with BaseX v12.0 standalone on Windows? The Options page in the BaseX documentation says CATALOG can be a semicolon-separated list of files, so I tried the following, where both catalog files are in my working directory: %BASEX120%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml" -q"doc('mycat1:/document.xml')" java -cp "%BASEX120%\BaseX.jar" -Dorg.basex.CATALOG="catalog1.xml;catalog2.xml" org.basex.BaseX -q"doc('mycat1:/document.xml')" The error messages suggest that the catalogs are not being used. I also tried several syntax variations without success. Both syntaxes above work fine if I specify only one catalog instead of a semicolon-separated list. For the record, the catalog1.xml file in my example commands is as below, and my document.xml file is in a subdirectory named "docs". <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <rewriteURI rewritePrefix="./docs/" uriStartString="mycat1:/" /> </catalog> Thanks, Amanda
AG
Amanda Galtman6 Oct 2025 13:31 #
Hi, Christian. Thanks a lot. The fix works in my small test case, as well as in a real case that prompted my message. While trying out the latest BaseX, I noticed that if I repeat a catalog path, sometimes that causes an error. Not that I would knowingly repeat a catalog path in real life. You can decide if this is something to support or a user error. ###No repetition -- no error %BASEX1211006%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml;../../../github/xspec/src/catalog.xml" -q"doc('http://www.jenitennison.com/xslt/xspec/xproc/steps/run-xslt')/*/name()" p:declare-step ###Repeated catalog2.xml -- error %BASEX1211006%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml;catalog2.xml;../../../github/xspec/src/catalog.xml" -q"doc('http://www.jenitennison.com/xslt/xspec/xproc/steps/run-xslt')/*/name()" Stopped at C:/.../, 1/4: [FODC0002] 404: Not Found ### Repeated catalogs -- no error %BASEX1211006%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml;catalog2.xml;catalog1.xml;catalog2.xml" -q"doc('mycat1:/document.xml')" <hello/> Best regards, Amanda
Quoted text · Christian Grün · 38 lines
On Monday, October 6th, 2025 at 2:41 AM, Christian Grün <cg at basex.org> wrote: > Hi Amanda, > > Thanks for the observation. It seems that we have accidentally dropped support for semicolon-separated catalog lists in a recent release (possibly with the alignments to the changed catalog resolver of a new JDK). > > I have just uploaded a fix [1, 2]; I hope it does what I hope it does. > > Best, > Christian > > [1] https://files.basex.org/releases/latest/ > [2] https://github.com/BaseXdb/basex/commit/e1e6f51859db807773a55e206232fb57462746a4 > > --------------------------------------------------------------- > > Von: Amanda Galtman via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> > Gesendet: Freitag, 3. Oktober 2025 01:13 > An: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> > Betreff: [basex-talk] BaseX standalone with multiple catalog files > > Hi, all. > > Does someone have a syntax example for using multiple catalogs with BaseX v12.0 standalone on Windows? The Options page in the BaseX documentation says CATALOG can be a semicolon-separated list of files, so I tried the following, where both catalog files are in my working directory: > > %BASEX120%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml" -q"doc('mycat1:/document.xml')" > > java -cp "%BASEX120%\BaseX.jar" -Dorg.basex.CATALOG="catalog1.xml;catalog2.xml" org.basex.BaseX -q"doc('mycat1:/document.xml')" > > The error messages suggest that the catalogs are not being used. I also tried several syntax variations without success. Both syntaxes above work fine if I specify only one catalog instead of a semicolon-separated list. > > For the record, the catalog1.xml file in my example commands is as below, and my document.xml file is in a subdirectory named "docs". > > <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> > <rewriteURI rewritePrefix="./docs/" uriStartString="mycat1:/" /> > </catalog> > > Thanks, > Amanda
CG
Christian Grün6 Oct 2025 13:43 #
Thanks for the swift feedback, Amanda. It is interesting to hear that catalog must not be repeated (at least in some way, whatever that may be). It seems to be a peculiarity of the JDK-specific handling of catalog files, so I think I will keep it that way. By the way, I am also in contact with Norm. We are working on a solution to enable Calabash to use catalogs within BaseX steps. All the best, Christian
Quoted text · Amanda Galtman · 43 lines
Von: Amanda Galtman <galtmana at proton.me> Gesendet: Montag, 6. Oktober 2025 13:31 An: Christian Grün <cg at basex.org> Cc: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Betreff: Re: AW: [basex-talk] BaseX standalone with multiple catalog files Hi, Christian. Thanks a lot. The fix works in my small test case, as well as in a real case that prompted my message. While trying out the latest BaseX, I noticed that if I repeat a catalog path, sometimes that causes an error. Not that I would knowingly repeat a catalog path in real life. You can decide if this is something to support or a user error. ### No repetition -- no error %BASEX1211006%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml;../../../github/xspec/src/catalog.xml" -q"doc('http://www.jenitennison.com/xslt/xspec/xproc/steps/run-xslt')/*/name()" p:declare-step ### Repeated catalog2.xml -- error %BASEX1211006%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml;catalog2.xml;../../../github/xspec/src/catalog.xml" -q"doc('http://www.jenitennison.com/xslt/xspec/xproc/steps/run-xslt')/*/name()" Stopped at C:/.../, 1/4: [FODC0002] 404: Not Found ### Repeated catalogs -- no error %BASEX1211006%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml;catalog2.xml;catalog1.xml;catalog2.xml" -q"doc('mycat1:/document.xml')" <hello/> Best regards, Amanda On Monday, October 6th, 2025 at 2:41 AM, Christian Grün <cg at basex.org> wrote: Hi Amanda, Thanks for the observation. It seems that we have accidentally dropped support for semicolon-separated catalog lists in a recent release (possibly with the alignments to the changed catalog resolver of a new JDK). I have just uploaded a fix [1, 2]; I hope it does what I hope it does. Best, Christian [1] https://files.basex.org/releases/latest/ [2] https://github.com/BaseXdb/basex/commit/e1e6f51859db807773a55e206232fb57462746a4 Von: Amanda Galtman via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> Gesendet: Freitag, 3. Oktober 2025 01:13 An: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Betreff: [basex-talk] BaseX standalone with multiple catalog files Hi, all. Does someone have a syntax example for using multiple catalogs with BaseX v12.0 standalone on Windows? The Options page in the BaseX documentation says CATALOG can be a semicolon-separated list of files, so I tried the following, where both catalog files are in my working directory: %BASEX120%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml" -q"doc('mycat1:/document.xml')" java -cp "%BASEX120%\BaseX.jar" -Dorg.basex.CATALOG="catalog1.xml;catalog2.xml" org.basex.BaseX -q"doc('mycat1:/document.xml')" The error messages suggest that the catalogs are not being used. I also tried several syntax variations without success. Both syntaxes above work fine if I specify only one catalog instead of a semicolon-separated list. For the record, the catalog1.xml file in my example commands is as below, and my document.xml file is in a subdirectory named "docs". <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <rewriteURI rewritePrefix="./docs/" uriStartString="mycat1:/" /> </catalog> Thanks, Amanda
AG
Amanda Galtman6 Oct 2025 13:52 #
Leaving the peculiarity as is sounds fine to me. Glad to hear you and Norm are talking about catalogs in BaseX steps in XML Calabash 3. My question there is in good hands. Best regards, Amanda
Quoted text · Christian Grün · 84 lines
On Monday, October 6th, 2025 at 7:43 AM, Christian Grün <cg at basex.org> wrote: > Thanks for the swift feedback, Amanda. > > It is interesting to hear that catalog must not be repeated (at least in some way, whatever that may be). It seems to be a peculiarity of the JDK-specific handling of catalog files, so I think I will keep it that way. > > By the way, I am also in contact with Norm. We are working on a solution to enable Calabash to use catalogs within BaseX steps. > > All the best, > Christian > > --------------------------------------------------------------- > > Von: Amanda Galtman <galtmana at proton.me> > Gesendet: Montag, 6. Oktober 2025 13:31 > An: Christian Grün <cg at basex.org> > Cc: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> > Betreff: Re: AW: [basex-talk] BaseX standalone with multiple catalog files > > Hi, Christian. > > Thanks a lot. The fix works in my small test case, as well as in a real case that prompted my message. > > While trying out the latest BaseX, I noticed that if I repeat a catalog path, sometimes that causes an error. Not that I would knowingly repeat a catalog path in real life. You can decide if this is something to support or a user error. > > ### No repetition -- no error > > %BASEX1211006%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml;../../../github/xspec/src/catalog.xml" -q"doc('http://www.jenitennison.com/xslt/xspec/xproc/steps/run-xslt')/*/name()" > > p:declare-step > > ### Repeated catalog2.xml -- error > > %BASEX1211006%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml;catalog2.xml;../../../github/xspec/src/catalog.xml" -q"doc('http://www.jenitennison.com/xslt/xspec/xproc/steps/run-xslt')/*/name()" > > Stopped at C:/.../, 1/4: > [FODC0002] 404: Not Found > > ### Repeated catalogs -- no error > > %BASEX1211006%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml;catalog2.xml;catalog1.xml;catalog2.xml" -q"doc('mycat1:/document.xml')" > <hello/> > > Best regards, > Amanda > > On Monday, October 6th, 2025 at 2:41 AM, Christian Grün <cg at basex.org> wrote: > >> Hi Amanda, >> >> Thanks for the observation. It seems that we have accidentally dropped support for semicolon-separated catalog lists in a recent release (possibly with the alignments to the changed catalog resolver of a new JDK). >> >> I have just uploaded a fix [1, 2]; I hope it does what I hope it does. >> >> Best, >> Christian >> >> [1] https://files.basex.org/releases/latest/ >> [2] https://github.com/BaseXdb/basex/commit/e1e6f51859db807773a55e206232fb57462746a4 >> >> --------------------------------------------------------------- >> >> Von: Amanda Galtman via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> >> Gesendet: Freitag, 3. Oktober 2025 01:13 >> An: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> >> Betreff: [basex-talk] BaseX standalone with multiple catalog files >> >> Hi, all. >> >> Does someone have a syntax example for using multiple catalogs with BaseX v12.0 standalone on Windows? The Options page in the BaseX documentation says CATALOG can be a semicolon-separated list of files, so I tried the following, where both catalog files are in my working directory: >> >> %BASEX120%\bin\basex -OCATALOG="catalog1.xml;catalog2.xml" -q"doc('mycat1:/document.xml')" >> >> java -cp "%BASEX120%\BaseX.jar" -Dorg.basex.CATALOG="catalog1.xml;catalog2.xml" org.basex.BaseX -q"doc('mycat1:/document.xml')" >> >> The error messages suggest that the catalogs are not being used. I also tried several syntax variations without success. Both syntaxes above work fine if I specify only one catalog instead of a semicolon-separated list. >> >> For the record, the catalog1.xml file in my example commands is as below, and my document.xml file is in a subdirectory named "docs". >> >> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> >> <rewriteURI rewritePrefix="./docs/" uriStartString="mycat1:/" /> >> </catalog> >> >> Thanks, >> Amanda

⚡Generated with XQuery