You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(31) |
Nov
(25) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(48) |
Feb
(62) |
Mar
(22) |
Apr
(29) |
May
(9) |
Jun
(45) |
Jul
(28) |
Aug
(41) |
Sep
(60) |
Oct
(96) |
Nov
(99) |
Dec
(70) |
2003 |
Jan
(98) |
Feb
(159) |
Mar
(164) |
Apr
(150) |
May
(143) |
Jun
(97) |
Jul
(184) |
Aug
(143) |
Sep
(207) |
Oct
(126) |
Nov
(159) |
Dec
(165) |
2004 |
Jan
(131) |
Feb
(229) |
Mar
(220) |
Apr
(212) |
May
(320) |
Jun
(223) |
Jul
(191) |
Aug
(390) |
Sep
(261) |
Oct
(229) |
Nov
(215) |
Dec
(184) |
2005 |
Jan
(221) |
Feb
(312) |
Mar
(336) |
Apr
(273) |
May
(359) |
Jun
(277) |
Jul
(303) |
Aug
(321) |
Sep
(256) |
Oct
(415) |
Nov
(428) |
Dec
(508) |
2006 |
Jan
(585) |
Feb
(419) |
Mar
(496) |
Apr
(296) |
May
(403) |
Jun
(404) |
Jul
(553) |
Aug
(296) |
Sep
(252) |
Oct
(416) |
Nov
(414) |
Dec
(245) |
2007 |
Jan
(354) |
Feb
(422) |
Mar
(389) |
Apr
(298) |
May
(397) |
Jun
(318) |
Jul
(315) |
Aug
(339) |
Sep
(253) |
Oct
(317) |
Nov
(350) |
Dec
(264) |
2008 |
Jan
(353) |
Feb
(313) |
Mar
(433) |
Apr
(383) |
May
(343) |
Jun
(355) |
Jul
(321) |
Aug
(338) |
Sep
(242) |
Oct
(206) |
Nov
(199) |
Dec
(279) |
2009 |
Jan
(327) |
Feb
(221) |
Mar
(280) |
Apr
(278) |
May
(237) |
Jun
(345) |
Jul
(322) |
Aug
(324) |
Sep
(676) |
Oct
(586) |
Nov
(735) |
Dec
(329) |
2010 |
Jan
(619) |
Feb
(424) |
Mar
(529) |
Apr
(241) |
May
(312) |
Jun
(554) |
Jul
(698) |
Aug
(576) |
Sep
(408) |
Oct
(268) |
Nov
(391) |
Dec
(426) |
2011 |
Jan
(629) |
Feb
(512) |
Mar
(465) |
Apr
(467) |
May
(475) |
Jun
(403) |
Jul
(426) |
Aug
(542) |
Sep
(418) |
Oct
(620) |
Nov
(614) |
Dec
(358) |
2012 |
Jan
(357) |
Feb
(466) |
Mar
(344) |
Apr
(215) |
May
(408) |
Jun
(375) |
Jul
(241) |
Aug
(260) |
Sep
(401) |
Oct
(461) |
Nov
(498) |
Dec
(294) |
2013 |
Jan
(453) |
Feb
(447) |
Mar
(434) |
Apr
(326) |
May
(295) |
Jun
(471) |
Jul
(463) |
Aug
(278) |
Sep
(525) |
Oct
(343) |
Nov
(389) |
Dec
(405) |
2014 |
Jan
(564) |
Feb
(324) |
Mar
(319) |
Apr
(319) |
May
(384) |
Jun
(259) |
Jul
(210) |
Aug
(219) |
Sep
(315) |
Oct
(478) |
Nov
(207) |
Dec
(316) |
2015 |
Jan
(222) |
Feb
(234) |
Mar
(201) |
Apr
(145) |
May
(367) |
Jun
(318) |
Jul
(195) |
Aug
(210) |
Sep
(234) |
Oct
(248) |
Nov
(217) |
Dec
(189) |
2016 |
Jan
(219) |
Feb
(177) |
Mar
(110) |
Apr
(91) |
May
(159) |
Jun
(124) |
Jul
(192) |
Aug
(119) |
Sep
(125) |
Oct
(64) |
Nov
(80) |
Dec
(68) |
2017 |
Jan
(156) |
Feb
(312) |
Mar
(386) |
Apr
(217) |
May
(89) |
Jun
(115) |
Jul
(79) |
Aug
(122) |
Sep
(100) |
Oct
(99) |
Nov
(129) |
Dec
(77) |
2018 |
Jan
(106) |
Feb
(78) |
Mar
(160) |
Apr
(73) |
May
(110) |
Jun
(160) |
Jul
(93) |
Aug
(92) |
Sep
(75) |
Oct
(147) |
Nov
(114) |
Dec
(97) |
2019 |
Jan
(141) |
Feb
(78) |
Mar
(158) |
Apr
(60) |
May
(123) |
Jun
(54) |
Jul
(44) |
Aug
(147) |
Sep
(117) |
Oct
(54) |
Nov
(74) |
Dec
(96) |
2020 |
Jan
(113) |
Feb
(125) |
Mar
(142) |
Apr
(57) |
May
(71) |
Jun
(99) |
Jul
(58) |
Aug
(81) |
Sep
(49) |
Oct
(50) |
Nov
(63) |
Dec
(37) |
2021 |
Jan
(37) |
Feb
(45) |
Mar
(39) |
Apr
(18) |
May
(14) |
Jun
(9) |
Jul
(44) |
Aug
(23) |
Sep
(13) |
Oct
(31) |
Nov
(13) |
Dec
(33) |
2022 |
Jan
(17) |
Feb
(8) |
Mar
(32) |
Apr
(7) |
May
(17) |
Jun
(7) |
Jul
(36) |
Aug
(29) |
Sep
(9) |
Oct
(20) |
Nov
(10) |
Dec
(1) |
2023 |
Jan
(30) |
Feb
(37) |
Mar
(23) |
Apr
(1) |
May
(14) |
Jun
(5) |
Jul
(3) |
Aug
(6) |
Sep
(5) |
Oct
(48) |
Nov
(4) |
Dec
(29) |
2024 |
Jan
(1) |
Feb
|
Mar
(21) |
Apr
(6) |
May
(16) |
Jun
(41) |
Jul
(11) |
Aug
(17) |
Sep
(16) |
Oct
(11) |
Nov
(3) |
Dec
(9) |
2025 |
Jan
(7) |
Feb
(7) |
Mar
(6) |
Apr
(6) |
May
(30) |
Jun
(8) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Harris, B. T. (GSFC-5870) <ber...@na...> - 2023-03-15 13:22:32
|
Thanks for the suggestions. If I replace the import statement with the declaration of the test namespace, I get Cannot compile xquery: err:XPST0017 Call to undeclared function: test:suite Your other suggestion to simplify the assertXPath expression might work on this simple case, but I actually want to get the assertXPath working for other, more complicated, functions. I was trying to get this simple case working before using assertXPath on other, more important and complex functions. Any other suggestions? Thanks. Bernie From: Juri Leino <ju...@ex...> Date: Wednesday, March 15, 2023 at 8:58 AM To: "Harris, Bernard T. (GSFC-5870)" <ber...@na...> Cc: "exi...@li..." <exi...@li...> Subject: [EXTERNAL] Re: [Exist-open] %test:assertXPath help Hi Bernard! I would replace import module namespace test="http://exist-db.org/xquery/xqsuite"<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexist-db.org%2Fxquery%2Fxqsuite&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7C9d7457058d8446cbad0408db2554e211%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638144819057640707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=U5DOAQhB5y9KN7wqqPMM8RkiydlgrTZTdsggwc65fgU%3D&reserved=0> at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql"<resource:org/exist/xquery/lib/xqsuite/xqsuite.xql>; with declare namespace test="http://exist-db.org/xquery/xqsuite"<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexist-db.org%2Fxquery%2Fxqsuite&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7C9d7457058d8446cbad0408db2554e211%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638144819057640707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=U5DOAQhB5y9KN7wqqPMM8RkiydlgrTZTdsggwc65fgU%3D&reserved=0>; Now to your actual problem: The namespace declared in the testsuite is very likely not seen by XQSuite. This is non-obvious. The reason for this is that test argument and assertion annotation values are string literals that get cast to the expected type in the context of the XQSuite module and not in the context of the testsuite. Many tests in exist-db core serialize XML an assert that the result string matches the expected value instead of which could be a workaround for your tests as well. In your case it might be easiest to just return the evaluated xpath from the testcase and to assert the strings equal declare %test:arg("error", "Bad Request") %test:arg("description", "Invalid ResourceID") %test:arg("extraHtml") %test:assertXPath("Bad Request") function local:errorHtml( $error as xs:string, $description as xs:string, $extraHtml as node()?) as node() { let $result := <html xmlns="http://www.w3.org/1999/xhtml"<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7C9d7457058d8446cbad0408db2554e211%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638144819057640707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=5%2BmCXRysPA%2BvDWJjLhfFaP2WawF1h3bfLP3W3R5liZM%3D&reserved=0> lang="en" xml:lang="en"> <head> <title>{$error}</title> </head> <body> <p class='ErrorMessage'><b>Message: </b>{$error}</p> <p class='ErrorDescription'><b>Description: </b>{$description}</p> {$extraHtml} </body> </html> return $result/xhtml:html/xhtml:body/xhtml:p[@class = 'ErrorMessage'] }; Harris, Bernard T. (GSFC-5870) via Exist-open wrote on 14.03.23 13:35: No matter what I do, I cannot get a useful (more than "$result") %:assertXPath to work in this case xquery version "3.1"; import module namespace inspect="http://exist-db.org/xquery/inspection"<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexist-db.org%2Fxquery%2Finspection&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7C9d7457058d8446cbad0408db2554e211%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638144819057640707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=r2hdSedYSS7asVgMnvy7WmZpZlqk%2FpZv%2BPCBfr%2Fz1QQ%3D&reserved=0>; import module namespace test="http://exist-db.org/xquery/xqsuite"<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexist-db.org%2Fxquery%2Fxqsuite&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7C9d7457058d8446cbad0408db2554e211%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638144819057640707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=U5DOAQhB5y9KN7wqqPMM8RkiydlgrTZTdsggwc65fgU%3D&reserved=0> at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql"<resource:org/exist/xquery/lib/xqsuite/xqsuite.xql>; declare namespace xhtml = "http://www.w3.org/1999/xhtml"<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7C9d7457058d8446cbad0408db2554e211%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638144819057640707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=5%2BmCXRysPA%2BvDWJjLhfFaP2WawF1h3bfLP3W3R5liZM%3D&reserved=0>; declare %test:arg("error", "Bad Request") %test:arg("description", "Invalid ResourceID") %test:arg("extraHtml") %test:assertXPath("$result//*:html") (: %test:assertXPath("$result//*:html/*:head[*:title = 'Bad Request']") %test:assertXPath("$result/xhtml:html/xhtml:body/xhtml:p[@class = 'ErrorMessage']") :) function local:errorHtml( $error as xs:string, $description as xs:string, $extraHtml as node()?) as node() { let $result := <html xmlns="http://www.w3.org/1999/xhtml"<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7C9d7457058d8446cbad0408db2554e211%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638144819057640707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=5%2BmCXRysPA%2BvDWJjLhfFaP2WawF1h3bfLP3W3R5liZM%3D&reserved=0> lang="en" xml:lang="en"> <head> <title>{$error}</title> </head> <body> <p class='ErrorMessage'><b>Message: </b>{$error}</p> <p class='ErrorDescription'><b>Description: </b>{$description}</p> {$extraHtml} </body> </html> return $result }; let $f := local:errorHtml#3 return test:suite($f) It always results in <testsuites> <testsuite package="http://www.w3.org/2005/xquery-local-functions"<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2005%2Fxquery-local-functions&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7C9d7457058d8446cbad0408db2554e211%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638144819057640707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=3cN4ZDb2Mnw9K0UQDfC3dGhbMg0hOVObes%2FzM4TSi9g%3D&reserved=0> timestamp="2023-03-14T08:28:16.065-04:00" tests="1" failures="1" errors="0" pending="0" time="PT0.002S"> <testcase name="errorHtml" class="local:errorHtml"> <failure message="assertXPath failed." type="failure-error-code-1">$result//*:html</failure> <output> <html xmlns="http://www.w3.org/1999/xhtml"<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7C9d7457058d8446cbad0408db2554e211%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638144819057640707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=5%2BmCXRysPA%2BvDWJjLhfFaP2WawF1h3bfLP3W3R5liZM%3D&reserved=0> lang="en" xml:lang="en"> <head> <title>Bad Request</title> </head> <body> <p class="ErrorMessage"> <b>Message: </b>Bad Request</p> <p class="ErrorDescription"> <b>Description: </b>Invalid ResourceID</p> </body> </html> </output> </testcase> </testsuite> </testsuites> Or <testcase name="errorHtml" class="spasexq:errorHtml"> <error type="err:XPST0081" message="It is a static error if a QName used in an expression contains a namespace prefix that cannot be expanded into a namespace URI by using the statically known namespaces. Error while evaluating expression: $result//xhtml:html. No namespace defined for prefix xhtml:html"/> </testcase> If I use the xhtml namespace in the assertXPath annotation. I found someone report a similar problem on stackoverflow in 2016 but it is not clear to me how it was resolved. This is on exist-db 6.2.0 and Java 11. Does anyone know what I am doing wrong? Thanks. Bernie Harris _______________________________________________ Exist-open mailing list Exi...@li...<mailto:Exi...@li...> https://lists.sourceforge.net/lists/listinfo/exist-open<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fexist-open&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7C9d7457058d8446cbad0408db2554e211%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638144819057640707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=paJOZIeH9sx5l5MVB4KuF7WMNNfkAzJpqRd%2FLMmijbE%3D&reserved=0> |
From: Juri L. <ju...@ex...> - 2023-03-15 13:13:50
|
Hi Bernard! I would replace import module namespace test="http://exist-db.org/xquery/xqsuite" at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql"; with declare namespace test="http://exist-db.org/xquery/xqsuite"; Now to your actual problem: The namespace declared in the testsuite is very likely not seen by XQSuite. This is non-obvious. The reason for this is that test argument and assertion annotation values are string literals that get cast to the expected type in the context of the XQSuite module and not in the context of the testsuite. Many tests in exist-db core serialize XML an assert that the result string matches the expected value instead of which could be a workaround for your tests as well. In your case it might be easiest to just return the evaluated xpath from the testcase and to assert the strings equal declare %test:arg("error", "Bad Request") %test:arg("description", "Invalid ResourceID") %test:arg("extraHtml") %test:assertXPath("Bad Request") function local:errorHtml( $error as xs:string, $description as xs:string, $extraHtml as node()?) as node() { let $result := <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>{$error}</title> </head> <body> <p class='ErrorMessage'><b>Message: </b>{$error}</p> <p class='ErrorDescription'><b>Description: </b>{$description}</p> {$extraHtml} </body> </html> return $result/xhtml:html/xhtml:body/xhtml:p[@class = 'ErrorMessage'] }; Harris, Bernard T. (GSFC-5870) via Exist-open wrote on 14.03.23 13:35: > No matter what I do, I cannot get a useful (more than "$result") %:assertXPath to work in this case > > xquery version "3.1"; > > import module namespace inspect="http://exist-db.org/xquery/inspection"; > import module namespace test="http://exist-db.org/xquery/xqsuite" > at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql"; > > declare namespace xhtml = "http://www.w3.org/1999/xhtml"; > > declare > %test:arg("error", "Bad Request") > %test:arg("description", "Invalid ResourceID") > %test:arg("extraHtml") > %test:assertXPath("$result//*:html") > (: > %test:assertXPath("$result//*:html/*:head[*:title = 'Bad Request']") > %test:assertXPath("$result/xhtml:html/xhtml:body/xhtml:p[@class = 'ErrorMessage']") > :) > function local:errorHtml( > $error as xs:string, > $description as xs:string, > $extraHtml as node()?) > as node() > { > let $result := > <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> > <head> > <title>{$error}</title> > </head> > <body> > <p class='ErrorMessage'><b>Message: </b>{$error}</p> > <p class='ErrorDescription'><b>Description: </b>{$description}</p> > {$extraHtml} > </body> > </html> > return > $result > }; > > let $f := local:errorHtml#3 > return > test:suite($f) > > > It always results in > > <testsuites> > <testsuite package="http://www.w3.org/2005/xquery-local-functions" timestamp="2023-03-14T08:28:16.065-04:00" tests="1" failures="1" errors="0" pending="0" time="PT0.002S"> > <testcase name="errorHtml" class="local:errorHtml"> > <failure message="assertXPath failed." type="failure-error-code-1">$result//*:html</failure> > <output> > <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> > <head> > <title>Bad Request</title> > </head> > <body> > <p class="ErrorMessage"> > <b>Message: </b>Bad Request</p> > <p class="ErrorDescription"> > <b>Description: </b>Invalid ResourceID</p> > </body> > </html> > </output> > </testcase> > </testsuite> > </testsuites> > > Or > > <testcase name="errorHtml" class="spasexq:errorHtml"> > <error type="err:XPST0081" message="It is a static error if a QName used in an expression contains a namespace prefix that cannot be expanded into a namespace URI by using the statically known namespaces. Error while evaluating expression: $result//xhtml:html. No namespace defined for prefix xhtml:html"/> > </testcase> > > If I use the xhtml namespace in the assertXPath annotation. I found someone report a similar problem on stackoverflow in 2016 but it is not clear to me how it was resolved. This is on exist-db 6.2.0 and Java 11. Does anyone know what I am doing wrong? Thanks. > > Bernie Harris > > > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
From: Harris, B. T. (GSFC-5870) <ber...@na...> - 2023-03-14 17:55:39
|
That's what I originally tried. I changed the code back and get <testsuites> <testsuite package="http://www.w3.org/2005/xquery-local-functions" timestamp="2023-03-14T13:50:22.852-04:00" tests="1" failures="1" errors="0" pending="0" time="PT0.003S"> <testcase name="errorHtml" class="local:errorHtml"> <failure message="assertXPath failed." type="failure-error-code-1">$result//html</failure> <output> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Bad Request</title> </head> <body> <p class="ErrorMessage"> <b>Message: </b>Bad Request</p> <p class="ErrorDescription"> <b>Description: </b>Invalid ResourceID</p> </body> </html> </output> </testcase> </testsuite> </testsuites> Do you have any other ideas? Thanks. Bernie From: Joe Wicentowski <jo...@gm...> Date: Tuesday, March 14, 2023 at 1:00 PM To: "Harris, Bernard T. (GSFC-5870)" <ber...@na...> Cc: "exi...@li..." <exi...@li...> Subject: [EXTERNAL] Re: [Exist-open] %test:assertXPath help Hi Bernie, I've just had a look at the XQSuite source where %assertXPath annotations are processed (https://gcc02.safelinks.protection.outlook.com/?url=https://github.com/eXist-db/exist/blob/develop/exist-core/src/main/resources/org/exist/xquery/lib/xqsuite/xqsuite.xql#L944-L992&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514332470|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=ITdkPxaexxeE3xqBqSVGuOC2OmKOFq6RjMeRgmvoAFQ=&reserved=0). It appears to me that XQSuite dynamically constructs namespace declarations based on the in-scope namespaces in the return value of the function. So if your function's return value contained an HTML element with namespace prefix bindings, like: <html:html xmlns:html="https://gcc02.safelinks.protection.outlook.com/?url=http://www.w3.org/1999/xhtml&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=oZctXzxHQ3W+XkWhuDkn/cligiXBNykhy67+BD7R+3k=&reserved=0"> ... XQSuite would dynamically create the following namespace declaration: declare namespace xhtml='https://gcc02.safelinks.protection.outlook.com/?url=http://www.w3.org/1999/xhtml&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=oZctXzxHQ3W+XkWhuDkn/cligiXBNykhy67+BD7R+3k=&reserved=0'; ... which would be prepended to your %assertXPath annotation and evaluated. Since your function's return value doesn't associate <html> with any namespace prefix - only a namespace URI - then you should construct your %assertXPath annotations with the expectation that elements have a default namespace of "https://gcc02.safelinks.protection.outlook.com/?url=http://www.w3.org/1999/xhtml&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=oZctXzxHQ3W+XkWhuDkn/cligiXBNykhy67+BD7R+3k=&reserved=0". Thus I would suggest that you try modifying your %assertXPath annotations to be: %test:assertXPath("$result//html") %test:assertXPath("$result//html/head[title = 'Bad Request']") %test:assertXPath("$result/html/body/p[@class = 'ErrorMessage']") I haven't tested this myself, so if you give this a try, could you let us know the result? If we confirm that my hunch is correct, then we could supply some additional hints in the documentation for this annotation at https://gcc02.safelinks.protection.outlook.com/?url=https://exist-db.org/exist/apps/doc/xqsuite#annotations&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=RT7os5HKMQtvqb0XmDSSrYDlRFsSnaGS4fXMOE9ISxY=&reserved=0. Thanks! Joe On Tue, Mar 14, 2023 at 8:52 AM Harris, Bernard T. (GSFC-5870) via Exist-open <mailto:exi...@li...> wrote: No matter what I do, I cannot get a useful (more than "$result") %:assertXPath to work in this case xquery version "3.1"; import module namespace inspect="https://gcc02.safelinks.protection.outlook.com/?url=http://exist-db.org/xquery/inspection&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=KNfQpepOm8OabDBKGh9SuD+fNhm5Wq5ZQ0qhRz8e66s=&reserved=0"; import module namespace test="https://gcc02.safelinks.protection.outlook.com/?url=http://exist-db.org/xquery/xqsuite&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=taWxbBzutRB6d2qCdeLsokylN0mmLUa41U0NXa4vquM=&reserved=0" at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql"; declare namespace xhtml = "https://gcc02.safelinks.protection.outlook.com/?url=http://www.w3.org/1999/xhtml&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=oZctXzxHQ3W+XkWhuDkn/cligiXBNykhy67+BD7R+3k=&reserved=0"; declare %test:arg("error", "Bad Request") %test:arg("description", "Invalid ResourceID") %test:arg("extraHtml") %test:assertXPath("$result//*:html") (: %test:assertXPath("$result//*:html/*:head[*:title = 'Bad Request']") %test:assertXPath("$result/xhtml:html/xhtml:body/xhtml:p[@class = 'ErrorMessage']") :) function local:errorHtml( $error as xs:string, $description as xs:string, $extraHtml as node()?) as node() { let $result := <html xmlns="https://gcc02.safelinks.protection.outlook.com/?url=http://www.w3.org/1999/xhtml&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=oZctXzxHQ3W+XkWhuDkn/cligiXBNykhy67+BD7R+3k=&reserved=0" lang="en" xml:lang="en"> <head> <title>{$error}</title> </head> <body> <p class='ErrorMessage'><b>Message: </b>{$error}</p> <p class='ErrorDescription'><b>Description: </b>{$description}</p> {$extraHtml} </body> </html> return $result }; let $f := local:errorHtml#3 return test:suite($f) It always results in <testsuites> <testsuite package="https://gcc02.safelinks.protection.outlook.com/?url=http://www.w3.org/2005/xquery-local-functions&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=zD6rei5wcfZb3pRb8s3DxkscfQGDmo0rwIJgyuftpz8=&reserved=0" timestamp="2023-03-14T08:28:16.065-04:00" tests="1" failures="1" errors="0" pending="0" time="PT0.002S"> <testcase name="errorHtml" class="local:errorHtml"> <failure message="assertXPath failed." type="failure-error-code-1">$result//*:html</failure> <output> <html xmlns="https://gcc02.safelinks.protection.outlook.com/?url=http://www.w3.org/1999/xhtml&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=oZctXzxHQ3W+XkWhuDkn/cligiXBNykhy67+BD7R+3k=&reserved=0" lang="en" xml:lang="en"> <head> <title>Bad Request</title> </head> <body> <p class="ErrorMessage"> <b>Message: </b>Bad Request</p> <p class="ErrorDescription"> <b>Description: </b>Invalid ResourceID</p> </body> </html> </output> </testcase> </testsuite> </testsuites> Or <testcase name="errorHtml" class="spasexq:errorHtml"> <error type="err:XPST0081" message="It is a static error if a QName used in an expression contains a namespace prefix that cannot be expanded into a namespace URI by using the statically known namespaces. Error while evaluating expression: $result//xhtml:html. No namespace defined for prefix xhtml:html"/> </testcase> If I use the xhtml namespace in the assertXPath annotation. I found someone report a similar problem on stackoverflow in 2016 but it is not clear to me how it was resolved. This is on exist-db 6.2.0 and Java 11. Does anyone know what I am doing wrong? Thanks. Bernie Harris _______________________________________________ Exist-open mailing list mailto:Exi...@li... https://gcc02.safelinks.protection.outlook.com/?url=https://lists.sourceforge.net/lists/listinfo/exist-open&data=05|01|ber...@na...|63bac86b07ad49cf2d0608db24ada9aa|7005d45845be48ae8140d43da96dd17b|0|0|638144100514488671|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|3000|||&sdata=QC1qUFB+nnxtZiDTjM7K29YVMsXgWKuRamKCZ2tbhVA=&reserved=0 |
From: Joe W. <jo...@gm...> - 2023-03-14 17:00:52
|
Hi Bernie, I've just had a look at the XQSuite source where %assertXPath annotations are processed ( https://github.com/eXist-db/exist/blob/develop/exist-core/src/main/resources/org/exist/xquery/lib/xqsuite/xqsuite.xql#L944-L992). It appears to me that XQSuite dynamically constructs namespace declarations based on the in-scope namespaces in the return value of the function. So if your function's return value contained an HTML element with namespace prefix bindings, like: <html:html xmlns:html="http://www.w3.org/1999/xhtml"> ... XQSuite would dynamically create the following namespace declaration: declare namespace xhtml='http://www.w3.org/1999/xhtml'; ... which would be prepended to your %assertXPath annotation and evaluated. Since your function's return value doesn't associate <html> with any namespace prefix - only a namespace URI - then you should construct your %assertXPath annotations with the expectation that elements have a default namespace of "http://www.w3.org/1999/xhtml". Thus I would suggest that you try modifying your %assertXPath annotations to be: %test:assertXPath("$result//html") %test:assertXPath("$result//html/head[title = 'Bad Request']") %test:assertXPath("$result/html/body/p[@class = 'ErrorMessage']") I haven't tested this myself, so if you give this a try, could you let us know the result? If we confirm that my hunch is correct, then we could supply some additional hints in the documentation for this annotation at https://exist-db.org/exist/apps/doc/xqsuite#annotations. Thanks! Joe On Tue, Mar 14, 2023 at 8:52 AM Harris, Bernard T. (GSFC-5870) via Exist-open <exi...@li...> wrote: > No matter what I do, I cannot get a useful (more than "$result") > %:assertXPath to work in this case > > xquery version "3.1"; > > import module namespace inspect="http://exist-db.org/xquery/inspection"; > import module namespace test="http://exist-db.org/xquery/xqsuite" > at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql"; > > declare namespace xhtml = "http://www.w3.org/1999/xhtml"; > > declare > %test:arg("error", "Bad Request") > %test:arg("description", "Invalid ResourceID") > %test:arg("extraHtml") > %test:assertXPath("$result//*:html") > (: > %test:assertXPath("$result//*:html/*:head[*:title = 'Bad > Request']") > %test:assertXPath("$result/xhtml:html/xhtml:body/xhtml:p[@class = > 'ErrorMessage']") > :) > function local:errorHtml( > $error as xs:string, > $description as xs:string, > $extraHtml as node()?) > as node() > { > let $result := > <html xmlns="http://www.w3.org/1999/xhtml" lang="en" > xml:lang="en"> > <head> > <title>{$error}</title> > </head> > <body> > <p class='ErrorMessage'><b>Message: </b>{$error}</p> > <p class='ErrorDescription'><b>Description: > </b>{$description}</p> > {$extraHtml} > </body> > </html> > return > $result > }; > > let $f := local:errorHtml#3 > return > test:suite($f) > > > It always results in > > <testsuites> > <testsuite package="http://www.w3.org/2005/xquery-local-functions" > timestamp="2023-03-14T08:28:16.065-04:00" tests="1" failures="1" errors="0" > pending="0" time="PT0.002S"> > <testcase name="errorHtml" class="local:errorHtml"> > <failure message="assertXPath failed." > type="failure-error-code-1">$result//*:html</failure> > <output> > <html xmlns="http://www.w3.org/1999/xhtml" lang="en" > xml:lang="en"> > <head> > <title>Bad Request</title> > </head> > <body> > <p class="ErrorMessage"> > <b>Message: </b>Bad Request</p> > <p class="ErrorDescription"> > <b>Description: </b>Invalid ResourceID</p> > </body> > </html> > </output> > </testcase> > </testsuite> > </testsuites> > > Or > > <testcase name="errorHtml" class="spasexq:errorHtml"> > <error type="err:XPST0081" message="It is a static error if a > QName used in an expression contains a namespace prefix that cannot be > expanded into a namespace URI by using the statically known namespaces. > Error while evaluating expression: $result//xhtml:html. No namespace > defined for prefix xhtml:html"/> > </testcase> > > If I use the xhtml namespace in the assertXPath annotation. I found > someone report a similar problem on stackoverflow in 2016 but it is not > clear to me how it was resolved. This is on exist-db 6.2.0 and Java 11. > Does anyone know what I am doing wrong? Thanks. > > Bernie Harris > > > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
From: Harris, B. T. (GSFC-5870) <ber...@na...> - 2023-03-14 12:50:55
|
No matter what I do, I cannot get a useful (more than "$result") %:assertXPath to work in this case xquery version "3.1"; import module namespace inspect="http://exist-db.org/xquery/inspection"; import module namespace test="http://exist-db.org/xquery/xqsuite" at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql"; declare namespace xhtml = "http://www.w3.org/1999/xhtml"; declare %test:arg("error", "Bad Request") %test:arg("description", "Invalid ResourceID") %test:arg("extraHtml") %test:assertXPath("$result//*:html") (: %test:assertXPath("$result//*:html/*:head[*:title = 'Bad Request']") %test:assertXPath("$result/xhtml:html/xhtml:body/xhtml:p[@class = 'ErrorMessage']") :) function local:errorHtml( $error as xs:string, $description as xs:string, $extraHtml as node()?) as node() { let $result := <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>{$error}</title> </head> <body> <p class='ErrorMessage'><b>Message: </b>{$error}</p> <p class='ErrorDescription'><b>Description: </b>{$description}</p> {$extraHtml} </body> </html> return $result }; let $f := local:errorHtml#3 return test:suite($f) It always results in <testsuites> <testsuite package="http://www.w3.org/2005/xquery-local-functions" timestamp="2023-03-14T08:28:16.065-04:00" tests="1" failures="1" errors="0" pending="0" time="PT0.002S"> <testcase name="errorHtml" class="local:errorHtml"> <failure message="assertXPath failed." type="failure-error-code-1">$result//*:html</failure> <output> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Bad Request</title> </head> <body> <p class="ErrorMessage"> <b>Message: </b>Bad Request</p> <p class="ErrorDescription"> <b>Description: </b>Invalid ResourceID</p> </body> </html> </output> </testcase> </testsuite> </testsuites> Or <testcase name="errorHtml" class="spasexq:errorHtml"> <error type="err:XPST0081" message="It is a static error if a QName used in an expression contains a namespace prefix that cannot be expanded into a namespace URI by using the statically known namespaces. Error while evaluating expression: $result//xhtml:html. No namespace defined for prefix xhtml:html"/> </testcase> If I use the xhtml namespace in the assertXPath annotation. I found someone report a similar problem on stackoverflow in 2016 but it is not clear to me how it was resolved. This is on exist-db 6.2.0 and Java 11. Does anyone know what I am doing wrong? Thanks. Bernie Harris |
From: Lizzi, V. <Vin...@ta...> - 2023-03-13 20:06:02
|
Hello eXist community, For a while now I've been getting an error message when trying to stop the Windows service for eXist-db. After upgrading to eXist-db version 6.2.0 this problem is still occurring. Here is what typically happens: 1. Stop the service for eXist-db using the Windows Services panel. 2. Wait for the progress bar. When the progress bar is nearly complete an error message appears saying that the service did not respond in a timely manner. The service status remains as "Stopping". 3. The log file exist.log contains messages "shutdown complete !", "Database shutdown: stopping server in 1sec", "Jetty server stopped" 4. Windows Task Manager shows that "Apache Commons Daemon Service Runner" is still running. 5. In eXist's "data" folder the dbx_dir.lck and journal.lck files are sometimes still present or sometimes have been removed. A *.log file is usually still present. I have to manually kill the process using Task Manager before the service can be started again. If the *.lck files are still present I delete them manually. There does not appear to be any indication in the logs about why the process is not exiting completely. This problem begins occurring after I import documents to eXist-db. On a completely fresh install of eXist-db the process shuts down completely. Here are some details about the environment: eXist Version: 6.2.0 eXist Build: 2023-02-04T22:42:29Z Operating System: Windows Server 2012 R2 6.3 amd64 Java Version: 11.0.18 Is there any way to resolve this problem or find out more about why it is happening? Thanks, Vincent ______________________________________________ Vincent M. Lizzi Head of Information Standards | Taylor & Francis Group 530 Walnut St., Suite 850, Philadelphia, PA 19106 E-Mail: vin...@ta...<mailto:vin...@ta...> Web: www.tandfonline.com<http://www.tandfonline.com> Taylor & Francis is a trading name of Informa UK Limited, registered in England under no. 1072954 "Everything should be made as simple as possible, but not simpler." Information Classification: General |
From: Ralph C. <ra...@ra...> - 2023-03-13 17:09:20
|
Thank you all (apologies for not writing a specific thanks to @Lizzi, Vincent but also really useful). However, @Jean-Paul Rehr you have also very correctly pointed out some xQuery issues, which have made a massive difference. It runs at the collection level now and returns the ~7000 orphaned records 0.17s. Amazing! I've not come across the id() function before. Why does it operate so quickly? Thank you again On 13/03/2023 16:12, Jean-Paul Rehr wrote: > I feel like your query could run much faster in eXist with some > adjustments. > - I would avoid reopening the document in the where and put it in a > variable > - not(exists()) can be replaced by empty() and make evaluation more > efficient > - /id() is faster than @xml:id = > > let $listPerson := doc('/db/apps/****/data/listPerson.xml') > for $ref in subsequence(collection('/db/apps/****/data')//ref[@type eq > '2'],1,####) > where empty($listPerson/id($ref/@target)) > return > $ref > > Cheers, > JPR > > On Mon, Mar 13, 2023 at 3:18 PM Ralph Corrigan <ra...@ra...> > wrote: > > Hi all, I was going to post this in an xQuery forum, but at small > numbers this query works fine and I feel confident that the issue here > is in my exist-db config. > > I'm trying to return orphaned <ref> elements from a recent update that > was set up wrong. I'm using the following query to get the results: > > for $ref in > subsequence(collection('/db/apps/****/data')//ref[@type='2'],1,####) > > where > not(exists(doc('/db/apps/****/data/listPerson.xml')//person[@xml:id=$ref/@target])) > > return > $ref > > This returns absolutely fine up to ~1200 items in the subsequence $ref > but by the time we get closer to 2000 (and more) this returns a 504 > gateway time-out error in roughly 60s. This does not seem to me to be a > significantly onerous task (especially considering other things that > are handled well). > > I've tried > > declare option exist:timeout "600000" (which should be ten minutes) > > to extend the timeout, but I'm getting the same error after ~60s. > > Any ideas, as the total I'm trying to get to is ~12000 records of which > I have no idea how many are orphaned.... > > Cheers > > Ralph > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open |
From: Jean-Paul R. <re...@gm...> - 2023-03-13 16:12:47
|
I feel like your query could run much faster in eXist with some adjustments. - I would avoid reopening the document in the *where* and put it in a variable - not(exists()) can be replaced by empty() and make evaluation more efficient - /id() is faster than @xml:id = let $listPerson := doc('/db/apps/****/data/listPerson.xml') for $ref in subsequence(collection('/db/apps/****/data')//ref[@type eq '2'],1,####) where empty($listPerson/id($ref/@target)) return $ref Cheers, JPR On Mon, Mar 13, 2023 at 3:18 PM Ralph Corrigan <ra...@ra...> wrote: > Hi all, I was going to post this in an xQuery forum, but at small numbers > this query works fine and I feel confident that the issue here is in my > exist-db config. > > I'm trying to return orphaned <ref> elements from a recent update that was > set up wrong. I'm using the following query to get the results: > > > for $ref in > subsequence(collection('/db/apps/****/data')//ref[@type='2'],1,####) > > where > not(exists(doc('/db/apps/****/data/listPerson.xml')//person[@xml:id=$ref/@target])) > > return > $ref > > This returns absolutely fine up to ~1200 items in the subsequence $ref but > by the time we get closer to 2000 (and more) this returns a 504 gateway > time-out error in roughly 60s. This does not seem to me to be a > significantly onerous task (especially considering other things that are > handled well). > > I've tried > > declare option exist:timeout "600000" (which should be ten minutes) > > to extend the timeout, but I'm getting the same error after ~60s. > > Any ideas, as the total I'm trying to get to is ~12000 records of which I > have no idea how many are orphaned.... > > > Cheers > > Ralph > > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
From: Lizzi, V. <Vin...@ta...> - 2023-03-13 16:01:11
|
Hi Ralph, In addition to what Chris wrote about storing the results in the database, it may be helpful to create a separate collection for storing the query results to a avoid a write lock contention on the collection that holds the documents that are being read. I tend to use a /db/temp collection for this purpose. Another technique for long-running queries is to schedule the query to run as a background task with the Scheduler module, and then use Monex to see when the query finishes. scheduler:schedule-xquery-periodic-job('/db/queries/name.xq', 0, 'name', (), 0, 0) It can also be helpful to use util:log() to record messages about the progress or completion of the query in exist.log. If you are getting errors about timeout or exceeding the maximum number of nodes, you might need to increase the timeout setting or output size limit setting, which can be done by declaring these options at the start of a query: declare option exist:timeout "900000"; declare option exist:output-size-limit "1000000"; Most of this information is in the online documentation at exist-db.org but it can take a while to find and piece together what you need, so this forum is a helpful place to ask questions. Cheers, Vincent _____________________________________________ Vincent M. Lizzi Head of Information Standards | Taylor & Francis Group vin...@ta...<mailto:vin...@ta...> From: Ralph Corrigan <ra...@ra...> Sent: Monday, March 13, 2023 11:37 AM To: Chris Wallace <kit...@gm...> Cc: ol...@ex...; Exi...@li... Subject: Re: [Exist-open] 504 error in relatively small query Thanks Chris, also useful to know. On 13/03/2023 15:13, Chris Wallace wrote: Doesn't the query keep running anyway? I often have long jobs which timeout in the browser but run to completion (unless I terminate them in the Monitor). When this is anticipated , I make sure the job writes output to a database file rather than (only) to return HTML Chris Wallace On Mon, Mar 13, 2023 at 3:00 PM Ralph Corrigan <ra...@ra...<mailto:ra...@ra...>> wrote: Thanks Olaf, yes we are. I'll take a look at that... Ralph On 13/03/2023 14:35, ol...@ex...<mailto:ol...@ex...> wrote: This returns absolutely fine up to ~1200 items in the subsequence $ref but by the time we get closer to 2000 (and more) this returns a 504 gateway time-out error in roughly 60s. Are you running eXist behind a proxy like nginx? I've had 504s created from nginx frontend proxies. In that case, you need to increase timeouts in the nginx config. Olaf _______________________________________________ Exist-open mailing list Exi...@li...<mailto:Exi...@li...> https://lists.sourceforge.net/lists/listinfo/exist-open<https://lists.sourceforge.net/lists/listinfo/exist-open> _______________________________________________ Exist-open mailing list Exi...@li...<mailto:Exi...@li...> https://lists.sourceforge.net/lists/listinfo/exist-open<https://lists.sourceforge.net/lists/listinfo/exist-open> Information Classification: General |
From: Ralph C. <ra...@ra...> - 2023-03-13 15:37:30
|
Thanks Chris, also useful to know. On 13/03/2023 15:13, Chris Wallace wrote: > Doesn't the query keep running anyway? I often have long jobs which > timeout in the browser but run to completion (unless I terminate them > in the Monitor). When this is anticipated , I make sure the job writes > output to a database file rather than (only) to return HTML > > Chris Wallace > > On Mon, Mar 13, 2023 at 3:00 PM Ralph Corrigan <ra...@ra...> > wrote: > > Thanks Olaf, yes we are. I'll take a look at that... > > Ralph > > On 13/03/2023 14:35, ol...@ex... wrote: > This returns absolutely fine up to ~1200 items in the subsequence $ref > but > by the time we get closer to 2000 (and more) this returns a 504 gateway > time-out error in roughly 60s. > Are you running eXist behind a proxy like nginx? I've had 504s created > from nginx frontend proxies. In that case, you need to increase > timeouts > in the nginx config. > > Olaf > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open _______________________________________________ Exist-open mailing list Exi...@li... https://lists.sourceforge.net/lists/listinfo/exist-open |
From: Chris W. <kit...@gm...> - 2023-03-13 15:14:13
|
Doesn't the query keep running anyway? I often have long jobs which timeout in the browser but run to completion (unless I terminate them in the Monitor). When this is anticipated , I make sure the job writes output to a database file rather than (only) to return HTML Chris Wallace On Mon, Mar 13, 2023 at 3:00 PM Ralph Corrigan <ra...@ra...> wrote: > Thanks Olaf, yes we are. I'll take a look at that... > > > Ralph > > > On 13/03/2023 14:35, ol...@ex... wrote: > > This returns absolutely fine up to ~1200 items in the subsequence $ref but > by the time we get closer to 2000 (and more) this returns a 504 gateway > time-out error in roughly 60s. > > > Are you running eXist behind a proxy like nginx? I've had 504s created > from nginx frontend proxies. In that case, you need to increase timeouts > in the nginx config. > > Olaf > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
From: Ralph C. <ra...@ra...> - 2023-03-13 14:59:30
|
Thanks Olaf, yes we are. I'll take a look at that... Ralph On 13/03/2023 14:35, ol...@ex... wrote: >> This returns absolutely fine up to ~1200 items in the subsequence $ref >> but >> by the time we get closer to 2000 (and more) this returns a 504 >> gateway >> time-out error in roughly 60s. > > Are you running eXist behind a proxy like nginx? I've had 504s created > from nginx frontend proxies. In that case, you need to increase > timeouts > in the nginx config. > > Olaf > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open |
From: <ol...@ex...> - 2023-03-13 14:52:23
|
> This returns absolutely fine up to ~1200 items in the subsequence $ref but > by the time we get closer to 2000 (and more) this returns a 504 gateway > time-out error in roughly 60s. Are you running eXist behind a proxy like nginx? I've had 504s created from nginx frontend proxies. In that case, you need to increase timeouts in the nginx config. Olaf |
From: Ralph C. <ra...@ra...> - 2023-03-13 14:17:37
|
Hi all, I was going to post this in an xQuery forum, but at small numbers this query works fine and I feel confident that the issue here is in my exist-db config. I'm trying to return orphaned <ref> elements from a recent update that was set up wrong. I'm using the following query to get the results: > for $ref in > subsequence(collection('/db/apps/****/data')//ref[@type='2'],1,####) > > where > not(exists(doc('/db/apps/****/data/listPerson.xml')//person[@xml:id=$ref/@target])) > > return > $ref This returns absolutely fine up to ~1200 items in the subsequence $ref but by the time we get closer to 2000 (and more) this returns a 504 gateway time-out error in roughly 60s. This does not seem to me to be a significantly onerous task (especially considering other things that are handled well). I've tried declare option exist:timeout "600000" (which should be ten minutes) to extend the timeout, but I'm getting the same error after ~60s. Any ideas, as the total I'm trying to get to is ~12000 records of which I have no idea how many are orphaned.... Cheers Ralph |
From: Dominic L. <dom...@gm...> - 2023-03-02 10:37:11
|
Dear Vincent, Thanks for raising this. I've had this problem for a while too. It's easy enough to ignore but would be better to resolve. I'm on eXist 5.4.1. With best wishes, Dominic On Thu, 2 Mar 2023 at 07:58, Lehtinen Outi (Kotus) <out...@ko...> wrote: > Hi, > > > > I don’t know if this helps, but I’ve seen this happen once or twice with > eXist 5.2.0. But at the time I didn’t find anything relevant in the log > files. > > > > -Outi > > -- > > Outi Lehtinen, IT specialist > > The Institute for the Languages of Finland > > Hakaniemenranta 6, 00530 Helsinki > > > > *Lähettäjä:* Loren Cahlander <lor...@gm...> > *Lähetetty:* keskiviikko 1. maaliskuuta 2023 23.20 > *Vastaanottaja:* Lizzi, Vincent <Vin...@ta...> > *Kopio:* Exist-open <exi...@li...> > *Aihe:* Re: [Exist-open] How to fix Security Database corruption? > > > > I found the following > > > > I found a flaw in the restore of the /db/system/security collection. If > I do a restore of the whole collection, the accounts are being restored > first and then the groups do not get restored. I fixed it by restoring > /db/system/security/exist/groups and then restored /db/system/security. > This is in 6.2.0 > > > > > > I need to figure out how far back this is before I write a bug report. I > need to take the time to test in previous versions. > > > > > > On Mar 1, 2023, at 3:30 PM, Lizzi, Vincent < > Vin...@ta...> wrote: > > > > Hello eXist community, > > > > I have had several instances where an eXist database’s user accounts and > groups revert to the defaults, wiping out the user accounts and groups that > I’ve created and resetting the admin password to the default (blank). This > just happened again. There is no indication in the logs about what happened > except that the database shut down at the time of a planned operating > system restart, started up again, and then there are errors about login > attempts failing. In User Manager the accounts and groups are missing. The > collection /db/system/security/exist still contains an XML document for > each of the user accounts and groups, however attempts to login fail. In > previous times this problem occurred the log file exist.log contained error > messages such as this: > > > > 2023-01-12 18:07:24,049 [qtp897892154-30] FATAL (UnixStylePermission.java > [getGroup]:175) - Detected a Security Database corruption. Could not find > group for id: 14. > > 2023-01-12 18:07:24,049 [qtp897892154-30] FATAL (UnixStylePermission.java > [getOwner]:93) - Detected a Security Database corruption. Could not find > account for id: 14. > > > > To repair the problem, I recreate the users and groups. However, the > problem just occurs again. > > > > Here are some details about the environment: > > > > eXist Version: 6.0.1 > > eXist Build: 20220209234135 > > Operating System: Windows Server 2012 R2 6.3 amd64 > > Java Version: 11.0.16.1 > > > > Is there any way to resolve this problem? > > > > Thanks, > > Vincent > > > > ______________________________________________ > > *Vincent M. Lizzi* > > Head of Information Standards | Taylor & Francis Group > > 530 Walnut St., Suite 850, Philadelphia, PA 19106 > > E-Mail: vin...@ta... > > Web: www.tandfonline.com > <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tandfonline.com%2F&data=05%7C01%7Couti.lehtinen%40kotus.fi%7Cd11e72d80e65419bae0908db1a9acc25%7C7c14dfa4c0fc47259f0476a443deb095%7C0%7C0%7C638133024374611103%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MUWBuxZ9jxg6ur3FV%2BPrRsFUDHTqVPJh87hXv3Ds1lA%3D&reserved=0> > > > > Taylor & Francis is a trading name of Informa UK Limited, > > registered in England under no. 1072954 > > > > "Everything should be made as simple as possible, but not simpler." > > > > > > Information Classification: General > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fexist-open&data=05%7C01%7Couti.lehtinen%40kotus.fi%7Cd11e72d80e65419bae0908db1a9acc25%7C7c14dfa4c0fc47259f0476a443deb095%7C0%7C0%7C638133024374611103%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TyGIi5R5SS8U19tD3%2BVAy03jjGqD0XxYBQ7Vxv9OYrs%3D&reserved=0> > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
From: Lehtinen O. (Kotus) <out...@ko...> - 2023-03-02 06:57:18
|
Hi, I don't know if this helps, but I've seen this happen once or twice with eXist 5.2.0. But at the time I didn't find anything relevant in the log files. -Outi -- Outi Lehtinen, IT specialist The Institute for the Languages of Finland Hakaniemenranta 6, 00530 Helsinki Lähettäjä: Loren Cahlander <lor...@gm...> Lähetetty: keskiviikko 1. maaliskuuta 2023 23.20 Vastaanottaja: Lizzi, Vincent <Vin...@ta...> Kopio: Exist-open <exi...@li...> Aihe: Re: [Exist-open] How to fix Security Database corruption? I found the following I found a flaw in the restore of the /db/system/security collection. If I do a restore of the whole collection, the accounts are being restored first and then the groups do not get restored. I fixed it by restoring /db/system/security/exist/groups and then restored /db/system/security. This is in 6.2.0 I need to figure out how far back this is before I write a bug report. I need to take the time to test in previous versions. On Mar 1, 2023, at 3:30 PM, Lizzi, Vincent <Vin...@ta...<mailto:Vin...@ta...>> wrote: Hello eXist community, I have had several instances where an eXist database's user accounts and groups revert to the defaults, wiping out the user accounts and groups that I've created and resetting the admin password to the default (blank). This just happened again. There is no indication in the logs about what happened except that the database shut down at the time of a planned operating system restart, started up again, and then there are errors about login attempts failing. In User Manager the accounts and groups are missing. The collection /db/system/security/exist still contains an XML document for each of the user accounts and groups, however attempts to login fail. In previous times this problem occurred the log file exist.log contained error messages such as this: 2023-01-12 18:07:24,049 [qtp897892154-30] FATAL (UnixStylePermission.java [getGroup]:175) - Detected a Security Database corruption. Could not find group for id: 14. 2023-01-12 18:07:24,049 [qtp897892154-30] FATAL (UnixStylePermission.java [getOwner]:93) - Detected a Security Database corruption. Could not find account for id: 14. To repair the problem, I recreate the users and groups. However, the problem just occurs again. Here are some details about the environment: eXist Version: 6.0.1 eXist Build: 20220209234135 Operating System: Windows Server 2012 R2 6.3 amd64 Java Version: 11.0.16.1 Is there any way to resolve this problem? Thanks, Vincent ______________________________________________ Vincent M. Lizzi Head of Information Standards | Taylor & Francis Group 530 Walnut St., Suite 850, Philadelphia, PA 19106 E-Mail: vin...@ta...<mailto:vin...@ta...> Web: www.tandfonline.com<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tandfonline.com%2F&data=05%7C01%7Couti.lehtinen%40kotus.fi%7Cd11e72d80e65419bae0908db1a9acc25%7C7c14dfa4c0fc47259f0476a443deb095%7C0%7C0%7C638133024374611103%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MUWBuxZ9jxg6ur3FV%2BPrRsFUDHTqVPJh87hXv3Ds1lA%3D&reserved=0> Taylor & Francis is a trading name of Informa UK Limited, registered in England under no. 1072954 "Everything should be made as simple as possible, but not simpler." Information Classification: General _______________________________________________ Exist-open mailing list Exi...@li...<mailto:Exi...@li...> https://lists.sourceforge.net/lists/listinfo/exist-open<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fexist-open&data=05%7C01%7Couti.lehtinen%40kotus.fi%7Cd11e72d80e65419bae0908db1a9acc25%7C7c14dfa4c0fc47259f0476a443deb095%7C0%7C0%7C638133024374611103%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TyGIi5R5SS8U19tD3%2BVAy03jjGqD0XxYBQ7Vxv9OYrs%3D&reserved=0> |
From: Loren C. <lor...@gm...> - 2023-03-01 21:20:09
|
I found the following I found a flaw in the restore of the /db/system/security collection. If I do a restore of the whole collection, the accounts are being restored first and then the groups do not get restored. I fixed it by restoring /db/system/security/exist/groups and then restored /db/system/security. This is in 6.2.0 I need to figure out how far back this is before I write a bug report. I need to take the time to test in previous versions. On Mar 1, 2023, at 3:30 PM, Lizzi, Vincent <Vin...@ta...> wrote: Hello eXist community, I have had several instances where an eXist database’s user accounts and groups revert to the defaults, wiping out the user accounts and groups that I’ve created and resetting the admin password to the default (blank). This just happened again. There is no indication in the logs about what happened except that the database shut down at the time of a planned operating system restart, started up again, and then there are errors about login attempts failing. In User Manager the accounts and groups are missing. The collection /db/system/security/exist still contains an XML document for each of the user accounts and groups, however attempts to login fail. In previous times this problem occurred the log file exist.log contained error messages such as this: 2023-01-12 18:07:24,049 [qtp897892154-30] FATAL (UnixStylePermission.java [getGroup]:175) - Detected a Security Database corruption. Could not find group for id: 14. 2023-01-12 18:07:24,049 [qtp897892154-30] FATAL (UnixStylePermission.java [getOwner]:93) - Detected a Security Database corruption. Could not find account for id: 14. To repair the problem, I recreate the users and groups. However, the problem just occurs again. Here are some details about the environment: eXist Version: 6.0.1 eXist Build: 20220209234135 Operating System: Windows Server 2012 R2 6.3 amd64 Java Version: 11.0.16.1 Is there any way to resolve this problem? Thanks, Vincent ______________________________________________ Vincent M. Lizzi Head of Information Standards | Taylor & Francis Group 530 Walnut St., Suite 850, Philadelphia, PA 19106 E-Mail: vin...@ta... <mailto:vin...@ta...> Web: www.tandfonline.com <http://www.tandfonline.com/> Taylor & Francis is a trading name of Informa UK Limited, registered in England under no. 1072954 "Everything should be made as simple as possible, but not simpler." Information Classification: General _______________________________________________ Exist-open mailing list Exi...@li... <mailto:Exi...@li...> https://lists.sourceforge.net/lists/listinfo/exist-open |
From: Lizzi, V. <Vin...@ta...> - 2023-03-01 20:46:56
|
Hello eXist community, I have had several instances where an eXist database's user accounts and groups revert to the defaults, wiping out the user accounts and groups that I've created and resetting the admin password to the default (blank). This just happened again. There is no indication in the logs about what happened except that the database shut down at the time of a planned operating system restart, started up again, and then there are errors about login attempts failing. In User Manager the accounts and groups are missing. The collection /db/system/security/exist still contains an XML document for each of the user accounts and groups, however attempts to login fail. In previous times this problem occurred the log file exist.log contained error messages such as this: 2023-01-12 18:07:24,049 [qtp897892154-30] FATAL (UnixStylePermission.java [getGroup]:175) - Detected a Security Database corruption. Could not find group for id: 14. 2023-01-12 18:07:24,049 [qtp897892154-30] FATAL (UnixStylePermission.java [getOwner]:93) - Detected a Security Database corruption. Could not find account for id: 14. To repair the problem, I recreate the users and groups. However, the problem just occurs again. Here are some details about the environment: eXist Version: 6.0.1 eXist Build: 20220209234135 Operating System: Windows Server 2012 R2 6.3 amd64 Java Version: 11.0.16.1 Is there any way to resolve this problem? Thanks, Vincent ______________________________________________ Vincent M. Lizzi Head of Information Standards | Taylor & Francis Group 530 Walnut St., Suite 850, Philadelphia, PA 19106 E-Mail: vin...@ta...<mailto:vin...@ta...> Web: www.tandfonline.com<http://www.tandfonline.com> Taylor & Francis is a trading name of Informa UK Limited, registered in England under no. 1072954 "Everything should be made as simple as possible, but not simpler." Information Classification: General |
From: Gus R. <gu...@gm...> - 2023-02-24 15:25:47
|
Thanks, Boris! That is exactly what I was looking for. I have something like this and it works: $query_options := map { "facets": map { "script": ($scriptParam), "condition": ($conditionParam), }, "fields": ('place', 'material'), "leading-wildcard": "yes" } On Fri, Feb 24, 2023 at 4:11 PM Boris Lehečka <bo...@da...> wrote: > Hello Gus, > > take a look at > https://github.com/eeditiones/tei-publisher-app/blob/master/modules/query.xql, > TEI Publushers uses json format for options, as you can see here > > declare variable $query:QUERY_OPTIONS := map { > "leading-wildcard": "yes", > "filter-rewrite": "yes" > }; > > and here: > > declare function query:options($sortBy as xs:string*) { > map:merge(( > $query:QUERY_OPTIONS, > map { > "facets": > map:merge(( > for $param in > request:get-parameter-names()[starts-with(., 'facet-')] > let $dimension := substring-after($param, 'facet-') > return > map { > $dimension: request:get-parameter($param, ()) > } > )) > }, > if ($sortBy) then > map { "fields": ($sortBy, $config:default-fields) } > else > map { "fields": $config:default-fields } > )) > }; > > I would also prefer the <option> in XML, maybe someone else can help. > > Boris > Dne 24.02.2023 v 15:11 Gus Riva napsal(a): > > Hi! > > Hope someone can help me. I am trying to do a full text query using the > lucene index with facets and ft:query. The documentation says that the 3° > parameter in the query can be the options as an xml fragment. For example: > let $options := <options> <query-analyzer-id>ws</query-analyzer-id> < > default-operator>and</default-operator> <phrase-slop>1</phrase-slop> < > leading-wildcard>no</leading-wildcard> <filter-rewrite>yes</filter-rewrite > > <lowercase-expanded-terms>yes</lowercase-expanded-terms> </options> > > Described here: > > https://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/lucene&location=java:org.exist.xquery.modules.lucene.LuceneModule#query.3 > > And towards the end of: > https://exist-db.org/exist/apps/doc/lucene > > This is however not working for me. > The 3° parameter of ft:query can also be used with a map for facets and > fields, described also in the documentation. Like this: > let $options := map { "facets": map { "keyword": ("indexing", "facets"), > "date": [("2018", "06"), ("2018", "05")] } } > > This works for me. > > Ideally, I would like to do both: use the facets and fields argument, and > change the options. Is there a way to do that? Has the options function > been deprecated? > > Thanks for your help! > > Best, > Gustavo Fernández Riva > Universität Heidelberg > > > _______________________________________________ > Exist-open mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/exist-open > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
From: Boris L. <bo...@da...> - 2023-02-24 15:10:41
|
Hello Gus, take a look at https://github.com/eeditiones/tei-publisher-app/blob/master/modules/query.xql, TEI Publushers uses json format for options, as you can see here declare variable $query:QUERY_OPTIONS := map { "leading-wildcard": "yes", "filter-rewrite": "yes" }; and here: declare function query:options($sortBy as xs:string*) { map:merge(( $query:QUERY_OPTIONS, map { "facets": map:merge(( for $param in request:get-parameter-names()[starts-with(., 'facet-')] let $dimension := substring-after($param, 'facet-') return map { $dimension: request:get-parameter($param, ()) } )) }, if ($sortBy) then map { "fields": ($sortBy, $config:default-fields) } else map { "fields": $config:default-fields } )) }; I would also prefer the <option> in XML, maybe someone else can help. Boris Dne 24.02.2023 v 15:11 Gus Riva napsal(a): > Hi! > > Hope someone can help me. I am trying to do a full text query using > the lucene index with facets and ft:query. The documentation says that > the 3° parameter in the query can be the options as an xml fragment. > For example: > let$options:= <options> > <query-analyzer-id>ws</query-analyzer-id><default-operator>and</default-operator><phrase-slop>1</phrase-slop><leading-wildcard>no</leading-wildcard><filter-rewrite>yes</filter-rewrite><lowercase-expanded-terms>yes</lowercase-expanded-terms></options> > > Described here: > https://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/lucene&location=java:org.exist.xquery.modules.lucene.LuceneModule#query.3 > <https://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/lucene&location=java:org.exist.xquery.modules.lucene.LuceneModule#query.3> > > And towards the end of: > https://exist-db.org/exist/apps/doc/lucene > > This is however not working for me. > The 3° parameter of ft:query can also be used with a map for facets > and fields, described also in the documentation. Like this: > let$options:= map{ "facets": map{ "keyword": ("indexing", "facets"), > "date": [("2018", "06"), ("2018", "05")] } } > > This works for me. > > Ideally, I would like to do both: use the facets and fields argument, > and change the options. Is there a way to do that? Has the options > function been deprecated? > > Thanks for your help! > > Best, > Gustavo Fernández Riva > Universität Heidelberg > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open |
From: Gus R. <gu...@gm...> - 2023-02-24 14:11:21
|
Hi! Hope someone can help me. I am trying to do a full text query using the lucene index with facets and ft:query. The documentation says that the 3° parameter in the query can be the options as an xml fragment. For example: let $options := <options> <query-analyzer-id>ws</query-analyzer-id> < default-operator>and</default-operator> <phrase-slop>1</phrase-slop> < leading-wildcard>no</leading-wildcard> <filter-rewrite>yes</filter-rewrite> <lowercase-expanded-terms>yes</lowercase-expanded-terms> </options> Described here: https://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/lucene&location=java:org.exist.xquery.modules.lucene.LuceneModule#query.3 And towards the end of: https://exist-db.org/exist/apps/doc/lucene This is however not working for me. The 3° parameter of ft:query can also be used with a map for facets and fields, described also in the documentation. Like this: let $options := map { "facets": map { "keyword": ("indexing", "facets"), "date": [("2018", "06"), ("2018", "05")] } } This works for me. Ideally, I would like to do both: use the facets and fields argument, and change the options. Is there a way to do that? Has the options function been deprecated? Thanks for your help! Best, Gustavo Fernández Riva Universität Heidelberg |
From: Eduard D. <ed...@fr...> - 2023-02-22 12:33:28
|
rng validation (via catalog setup) isn't working in exide: [cid:cfb3c00a-e3b1-4f67-9946-8c21aca8b828] Not too big of a problem, just to let you know Eduard Drenth, Software Architekt ed...@fr... Doelestrjitte 8 8911 DX Ljouwert (058) 213 14 14 +31 62 094 34 28 https://www.fryske-akademy.nl/ https://frysker.nl/ https://frisian.eu/ [cid:b750b829-1537-4088-9d43-82260d6e4167] gpg: pgp.key-server.io/pks/lookup?search=eduarddrenth ________________________________ From: Eduard Drenth <ed...@fr...> Sent: Wednesday, February 22, 2023 1:21 PM To: Dannes Wessels <di...@ex...> Cc: Exist-open <exi...@li...>; Joe Wicentowski <jo...@gm...> Subject: Re: [Exist-open] implicit validation Sorry, did not see rng working in exide, xsd still used n my test. answer to my question: schematron rules aren't applied when using validation:jing-report Eduard Drenth, Software Architekt ed...@fr... Doelestrjitte 8 8911 DX Ljouwert (058) 213 14 14 +31 62 094 34 28 https://www.fryske-akademy.nl/ https://frysker.nl/ https://frisian.eu/ [cid:3d23ab6d-f5de-485a-b5d1-25f700329013] gpg: pgp.key-server.io/pks/lookup?search=eduarddrenth ________________________________ From: Eduard Drenth <ed...@fr...> Sent: Wednesday, February 22, 2023 1:02 PM To: Dannes Wessels <di...@ex...> Cc: Joe Wicentowski <jo...@gm...>; Exist-open <exi...@li...> Subject: Re: [Exist-open] implicit validation Thanks, rng works in exide, embedded schematron rules aren't applied so to see? Eduard Drenth, Software Architekt ed...@fr... Doelestrjitte 8 8911 DX Ljouwert (058) 213 14 14 +31 62 094 34 28 https://www.fryske-akademy.nl/ https://frysker.nl/ https://frisian.eu/ [cid:80248d0e-b139-4bcb-aea9-b63724b39ee2] gpg: pgp.key-server.io/pks/lookup?search=eduarddrenth ________________________________ From: Dannes Wessels <di...@ex...> Sent: Tuesday, February 21, 2023 1:10 PM To: Eduard Drenth <ed...@fr...> Cc: Joe Wicentowski <jo...@gm...>; Exist-open <exi...@li...> Subject: Re: [Exist-open] implicit validation For explicit validation yes, implicit no Regards Dannes On 21 Feb 2023, at 08:38, Eduard Drenth <ed...@fr...> wrote: Thanks, looks like I can use .rng in a catalog? Eduard Drenth, |
From: Jens T. <tis...@do...> - 2023-02-22 12:23:24
|
Hello everybody, I'm quite new at exist-open. Until today I just followed the conversations here, it's quite interesting for me. But now I hope that someone is able to give me a hint, what is goring wrong here: Among others I try to convert CALS tables to HTML, and it worked for years. But now I got documents with PIs in there, ... ... and my code ... ... gets null pointer exception, when reaching PIs. As far as I know is node type 7 the PI when SAX parsing. The problem is solved, if I deleted the PIs: Even a little example, I wrote, is still able to cope with PIs and their name(): But not the table example above. Has anybody experience? I'm using eXist-db 5.1.1 on Linux. Many thanks in advance. Regards Jens -- __________________________________________________________________________ <> DOSCO Document Systems Consulting GmbH Jens Tischler phone +49 162 4664334 (+49 6221 1486 25) mai...@do... webhttp://www.dosco.de DOSCO Document Systems Consulting GmbH Mannheimer Strasse 1 69115 Heidelberg, GERMANY Handelsregister: Mannheim HRB 335122 Geschäftsführung: Robert Erfle |
From: Eduard D. <ed...@fr...> - 2023-02-22 12:22:03
|
Sorry, did not see rng working in exide, xsd still used n my test. answer to my question: schematron rules aren't applied when using validation:jing-report Eduard Drenth, Software Architekt ed...@fr... Doelestrjitte 8 8911 DX Ljouwert (058) 213 14 14 +31 62 094 34 28 https://www.fryske-akademy.nl/ https://frysker.nl/ https://frisian.eu/ [cid:3d23ab6d-f5de-485a-b5d1-25f700329013] gpg: pgp.key-server.io/pks/lookup?search=eduarddrenth ________________________________ From: Eduard Drenth <ed...@fr...> Sent: Wednesday, February 22, 2023 1:02 PM To: Dannes Wessels <di...@ex...> Cc: Joe Wicentowski <jo...@gm...>; Exist-open <exi...@li...> Subject: Re: [Exist-open] implicit validation Thanks, rng works in exide, embedded schematron rules aren't applied so to see? Eduard Drenth, Software Architekt ed...@fr... Doelestrjitte 8 8911 DX Ljouwert (058) 213 14 14 +31 62 094 34 28 https://www.fryske-akademy.nl/ https://frysker.nl/ https://frisian.eu/ [cid:80248d0e-b139-4bcb-aea9-b63724b39ee2] gpg: pgp.key-server.io/pks/lookup?search=eduarddrenth ________________________________ From: Dannes Wessels <di...@ex...> Sent: Tuesday, February 21, 2023 1:10 PM To: Eduard Drenth <ed...@fr...> Cc: Joe Wicentowski <jo...@gm...>; Exist-open <exi...@li...> Subject: Re: [Exist-open] implicit validation For explicit validation yes, implicit no Regards Dannes On 21 Feb 2023, at 08:38, Eduard Drenth <ed...@fr...> wrote: Thanks, looks like I can use .rng in a catalog? Eduard Drenth, |
From: Eduard D. <ed...@fr...> - 2023-02-22 12:17:15
|
Thanks, rng works in exide, embedded schematron rules aren't applied so to see? Eduard Drenth, Software Architekt ed...@fr... Doelestrjitte 8 8911 DX Ljouwert (058) 213 14 14 +31 62 094 34 28 https://www.fryske-akademy.nl/ https://frysker.nl/ https://frisian.eu/ [cid:80248d0e-b139-4bcb-aea9-b63724b39ee2] gpg: pgp.key-server.io/pks/lookup?search=eduarddrenth ________________________________ From: Dannes Wessels <di...@ex...> Sent: Tuesday, February 21, 2023 1:10 PM To: Eduard Drenth <ed...@fr...> Cc: Joe Wicentowski <jo...@gm...>; Exist-open <exi...@li...> Subject: Re: [Exist-open] implicit validation For explicit validation yes, implicit no Regards Dannes On 21 Feb 2023, at 08:38, Eduard Drenth <ed...@fr...> wrote: Thanks, looks like I can use .rng in a catalog? Eduard Drenth, |