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
(10) |
Oct
|
Nov
|
Dec
|
From: Boris L. <bo...@da...> - 2024-09-02 23:51:53
|
Dear Lars, I have similar issues with indexing dictionaries: my indexing procedure ask for data from the taxonomy (like expansions of abbreviations) and sometimes indexing a dictionary with about 36,000 entries took a whole day. I don't remember who (Juri Leino, I guess), pointed out to me that the index is saved only after the whole document is parsed. After moving each dictionary entry to a separate file, indexing took much less time (several hours). However, this does not seem to be the cause of your problem. In my opinion, your indexing code (in the module) is very complicated, sometimes it can be much simpler, for example without explicit conversion to string (like in tei:persName[string(@ref) eq $identifier ...]), or normalizing spaces in ip:getFullText (full-tex t search usually uses only the parts between spaces). My suggestion is following: first, create an index for persons in a separate collection (with separate collection.xconf): compute fields with values you will query or want to return when you index the articles (in different collection). And second, use Lucene and fulltext search in your "index-persons" module to find data in the index from the first phase. This is just an idea, not tested, I hope someone else is much more experienced in the magic of indexing. Best, Boris Lehečka Dne 02.09.2024 v 16:57 Lars Scheidelerl napsal(a): > Hey, > > we assume that we are not using the index in our project as intended. > Because when we try to build the index we have created, it takes a > very long time. > > We have two collections, one with a data stack of 687 in which data is > stored, and one with 400 xml where articles are are stored. > > For the personal article we want certain information from the articles > and vice versa. > > Person XML: > > <person xml:id="i0c9ab7e2-2e21-39ff-aea8-c56ad4702a7f" status="safe" > modified="2024-07-30T13:26:09.154+02:00"> > <name>Marcanton Zimara</name> > <identifier > preferred="YES">https://d-nb.info/gnd/120156784</identifier> > <alternateName>Marcusantonius Zimara</alternateName> > <alternateName>Marcus Anthonius Zimara</alternateName> > <alternateName>Antonius Zimara</alternateName> > <alternateName>M. Antonius Zimarra</alternateName> > <alternateName>Marc Antoine Zimara</alternateName> > <alternateName>M. Anto. Zimare</alternateName> > <alternateName>Marco A. Zimara</alternateName> > <alternateName>Marcus A. Zimara</alternateName> > <alternateName>Marc Ant. Zimara</alternateName> > <alternateName>Marcantonio Zimara</alternateName> > <alternateName>Marcus Antonius Zimara</alternateName> > <alternateName>Marcus Antonius Zimarra</alternateName> > <alternateName>Marcianto Zimare</alternateName> > <alternateName>Marco Antonio Zimarra</alternateName> > <alternateName>Marco Antonio Zimare</alternateName> > <birthDate>1460</birthDate> > <deathDate>1532</deathDate> > <description>JWO</description> > <sortableName>Zimara, Marcanton </sortableName> > </person> > > Articel XML: > > <?xml version="1.0" encoding="UTF-8"?> > <TEI xmlns="http://www.tei-c.org/ns/1.0"> > <teiHeader> > <fileDesc> > <titleStmt> > <title>a nihilo nihil fit</title> > <author> > <persName > ref="/db/projects/jwo/data/lists/personenListe.xml#BS_d1e509" > xml:id="author_BS_d1e509"> > <forename>Marcanton</forename> > <surname>Zimara</surname> > </persName> > </author> > </titleStmt> > <sourceDesc> > <p xml:id="p_sourceDesc_igw_tvr_pzb">born digital</p> > </sourceDesc> > </fileDesc> > </teiHeader> > <text xml:lang="de-DE" type="main"> > <body> > <div1 xml:id="div1_d1e23_2"> > <p xml:id="p_d1e27_1" n="1"> Lorem ipsum dolor sit > amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut > labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud > exercitation <persName xml:id="persName_sa123" > ref="https://d-nb.info/gnd/120156784" > rend="smallcaps">Zimara</persName> ullamco laboris nisi ut aliquip ex > ea commodo consequat. Duis aute irure dolor in reprehenderit in > voluptate velit esse cillum dolore eu <persName xml:id="persName_s123" > ref="https://d-nb.info/gnd/120156784">Zimara</persName> fugiat nulla > pariatur. Excepteur sint occaecat cupidatat non proident, sunt in > culpa qui officia deserunt mollit anim id est laborum. </p> > </div1> > </body> > </text> > </TEI> > > Collection.xconf: > > <collection xmlns="http://exist-db.org/collection-config/1.0"> > <index xmlns:gndo="https://d-nb.info/standards/elementset/gnd#" > xmlns:owl="http://www.w3.org/2002/07/owl#" > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > <lucene> > <module uri="http://place.sok.org/xquery/index-persons" > prefix="ip" > at="xmldb:exist:///db/apps/sok-application/modules/index-persons.xqm"/> > <analyzer > class="org.apache.lucene.analysis.standard.StandardAnalyzer"/> > <analyzer > class="org.exist.indexing.lucene.analyzers.NoDiacriticsStandardAnalyzer" > id="nodiacritics"/> > <text qname="adcache"> > <field name="basicId" > expression="//person/@id/string()"/> > <field name="fullname" > expression="string(./basic/person/name)"/> > <field name="gndURI" > expression="string(./basic/person/identifier[@preferred eq 'YES'])"/> > <field name="gndID" > expression="substring-after(./basic/person/identifier[@preferred eq > 'YES']/string(), '/gnd/')"/> > <field name="status" > expression="./basic/person/@status/string()"/> > <field name="articleID" > expression="ip:getArticleFromPersonCache(.)"/> > <field name="articleRole" > expression="ip:getArticleRoleFromPersonCache(.)"/> > <field name="fulltext" expression="ip:getFullText(.)"/> > </text> > </lucene> > </index> > </collection> > > Module Functions: > > module namespace ip = > "http://place.sok.org/xquery/index-persons"; > > declare namespace basic = > "http://place.sok.org/xquery/basic" ; > > declare namespace xs = "http://www.w3.org/2001/XMLSchema"; > declare namespace tei = "http://www.tei-c.org/ns/1.0"; > declare namespace util = "http://exist-db.org/xquery/util"; > > declare function ip:getArticleFromPersonCache($adcache as element()) > as xs:string* { > let $parentCollectionPath as xs:anyURI? := > ip:getParentCollection($adcache), > $basicId as xs:string := $adcache/basic/person/@id/string(), > $identifier as xs:string? := > $adcache/basic/person/identifier[@preferred eq 'YES']/string(), > $listId as xs:string? := collection( $variables:jwo-lists-path > )/tei:TEI//tei:person[ basic:basic-id-from-url(string(@sameAs)) eq > $basicId]/@xml:id/string(), > $foundInDocumentIds as xs:string* := > if ( matches($parentCollectionPath,'prepublish') ) > then > ( > collection($parentCollectionPath)/tei:TEI[./tei:teiHeader//tei:idno[1]/string() > ne > ''][matches(replace((normalize-space('||'||string-join(distinct-values(.//tei:persName[@ref]/@ref/string()) > ! replace(.,'.*?#',''), > '||')||'||')||normalize-space('||'||string-join(distinct-values(.//tei:persName[@source]/@source/string()) > ! replace(.,'.*?#',''), > '||')||'||')),'\|{4}',''),'\|{2}('||$basicId||'|'||$listId||'|'||$identifier||')\|{2}')]//tei:idno/string() > ) > else > ( > collection($parentCollectionPath)/tei:TEI[./tei:teiHeader//tei:idno[1]/string() > ne > ''][matches(replace((normalize-space('||'||string-join(distinct-values(.//tei:persName[@ref][not(parent::editor)]/@ref/string()) > ! replace(.,'.*?#',''), > '||')||'||')||normalize-space('||'||string-join(distinct-values(.//tei:persName[@source][not(parent::editor)]/@source/string()) > ! replace(.,'.*?#',''), > '||')||'||')),'\|{4}',''),'\|{2}('||$basicId||'|'||$listId||'|'||$identifier||')\|{2}')]//tei:idno/string() > ) > return > ( > $foundInDocumentIds > ) > }; > > declare function ip:getAuthenticatedArticleCollection($collection-name > as xs:string) as item()* { > if ($collection-name eq 'prepublish') then > xmldb:xcollection($variables:jwo-prepublish-path) else > xmldb:xcollection($variables:jwo-publish-path) > }; > > declare function > ip:getPersNamesInCollectionFromCachedPerson($cached-person as > element(), $collection-name as xs:string) as element()* { > let $basicId := $cached-person/basic/person/@id/string() > let $identifier := > $cached-person/basic/person/identifier[@preferred eq 'YES']/string() > let $listId := collection( $variables:jwo-lists-path > )/tei:TEI/tei:text[1]/tei:body[1]/tei:listPerson[1]/tei:person[ > basic:basic-id-from-url(string(@sameAs)) eq $basicId]/@xml:id/string() > let $collection > := ip:getAuthenticatedArticleCollection($collection-name) > return ( > $collection//tei:persName[ > string(@ref) eq $identifier > or ip:getIdFromUri(string(@ref)) eq $listId > or substring-after(string(@ref), '#') eq $basicId > or substring-before(substring-after(string(@source), > 'persons/'), '.xml') eq $basicId] > ) > }; > > declare function ip:getRoleFromPersName($persName as element(), > $collection-name as xs:string) as xs:string? { > if ($persName/ancestor::*/local-name() = 'author') > then ( 'author' ) > else if ($persName/ancestor::*/local-name() = 'editor') > then ( > if ($collection-name eq 'prepublish') then ( 'editor' ) > (: Ignore editors in published case :) > else () > ) > else ( 'annotated' ) > }; > > declare function ip:getArticleRoleFromPersonCache($cached-person as > element(), $collection-name as xs:string) as xs:string* { > let $allPersNames := > if ($collection-name ne 'prepublish') then ( > ip:getPersNamesInCollectionFromCachedPerson($cached-person, > $collection-name)[not(ancestor::*/local-name() = 'editor')] > ) else ( > ip:getPersNamesInCollectionFromCachedPerson($cached-person, > $collection-name) > ) > return ( > for $articleGroup in $allPersNames > let $articleID := $articleGroup/ancestor::tei:TEI//tei:idno[1] > group by $articleID > return ( > $articleID || '@@' || string-join(distinct-values( > for $persName in $articleGroup > let $role := ip:getRoleFromPersName($persName, > $collection-name) > order by $role > return $role > ), ' ') > ) > ) > }; > > declare function ip:getParentCollection($element as node()) as > xs:anyURI? { > resolve-uri('../../', $element/base-uri()) > }; > > declare function ip:getIdFromUri($uri as xs:string) as xs:string { > substring-after($uri, '#') > }; > > declare function basic:basic-id-from-url($url as xs:string) as > xs:string? { > substring-after(substring-before($url, '?dataset'),'persons/') > }; > > declare function ip:getFullText($element) as xs:string { > let $parentCollection as xs:anyURI? := > ip:getParentCollection($element) > return > ( > normalize-space(string-join( > let $basicId as xs:string := > $element/basic/person/@id/string(), > $identifier as xs:string* := > $element/basic/person/identifier[@preferred eq 'YES']/string(), > $listId as item()* := collection( > $variables:lists-path > )/tei:TEI/tei:text[1]/tei:body[1]/tei:listPerson[1]/tei:person[ > basic:basic-id-from-url(string(@sameAs)) eq $basicId]/@xml:id/string(), > $element-string as xs:string* := > string($element), > $collections as item()* := > collection($parentCollection)//tei:persName[string(@ref) eq > $identifier or ip:getIdFromUri(string(@ref)) eq $listId or > substring-after(string(@ref), '#') eq $basicId or > substring-before(substring-after(string(@source), 'persons/'), '.xml') > eq $basicId][1], > $element-cache-string as xs:string* := > string-join(for $found-element in $collections where > count($found-element) > 0 return $found-element, ' ') > return > ( > $element-string,$element-cache-string > ),' ')) > ) > }; > > Please help. > > |
From: Lars S. <sch...@sa...> - 2024-09-02 15:21:12
|
Hey, we assume that we are not using the index in our project as intended. Because when we try to build the index we have created, it takes a very long time. We have two collections, one with a data stack of 687 in which data is stored, and one with 400 xml where articles are are stored. For the personal article we want certain information from the articles and vice versa. Person XML: <person xml:id="i0c9ab7e2-2e21-39ff-aea8-c56ad4702a7f" status="safe" modified="2024-07-30T13:26:09.154+02:00"> <name>Marcanton Zimara</name> <identifier preferred="YES">https://d-nb.info/gnd/120156784</identifier> <alternateName>Marcusantonius Zimara</alternateName> <alternateName>Marcus Anthonius Zimara</alternateName> <alternateName>Antonius Zimara</alternateName> <alternateName>M. Antonius Zimarra</alternateName> <alternateName>Marc Antoine Zimara</alternateName> <alternateName>M. Anto. Zimare</alternateName> <alternateName>Marco A. Zimara</alternateName> <alternateName>Marcus A. Zimara</alternateName> <alternateName>Marc Ant. Zimara</alternateName> <alternateName>Marcantonio Zimara</alternateName> <alternateName>Marcus Antonius Zimara</alternateName> <alternateName>Marcus Antonius Zimarra</alternateName> <alternateName>Marcianto Zimare</alternateName> <alternateName>Marco Antonio Zimarra</alternateName> <alternateName>Marco Antonio Zimare</alternateName> <birthDate>1460</birthDate> <deathDate>1532</deathDate> <description>JWO</description> <sortableName>Zimara, Marcanton </sortableName> </person> Articel XML: <?xml version="1.0" encoding="UTF-8"?> <TEI xmlns="http://www.tei-c.org/ns/1.0"> <teiHeader> <fileDesc> <titleStmt> <title>a nihilo nihil fit</title> <author> <persName ref="/db/projects/jwo/data/lists/personenListe.xml#BS_d1e509" xml:id="author_BS_d1e509"> <forename>Marcanton</forename> <surname>Zimara</surname> </persName> </author> </titleStmt> <sourceDesc> <p xml:id="p_sourceDesc_igw_tvr_pzb">born digital</p> </sourceDesc> </fileDesc> </teiHeader> <text xml:lang="de-DE" type="main"> <body> <div1 xml:id="div1_d1e23_2"> <p xml:id="p_d1e27_1" n="1"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation <persName xml:id="persName_sa123" ref="https://d-nb.info/gnd/120156784" rend="smallcaps">Zimara</persName> ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu <persName xml:id="persName_s123" ref="https://d-nb.info/gnd/120156784">Zimara</persName> fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p> </div1> </body> </text> </TEI> Collection.xconf: <collection xmlns="http://exist-db.org/collection-config/1.0"> <index xmlns:gndo="https://d-nb.info/standards/elementset/gnd#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <lucene> <module uri="http://place.sok.org/xquery/index-persons" prefix="ip" at="xmldb:exist:///db/apps/sok-application/modules/index-persons.xqm"/> <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/> <analyzer class="org.exist.indexing.lucene.analyzers.NoDiacriticsStandardAnalyzer" id="nodiacritics"/> <text qname="adcache"> <field name="basicId" expression="//person/@id/string()"/> <field name="fullname" expression="string(./basic/person/name)"/> <field name="gndURI" expression="string(./basic/person/identifier[@preferred eq 'YES'])"/> <field name="gndID" expression="substring-after(./basic/person/identifier[@preferred eq 'YES']/string(), '/gnd/')"/> <field name="status" expression="./basic/person/@status/string()"/> <field name="articleID" expression="ip:getArticleFromPersonCache(.)"/> <field name="articleRole" expression="ip:getArticleRoleFromPersonCache(.)"/> <field name="fulltext" expression="ip:getFullText(.)"/> </text> </lucene> </index> </collection> Module Functions: module namespace ip = "http://place.sok.org/xquery/index-persons"; declare namespace basic = "http://place.sok.org/xquery/basic" ; declare namespace xs = "http://www.w3.org/2001/XMLSchema"; declare namespace tei = "http://www.tei-c.org/ns/1.0"; declare namespace util = "http://exist-db.org/xquery/util"; declare function ip:getArticleFromPersonCache($adcache as element()) as xs:string* { let $parentCollectionPath as xs:anyURI? := ip:getParentCollection($adcache), $basicId as xs:string := $adcache/basic/person/@id/string(), $identifier as xs:string? := $adcache/basic/person/identifier[@preferred eq 'YES']/string(), $listId as xs:string? := collection( $variables:jwo-lists-path )/tei:TEI//tei:person[ basic:basic-id-from-url(string(@sameAs)) eq $basicId]/@xml:id/string(), $foundInDocumentIds as xs:string* := if ( matches($parentCollectionPath,'prepublish') ) then ( collection($parentCollectionPath)/tei:TEI[./tei:teiHeader//tei:idno[1]/string() ne ''][matches(replace((normalize-space('||'||string-join(distinct-values(.//tei:persName[@ref]/@ref/string()) ! replace(.,'.*?#',''), '||')||'||')||normalize-space('||'||string-join(distinct-values(.//tei:persName[@source]/@source/string()) ! replace(.,'.*?#',''), '||')||'||')),'\|{4}',''),'\|{2}('||$basicId||'|'||$listId||'|'||$identifier||')\|{2}')]//tei:idno/string() ) else ( collection($parentCollectionPath)/tei:TEI[./tei:teiHeader//tei:idno[1]/string() ne ''][matches(replace((normalize-space('||'||string-join(distinct-values(.//tei:persName[@ref][not(parent::editor)]/@ref/string()) ! replace(.,'.*?#',''), '||')||'||')||normalize-space('||'||string-join(distinct-values(.//tei:persName[@source][not(parent::editor)]/@source/string()) ! replace(.,'.*?#',''), '||')||'||')),'\|{4}',''),'\|{2}('||$basicId||'|'||$listId||'|'||$identifier||')\|{2}')]//tei:idno/string() ) return ( $foundInDocumentIds ) }; declare function ip:getAuthenticatedArticleCollection($collection-name as xs:string) as item()* { if ($collection-name eq 'prepublish') then xmldb:xcollection($variables:jwo-prepublish-path) else xmldb:xcollection($variables:jwo-publish-path) }; declare function ip:getPersNamesInCollectionFromCachedPerson($cached-person as element(), $collection-name as xs:string) as element()* { let $basicId := $cached-person/basic/person/@id/string() let $identifier := $cached-person/basic/person/identifier[@preferred eq 'YES']/string() let $listId := collection( $variables:jwo-lists-path )/tei:TEI/tei:text[1]/tei:body[1]/tei:listPerson[1]/tei:person[ basic:basic-id-from-url(string(@sameAs)) eq $basicId]/@xml:id/string() let $collection := ip:getAuthenticatedArticleCollection($collection-name) return ( $collection//tei:persName[ string(@ref) eq $identifier or ip:getIdFromUri(string(@ref)) eq $listId or substring-after(string(@ref), '#') eq $basicId or substring-before(substring-after(string(@source), 'persons/'), '.xml') eq $basicId] ) }; declare function ip:getRoleFromPersName($persName as element(), $collection-name as xs:string) as xs:string? { if ($persName/ancestor::*/local-name() = 'author') then ( 'author' ) else if ($persName/ancestor::*/local-name() = 'editor') then ( if ($collection-name eq 'prepublish') then ( 'editor' ) (: Ignore editors in published case :) else () ) else ( 'annotated' ) }; declare function ip:getArticleRoleFromPersonCache($cached-person as element(), $collection-name as xs:string) as xs:string* { let $allPersNames := if ($collection-name ne 'prepublish') then ( ip:getPersNamesInCollectionFromCachedPerson($cached-person, $collection-name)[not(ancestor::*/local-name() = 'editor')] ) else ( ip:getPersNamesInCollectionFromCachedPerson($cached-person, $collection-name) ) return ( for $articleGroup in $allPersNames let $articleID := $articleGroup/ancestor::tei:TEI//tei:idno[1] group by $articleID return ( $articleID || '@@' || string-join(distinct-values( for $persName in $articleGroup let $role := ip:getRoleFromPersName($persName, $collection-name) order by $role return $role ), ' ') ) ) }; declare function ip:getParentCollection($element as node()) as xs:anyURI? { resolve-uri('../../', $element/base-uri()) }; declare function ip:getIdFromUri($uri as xs:string) as xs:string { substring-after($uri, '#') }; declare function basic:basic-id-from-url($url as xs:string) as xs:string? { substring-after(substring-before($url, '?dataset'),'persons/') }; declare function ip:getFullText($element) as xs:string { let $parentCollection as xs:anyURI? := ip:getParentCollection($element) return ( normalize-space(string-join( let $basicId as xs:string := $element/basic/person/@id/string(), $identifier as xs:string* := $element/basic/person/identifier[@preferred eq 'YES']/string(), $listId as item()* := collection( $variables:lists-path )/tei:TEI/tei:text[1]/tei:body[1]/tei:listPerson[1]/tei:person[ basic:basic-id-from-url(string(@sameAs)) eq $basicId]/@xml:id/string(), $element-string as xs:string* := string($element), $collections as item()* := collection($parentCollection)//tei:persName[string(@ref) eq $identifier or ip:getIdFromUri(string(@ref)) eq $listId or substring-after(string(@ref), '#') eq $basicId or substring-before(substring-after(string(@source), 'persons/'), '.xml') eq $basicId][1], $element-cache-string as xs:string* := string-join(for $found-element in $collections where count($found-element) > 0 return $found-element, ' ') return ( $element-string,$element-cache-string ),' ')) ) }; Please help. -- Lars Scheideler - wiss. technischer Mitarbeiter - Althochdeutsches Wörterbuch & Digital Humanities Sächsische Akademie der Wissenschaften zu Leipzig Karl-Tauchnitz-Straße 1 04107 Leipzig sch...@sa... www.saw-leipzig.de |
From: Liuzzo, P. <Pie...@bi...> - 2024-08-30 07:26:40
|
Dear all, I am facing a strange issue, and I wonder if anyone has any ideas about it. I have been using a simple string-join on the result of an xpath on the ancestor axis without any issues and with very fast results, e.g. let $ancs := $file/ancestor::tree:directory return replace(string-join($ancs/@name, '%2F'), '\./', '’) Now however this kind of queries take a lot of time. I had never seen these function appearing in profiling, so it must have been so fast to never make it up the list, whereas now it is reported with a major jump in time consumed (see below). replace /db/apps/hertziana/modules/app.xql [885:21] 120 42.136 string-join /db/apps/hertziana/modules/app.xql [885:29] 120 42.13 seo:Catalog /db/apps/fotothek/modules/seo.xqm [-1:-1] 6 24.413 The “tree" document in question is rather large, but it always was and was not an issue at all. Since I have not done any recent update to the application or the data or the indexes I am wondering what could have gone wrong and what I can do to recover the previous performance. Thanks a lot for any ideas about this all best Pietro |
From: steve h. <ste...@gm...> - 2024-08-21 13:17:47
|
Hi all Stet. Used Jar installer and hacked startup.sh until I worked out what went wrong. And yes, it was the classpath, but I’m still slightly in the dark about what I did differently ... Steve > On 20 Aug 2024, at 15:28, steve harris <Ste...@gm...> wrote: > > Hi > > Old returning eXist developer here and a little rusty ... > > I have a M1 MacBook Pro running Sonama, eXist installed by JRE, java 11 JDK installed by Brew. > > Java - version works as expected, echo $JAVA_HOME contains a path with the openjdk bin folder. > > I keep getting ‘This application requires that Java 8 or later be installed …’ message. I’ve seen previous versions of this call and I think I’m compliant with the fixes there. I’ve also tried this with Oracle Java too with the same result. > > Any ideas? Or exact paths to stuff that you know works? > > Best > > Steve |
From: steve h. <ste...@gm...> - 2024-08-20 14:29:14
|
Hi Old returning eXist developer here and a little rusty ... I have a M1 MacBook Pro running Sonama, eXist installed by JRE, java 11 JDK installed by Brew. Java - version works as expected, echo $JAVA_HOME contains a path with the openjdk bin folder. I keep getting ‘This application requires that Java 8 or later be installed …’ message. I’ve seen previous versions of this call and I think I’m compliant with the fixes there. I’ve also tried this with Oracle Java too with the same result. Any ideas? Or exact paths to stuff that you know works? Best Steve |
From: Ted H. <meg...@gm...> - 2024-08-19 22:03:18
|
In case you were wondering how I fixed my project, I will give you the details. I borrowed some code from my SVG_Bezier_Curve Javascript page: function Setup2() { var SVG_Data; var Retrieved_Data; var Bezier_Curve_1; var Bezier_Curve_2; var Counter; var Coordinate_Attribute; var Coordinate; var Style_Attribute; var Style_Details; var Bezier_Curve_Identification; SVG_Data = new XMLHttpRequest(); SVG_Data.open("GET"," http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve.xq", true); SVG_Data.onreadystatechange = function () { if (SVG_Data.readyState == 4) { Retrieved_Data = SVG_Data.responseText; Retrieved_Data = Retrieved_Data.split("/"); Counter = 0; Bezier_Curve_1 = Retrieved_Data[Counter]; Counter = Counter + 1; Bezier_Curve_2 = Retrieved_Data[Counter];} Bezier_Curve_1 = Bezier_Curve_1.split("*"); Counter = 0; Coordinate_Attribute = Bezier_Curve_1[Counter]; Counter = Counter + 1; Coordinate = Bezier_Curve_1[Counter]; Counter = Counter + 1; Style_Attribute = Bezier_Curve_1[Counter]; Counter = Counter + 1; Style_Details = Bezier_Curve_1[Counter]; Bezier_Curve_Identification = document.getElementById('Bezier_Curve_1'); Bezier_Curve_Identification.setAttribute(Coordinate_Attribute, Coordinate); Bezier_Curve_Identification.setAttribute(Style_Attribute, Style_Details); Bezier_Curve_2 = Bezier_Curve_2.split("*"); Counter = 0; Coordinate_Attribute = Bezier_Curve_2[Counter]; Counter = Counter + 1; Coordinate = Bezier_Curve_2[Counter]; Counter = Counter + 1; Style_Attribute = Bezier_Curve_2[Counter]; Counter = Counter + 1; Style_Details = Bezier_Curve_2[Counter]; Bezier_Curve_Identification = document.getElementById('Bezier_Curve_2'); Bezier_Curve_Identification.setAttribute(Coordinate_Attribute, Coordinate); Bezier_Curve_Identification.setAttribute(Style_Attribute, Style_Details); }; SVG_Data.send();} I changed some variable names and a couple of other minor things and developed this code: function Setup() { var XMLHttp; var JSON_Data; var Retrieved_Data; XMLHttp = new XMLHttpRequest(); XMLHttp.open("GET"," http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); XMLHttp.onreadystatechange = function () { if (XMLHttp.readyState == 4) { Retrieved_Data = XMLHttp.responseText; document.getElementById("JSON_Text").value = Retrieved_Data} }; XMLHttp.send();} I also turned off a feature in the console because the CTRL F5 wasn't working correctly. When I finish my current project, I will publish a video of my work on YouTube for everyone to watch. I don't want anyone to be as stuck as I was today. It's hard when you don't know what you're doing wrong and everything you try to do doesn't change anything. On Mon, Aug 19, 2024 at 3:11 PM Ted Hickox <meg...@gm...> wrote: > If I knew as much as all of you know, I wouldn't be asking you for > assistance. But I'm over 50 years old and I used to program on an NCR > mainframe using COBOL. So you might say I was at the foundation of > computers. > > My first problem is that the CTRL F5 doesn't always refresh my webpage. > So this presents a challenge. And at the beginning of this interaction I > showed everyone my HTML, CSS, Javascript, and JSON pages. but I can only > presume that the people who have participated in this conversation so far > have not read my original post. So once again I will post my code., > > My HTML page: > > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>First JSON Experiment</title> > <link rel="stylesheet" type="text/css" href=" > http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.css"/> > <script language="javascript" src=" > http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example_2.js"/> > </head> > <body onload="Setup()"> > <input type="text" id="JSON_Text"> > </input> > </body> > </html> > > My CSS page: > > #JSON_Text { > position: absolute; > top: 200px; > left: 300px; > height: 25px; > width: 300px; > } > > My current Javascript page: > > function Setup() { > var XMLHttp; > var JSON_Data; > > MLHttp = new XMLHttpRequest(); > XMLHttp.open("GET", " > http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); > XMLHttp.send(); > } > > And my current JSON page: > > {"name":"John", "age":30, "city":"New York"} > > And my most recent error: > > [image: image.png] > > Up until now the console hasn't been displaying any errors. So how could > I correct something that I couldn't identify? > > On Mon, Aug 19, 2024 at 2:47 PM Florian Schmitt < > mai...@fl...> wrote: > >> Ted, since nobody here knows how your complete code and db content looks >> like, you'll have to fix it yourself. To do so, check how to use the Web >> Console: >> >> For Firefox, see >> https://firefox-source-docs.mozilla.org/devtools-user/web_console/index.html >> For Edge, see >> https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/console/ >> For Chrome, see >> https://developer.chrome.com/docs/devtools/console?hl=en#javascript >> >> and test what happens if you enter the three commands from your js: >> >> XMLHttp = new XMLHttpRequest(); >> XMLHttp.open("GET", " >> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >> true); >> XMLHttp.send(); >> >> in the Web Console. >> >> >> |
From: Ted H. <meg...@gm...> - 2024-08-19 19:05:38
|
Okay, I was stupid and forgot to add the send command. But this still didn't fix the problem. Here is my adjusted code: function Setup() { var XMLHttp; var JSON_Data; XMLHttp = new XMLHttpRequest(); XMLHttp.open("GET", " http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); XMLHttp.onReadyStateChange = function(){ document.getElementById("JSON_Text").value = "I'm right here."; }; XMLHttp.send();} Unless I reposition my document.getElementById command, nothing will appear in my textbox. On Mon, Aug 19, 2024 at 1:23 PM Florian Schmitt < ml-...@fl...> wrote: > Ted, as far as I see, you never send() your request. The open() method > specifies / initializes the request, but it doesn't send/execute it. > See: > https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open > https://www.w3schools.com/xml/ajax_xmlhttprequest_create.asp > > HTH > Florian > > > Am 19.08.24 um 19:52 schrieb Ted Hickox: > > I keep hitting a stone wall. If I write my code like this: > > > > function Setup() { > > var XMLHttp; > > var JSON_Data; > > > > XMLHttp = new XMLHttpRequest(); > > XMLHttp.open("GET", > > "http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json > > <http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json>", > > true); > > > > > > document.getElementById("JSON_Text").value = "I'm right > > here."; > > > > } > > The words I'm right here appear in the textbox. > > > > But if I write my code like this: > > > > function Setup() { > > var XMLHttp; > > var JSON_Data; > > > > XMLHttp = new XMLHttpRequest(); > > XMLHttp.open("GET", > > "http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json > > <http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json>", > > true); > > XMLHttp.onReadyStateChange = function(){ > > > > document.getElementById("JSON_Text").value = "I'm right > > here."; > > }; > > } > > > > Nothing appears in my textbox. And I don't understand why. Can > > someone please explain this to me? > > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
From: Florian S. <ml-...@fl...> - 2024-08-19 18:22:42
|
Ted, as far as I see, you never send() your request. The open() method specifies / initializes the request, but it doesn't send/execute it. See: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open https://www.w3schools.com/xml/ajax_xmlhttprequest_create.asp HTH Florian Am 19.08.24 um 19:52 schrieb Ted Hickox: > I keep hitting a stone wall. If I write my code like this: > > function Setup() { > var XMLHttp; > var JSON_Data; > > XMLHttp = new XMLHttpRequest(); > XMLHttp.open("GET", > "http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json > <http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json>", > true); > > > document.getElementById("JSON_Text").value = "I'm right > here."; > > } > The words I'm right here appear in the textbox. > > But if I write my code like this: > > function Setup() { > var XMLHttp; > var JSON_Data; > > XMLHttp = new XMLHttpRequest(); > XMLHttp.open("GET", > "http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json > <http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json>", > true); > XMLHttp.onReadyStateChange = function(){ > > document.getElementById("JSON_Text").value = "I'm right > here."; > }; > } > > Nothing appears in my textbox. And I don't understand why. Can > someone please explain this to me? |
From: Ted H. <meg...@gm...> - 2024-08-19 17:52:57
|
I keep hitting a stone wall. If I write my code like this: function Setup() { var XMLHttp; var JSON_Data; XMLHttp = new XMLHttpRequest(); XMLHttp.open("GET", " http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); document.getElementById("JSON_Text").value = "I'm right here."; } The words I'm right here appear in the textbox. But if I write my code like this: function Setup() { var XMLHttp; var JSON_Data; XMLHttp = new XMLHttpRequest(); XMLHttp.open("GET", " http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); XMLHttp.onReadyStateChange = function(){ document.getElementById("JSON_Text").value = "I'm right here."; }; } Nothing appears in my textbox. And I don't understand why. Can someone please explain this to me? On Mon, Aug 19, 2024 at 12:16 PM Ted Hickox <meg...@gm...> wrote: > One more update. I was stupid. I forgot to replace the variables. Now I > get undefined when I run the javascript code. > > function Setup() { > var XMLHttp; > var JSON_Data; > > XMLHttp = new XMLHttpRequest(); > XMLHttp.open("GET", " > http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); > XMLHttp.onreadystatechange = function () { > if(XMLHttp.readystate == 4) { > JSON_Data = XMLHttp.responseText; > JSON_Data = JSON.parse(JSON_Data); > } > }; > > document.getElementById("JSON_Text").value = JSON_Data; > > > } > > On Mon, Aug 19, 2024 at 12:04 PM Ted Hickox <meg...@gm...> wrote: > >> I updated my code again and now nothing appears in the textbox. This is >> truly frustrating. >> >> javascript document: >> >> function Setup() { >> >> XMLHttp = new XMLHttpRequest(); >> XMLHttp.open("GET", " >> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >> true); >> XMLHttp.onreadystatechange = function () { >> if(XMLHttp.readyState == 4){} >> document.getElementById("JSON_Text").value = "Taking another >> step."; >> >> }; >> } >> >> On Mon, Aug 19, 2024 at 11:33 AM Ted Hickox <meg...@gm...> wrote: >> >>> I fixed a couple of errors and got some new responses. But I still >>> didn't get the responses I needed. >>> >>> Here is my new Javascript document: >>> >>> function Setup() { >>> >>> XMLHttp = new XMLHttpRequest(); >>> XMLHttp.open("GET", " >>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >>> true); >>> XMLHttp.onreadystatechange = function () { >>> if(XMLHttp.readyState == 4){}{ >>> JSON_Data = XMLHttp.responseText; >>> JSON_Data = JSON.parse(JSON_Data); >>> document.getElementById("JSON_Text").value = JSON_Data; >>> } >>> >>> }; >>> } >>> >>> And here is my new people.json >>> >>> {"name":"John", "age":30, "city":"New York"} >>> >>> And here is the new response from the HTML textbox: >>> >>> [object Object] >>> >>> I'm still not sure what I'm doing wrong. >>> >>> On Mon, Aug 19, 2024 at 10:06 AM Florian Schmitt < >>> ml-...@fl...> wrote: >>> >>>> Ted, if your resource is named People.json in eXist (with upper-case >>>> "P"), you'll need to adapt your URL accordingly. Currently, the URL points >>>> to people.json, not People.json. >>>> >>>> 19.08.2024 07:25:51 Ted Hickox <meg...@gm...>: >>>> >>>> My apology for giving you incorrect Javascript code. I corrected my >>>> code. Here it is: >>>> >>>> function Setup() { >>>> var XMLHttp; >>>> var JSON_Data; >>>> >>>> >>>> XMLHttp = new XMLHttpRequest(); >>>> XMLHttp.open("GET", " >>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >>>> true); >>>> XMLHttp.onreadystatechange = function () { >>>> if(XMLHttp.readyState == 4){}{ >>>> JSON_Data = XMLHttp.responseText; >>>> document.getElementById("JSON_Text").value = JSON_Data; >>>> } >>>> >>>> }; >>>> >>>> } >>>> >>>> When I run the code and check the console, it states that it can't find >>>> people.json. I don't know why my webpage can't find people.json Can you >>>> assist me? >>>> >>>> On Sun, Aug 18, 2024 at 11:42 AM Jean-Paul Rehr <re...@gm...> >>>> wrote: >>>> >>>>> Ted, none of this has to do with eXist parsing JSON. >>>>> >>>>> The URL >>>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json is >>>>> requesting a JSON document from eXist, that is, eXist is serving the >>>>> document not parsing it. >>>>> >>>>> Incidentally, one can parse a json document in Xquery with the >>>>> command: >>>>> >>>>> fn:json-doc("/db/apps/HTML_Student/people.json") >>>>> >>>>> JPR >>>>> >>>>> On Sun, Aug 18, 2024 at 6:26 PM Ted Hickox <meg...@gm...> >>>>> wrote: >>>>> >>>>>> If it's possible to parse JSON with the eXist database, why is the >>>>>> following code retrieving any data from my JSON document: >>>>>> >>>>>> JSON Example.xhtml >>>>>> >>>>>> <html xmlns="http://www.w3.org/1999/xhtml"> >>>>>> <head> >>>>>> <title>First JSON Experiment</title> >>>>>> <link rel="stylesheet" type="text/css" href=" >>>>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.css"/> >>>>>> >>>>>> <script language="javascript" src=" >>>>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.js"/> >>>>>> >>>>>> </head> >>>>>> <body onload = "Setup()"> >>>>>> <input type = "text" id = "JSON_Text"> >>>>>> </input> >>>>>> </body> >>>>>> </html> >>>>>> >>>>>> JSON Example.css >>>>>> >>>>>> #JSON_Text { >>>>>> position: absolute; >>>>>> top: 200px; >>>>>> left: 300px; >>>>>> height: 25px; >>>>>> width: 300px; >>>>>> } >>>>>> >>>>>> JSON Example.js >>>>>> >>>>>> function Setup() { >>>>>> var XMLHttp; >>>>>> var JSON_Data; >>>>>> >>>>>> XMLHttp = new XMLHttpRequest(); >>>>>> >>>>>> XMLHttp.onreadystatechange = function () { >>>>>> if(XMLHttp.readyState == 4){ >>>>>> JSON_Data = JSON.parse(XMLHttp.responseText); >>>>>> } >>>>>> }; >>>>>> >>>>>> XMLHttp.open("Get", " >>>>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >>>>>> true); >>>>>> XMLHttp.send(); >>>>>> >>>>>> >>>>>> document.getElementById("JSON_Text").value = JSON_Data; >>>>>> } >>>>>> >>>>>> People.json >>>>>> >>>>>> { >>>>>> "People":{ >>>>>> { >>>>>> "name": "Alex", >>>>>> "online": true >>>>>> }, >>>>>> { >>>>>> "name": "Billy", >>>>>> "online": false >>>>>> } >>>>>> >>>>>> } >>>>>> } >>>>>> _______________________________________________ >>>>>> Exist-open mailing list >>>>>> Exi...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/exist-open >>>>>> >>>>> |
From: Ted H. <meg...@gm...> - 2024-08-19 17:16:39
|
One more update. I was stupid. I forgot to replace the variables. Now I get undefined when I run the javascript code. function Setup() { var XMLHttp; var JSON_Data; XMLHttp = new XMLHttpRequest(); XMLHttp.open("GET", " http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); XMLHttp.onreadystatechange = function () { if(XMLHttp.readystate == 4) { JSON_Data = XMLHttp.responseText; JSON_Data = JSON.parse(JSON_Data); } }; document.getElementById("JSON_Text").value = JSON_Data; } On Mon, Aug 19, 2024 at 12:04 PM Ted Hickox <meg...@gm...> wrote: > I updated my code again and now nothing appears in the textbox. This is > truly frustrating. > > javascript document: > > function Setup() { > > XMLHttp = new XMLHttpRequest(); > XMLHttp.open("GET", " > http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); > XMLHttp.onreadystatechange = function () { > if(XMLHttp.readyState == 4){} > document.getElementById("JSON_Text").value = "Taking another > step."; > > }; > } > > On Mon, Aug 19, 2024 at 11:33 AM Ted Hickox <meg...@gm...> wrote: > >> I fixed a couple of errors and got some new responses. But I still >> didn't get the responses I needed. >> >> Here is my new Javascript document: >> >> function Setup() { >> >> XMLHttp = new XMLHttpRequest(); >> XMLHttp.open("GET", " >> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >> true); >> XMLHttp.onreadystatechange = function () { >> if(XMLHttp.readyState == 4){}{ >> JSON_Data = XMLHttp.responseText; >> JSON_Data = JSON.parse(JSON_Data); >> document.getElementById("JSON_Text").value = JSON_Data; >> } >> >> }; >> } >> >> And here is my new people.json >> >> {"name":"John", "age":30, "city":"New York"} >> >> And here is the new response from the HTML textbox: >> >> [object Object] >> >> I'm still not sure what I'm doing wrong. >> >> On Mon, Aug 19, 2024 at 10:06 AM Florian Schmitt < >> ml-...@fl...> wrote: >> >>> Ted, if your resource is named People.json in eXist (with upper-case >>> "P"), you'll need to adapt your URL accordingly. Currently, the URL points >>> to people.json, not People.json. >>> >>> 19.08.2024 07:25:51 Ted Hickox <meg...@gm...>: >>> >>> My apology for giving you incorrect Javascript code. I corrected my >>> code. Here it is: >>> >>> function Setup() { >>> var XMLHttp; >>> var JSON_Data; >>> >>> >>> XMLHttp = new XMLHttpRequest(); >>> XMLHttp.open("GET", " >>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >>> true); >>> XMLHttp.onreadystatechange = function () { >>> if(XMLHttp.readyState == 4){}{ >>> JSON_Data = XMLHttp.responseText; >>> document.getElementById("JSON_Text").value = JSON_Data; >>> } >>> >>> }; >>> >>> } >>> >>> When I run the code and check the console, it states that it can't find >>> people.json. I don't know why my webpage can't find people.json Can you >>> assist me? >>> >>> On Sun, Aug 18, 2024 at 11:42 AM Jean-Paul Rehr <re...@gm...> >>> wrote: >>> >>>> Ted, none of this has to do with eXist parsing JSON. >>>> >>>> The URL >>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json is >>>> requesting a JSON document from eXist, that is, eXist is serving the >>>> document not parsing it. >>>> >>>> Incidentally, one can parse a json document in Xquery with the command: >>>> >>>> fn:json-doc("/db/apps/HTML_Student/people.json") >>>> >>>> JPR >>>> >>>> On Sun, Aug 18, 2024 at 6:26 PM Ted Hickox <meg...@gm...> >>>> wrote: >>>> >>>>> If it's possible to parse JSON with the eXist database, why is the >>>>> following code retrieving any data from my JSON document: >>>>> >>>>> JSON Example.xhtml >>>>> >>>>> <html xmlns="http://www.w3.org/1999/xhtml"> >>>>> <head> >>>>> <title>First JSON Experiment</title> >>>>> <link rel="stylesheet" type="text/css" href=" >>>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.css"/> >>>>> >>>>> <script language="javascript" src=" >>>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.js"/> >>>>> >>>>> </head> >>>>> <body onload = "Setup()"> >>>>> <input type = "text" id = "JSON_Text"> >>>>> </input> >>>>> </body> >>>>> </html> >>>>> >>>>> JSON Example.css >>>>> >>>>> #JSON_Text { >>>>> position: absolute; >>>>> top: 200px; >>>>> left: 300px; >>>>> height: 25px; >>>>> width: 300px; >>>>> } >>>>> >>>>> JSON Example.js >>>>> >>>>> function Setup() { >>>>> var XMLHttp; >>>>> var JSON_Data; >>>>> >>>>> XMLHttp = new XMLHttpRequest(); >>>>> >>>>> XMLHttp.onreadystatechange = function () { >>>>> if(XMLHttp.readyState == 4){ >>>>> JSON_Data = JSON.parse(XMLHttp.responseText); >>>>> } >>>>> }; >>>>> >>>>> XMLHttp.open("Get", " >>>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >>>>> true); >>>>> XMLHttp.send(); >>>>> >>>>> >>>>> document.getElementById("JSON_Text").value = JSON_Data; >>>>> } >>>>> >>>>> People.json >>>>> >>>>> { >>>>> "People":{ >>>>> { >>>>> "name": "Alex", >>>>> "online": true >>>>> }, >>>>> { >>>>> "name": "Billy", >>>>> "online": false >>>>> } >>>>> >>>>> } >>>>> } >>>>> _______________________________________________ >>>>> Exist-open mailing list >>>>> Exi...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/exist-open >>>>> >>>> |
From: Ted H. <meg...@gm...> - 2024-08-19 17:04:58
|
I updated my code again and now nothing appears in the textbox. This is truly frustrating. javascript document: function Setup() { XMLHttp = new XMLHttpRequest(); XMLHttp.open("GET", " http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); XMLHttp.onreadystatechange = function () { if(XMLHttp.readyState == 4){} document.getElementById("JSON_Text").value = "Taking another step."; }; } On Mon, Aug 19, 2024 at 11:33 AM Ted Hickox <meg...@gm...> wrote: > I fixed a couple of errors and got some new responses. But I still didn't > get the responses I needed. > > Here is my new Javascript document: > > function Setup() { > > XMLHttp = new XMLHttpRequest(); > XMLHttp.open("GET", " > http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); > XMLHttp.onreadystatechange = function () { > if(XMLHttp.readyState == 4){}{ > JSON_Data = XMLHttp.responseText; > JSON_Data = JSON.parse(JSON_Data); > document.getElementById("JSON_Text").value = JSON_Data; > } > > }; > } > > And here is my new people.json > > {"name":"John", "age":30, "city":"New York"} > > And here is the new response from the HTML textbox: > > [object Object] > > I'm still not sure what I'm doing wrong. > > On Mon, Aug 19, 2024 at 10:06 AM Florian Schmitt < > ml-...@fl...> wrote: > >> Ted, if your resource is named People.json in eXist (with upper-case >> "P"), you'll need to adapt your URL accordingly. Currently, the URL points >> to people.json, not People.json. >> >> 19.08.2024 07:25:51 Ted Hickox <meg...@gm...>: >> >> My apology for giving you incorrect Javascript code. I corrected my >> code. Here it is: >> >> function Setup() { >> var XMLHttp; >> var JSON_Data; >> >> >> XMLHttp = new XMLHttpRequest(); >> XMLHttp.open("GET", " >> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >> true); >> XMLHttp.onreadystatechange = function () { >> if(XMLHttp.readyState == 4){}{ >> JSON_Data = XMLHttp.responseText; >> document.getElementById("JSON_Text").value = JSON_Data; >> } >> >> }; >> >> } >> >> When I run the code and check the console, it states that it can't find >> people.json. I don't know why my webpage can't find people.json Can you >> assist me? >> >> On Sun, Aug 18, 2024 at 11:42 AM Jean-Paul Rehr <re...@gm...> >> wrote: >> >>> Ted, none of this has to do with eXist parsing JSON. >>> >>> The URL >>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json is >>> requesting a JSON document from eXist, that is, eXist is serving the >>> document not parsing it. >>> >>> Incidentally, one can parse a json document in Xquery with the command: >>> >>> fn:json-doc("/db/apps/HTML_Student/people.json") >>> >>> JPR >>> >>> On Sun, Aug 18, 2024 at 6:26 PM Ted Hickox <meg...@gm...> wrote: >>> >>>> If it's possible to parse JSON with the eXist database, why is the >>>> following code retrieving any data from my JSON document: >>>> >>>> JSON Example.xhtml >>>> >>>> <html xmlns="http://www.w3.org/1999/xhtml"> >>>> <head> >>>> <title>First JSON Experiment</title> >>>> <link rel="stylesheet" type="text/css" href=" >>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.css"/> >>>> >>>> <script language="javascript" src=" >>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.js"/> >>>> >>>> </head> >>>> <body onload = "Setup()"> >>>> <input type = "text" id = "JSON_Text"> >>>> </input> >>>> </body> >>>> </html> >>>> >>>> JSON Example.css >>>> >>>> #JSON_Text { >>>> position: absolute; >>>> top: 200px; >>>> left: 300px; >>>> height: 25px; >>>> width: 300px; >>>> } >>>> >>>> JSON Example.js >>>> >>>> function Setup() { >>>> var XMLHttp; >>>> var JSON_Data; >>>> >>>> XMLHttp = new XMLHttpRequest(); >>>> >>>> XMLHttp.onreadystatechange = function () { >>>> if(XMLHttp.readyState == 4){ >>>> JSON_Data = JSON.parse(XMLHttp.responseText); >>>> } >>>> }; >>>> >>>> XMLHttp.open("Get", " >>>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >>>> true); >>>> XMLHttp.send(); >>>> >>>> >>>> document.getElementById("JSON_Text").value = JSON_Data; >>>> } >>>> >>>> People.json >>>> >>>> { >>>> "People":{ >>>> { >>>> "name": "Alex", >>>> "online": true >>>> }, >>>> { >>>> "name": "Billy", >>>> "online": false >>>> } >>>> >>>> } >>>> } >>>> _______________________________________________ >>>> Exist-open mailing list >>>> Exi...@li... >>>> https://lists.sourceforge.net/lists/listinfo/exist-open >>>> >>> |
From: Ted H. <meg...@gm...> - 2024-08-19 16:34:08
|
I fixed a couple of errors and got some new responses. But I still didn't get the responses I needed. Here is my new Javascript document: function Setup() { XMLHttp = new XMLHttpRequest(); XMLHttp.open("GET", " http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); XMLHttp.onreadystatechange = function () { if(XMLHttp.readyState == 4){}{ JSON_Data = XMLHttp.responseText; JSON_Data = JSON.parse(JSON_Data); document.getElementById("JSON_Text").value = JSON_Data; } }; } And here is my new people.json {"name":"John", "age":30, "city":"New York"} And here is the new response from the HTML textbox: [object Object] I'm still not sure what I'm doing wrong. On Mon, Aug 19, 2024 at 10:06 AM Florian Schmitt < ml-...@fl...> wrote: > Ted, if your resource is named People.json in eXist (with upper-case "P"), > you'll need to adapt your URL accordingly. Currently, the URL points to > people.json, not People.json. > > 19.08.2024 07:25:51 Ted Hickox <meg...@gm...>: > > My apology for giving you incorrect Javascript code. I corrected my > code. Here it is: > > function Setup() { > var XMLHttp; > var JSON_Data; > > > XMLHttp = new XMLHttpRequest(); > XMLHttp.open("GET", " > http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", > true); > XMLHttp.onreadystatechange = function () { > if(XMLHttp.readyState == 4){}{ > JSON_Data = XMLHttp.responseText; > document.getElementById("JSON_Text").value = JSON_Data; > } > > }; > > } > > When I run the code and check the console, it states that it can't find > people.json. I don't know why my webpage can't find people.json Can you > assist me? > > On Sun, Aug 18, 2024 at 11:42 AM Jean-Paul Rehr <re...@gm...> wrote: > >> Ted, none of this has to do with eXist parsing JSON. >> >> The URL http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json >> is requesting a JSON document from eXist, that is, eXist is serving the >> document not parsing it. >> >> Incidentally, one can parse a json document in Xquery with the command: >> >> fn:json-doc("/db/apps/HTML_Student/people.json") >> >> JPR >> >> On Sun, Aug 18, 2024 at 6:26 PM Ted Hickox <meg...@gm...> wrote: >> >>> If it's possible to parse JSON with the eXist database, why is the >>> following code retrieving any data from my JSON document: >>> >>> JSON Example.xhtml >>> >>> <html xmlns="http://www.w3.org/1999/xhtml"> >>> <head> >>> <title>First JSON Experiment</title> >>> <link rel="stylesheet" type="text/css" href=" >>> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.css"/> >>> >>> <script language="javascript" src=" >>> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.js"/> >>> >>> </head> >>> <body onload = "Setup()"> >>> <input type = "text" id = "JSON_Text"> >>> </input> >>> </body> >>> </html> >>> >>> JSON Example.css >>> >>> #JSON_Text { >>> position: absolute; >>> top: 200px; >>> left: 300px; >>> height: 25px; >>> width: 300px; >>> } >>> >>> JSON Example.js >>> >>> function Setup() { >>> var XMLHttp; >>> var JSON_Data; >>> >>> XMLHttp = new XMLHttpRequest(); >>> >>> XMLHttp.onreadystatechange = function () { >>> if(XMLHttp.readyState == 4){ >>> JSON_Data = JSON.parse(XMLHttp.responseText); >>> } >>> }; >>> >>> XMLHttp.open("Get", " >>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >>> true); >>> XMLHttp.send(); >>> >>> >>> document.getElementById("JSON_Text").value = JSON_Data; >>> } >>> >>> People.json >>> >>> { >>> "People":{ >>> { >>> "name": "Alex", >>> "online": true >>> }, >>> { >>> "name": "Billy", >>> "online": false >>> } >>> >>> } >>> } >>> _______________________________________________ >>> Exist-open mailing list >>> Exi...@li... >>> https://lists.sourceforge.net/lists/listinfo/exist-open >>> >> |
From: Florian S. <ml-...@fl...> - 2024-08-19 15:24:16
|
Ted, if your resource is named People.json in eXist (with upper-case "P"), you'll need to adapt your URL accordingly. Currently, the URL points to people.json, not People.json. 19.08.2024 07:25:51 Ted Hickox <meg...@gm...>: > My apology for giving you incorrect Javascript code. I corrected my code. Here it is: > > function Setup() { > var XMLHttp; > var JSON_Data; > > > XMLHttp = new XMLHttpRequest(); > XMLHttp.open("GET", "http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); > XMLHttp.onreadystatechange = function () { > if(XMLHttp.readyState == 4){}{ > JSON_Data = XMLHttp.responseText; > document.getElementById("JSON_Text").value = JSON_Data; > } > > }; > > } > > When I run the code and check the console, it states that it can't find people.json. I don't know why my webpage can't find people.json Can you assist me? > > On Sun, Aug 18, 2024 at 11:42 AM Jean-Paul Rehr <re...@gm...> wrote: >> Ted, none of this has to do with eXist parsing JSON. >> >> The URL http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json is requesting a JSON document from eXist, that is, eXist is serving the document not parsing it. >> >> Incidentally, one can parse a json document in Xquery with the command: >> >> fn:json-doc("/db/apps/HTML_Student/people.json") >> >> JPR >> >> On Sun, Aug 18, 2024 at 6:26 PM Ted Hickox <meg...@gm...> wrote: >>> If it's possible to parse JSON with the eXist database, why is the following code retrieving any data from my JSON document: >>> >>> JSON Example.xhtml >>> >>> <html xmlns="http://www.w3.org/1999/xhtml"> >>> <head> >>> <title>First JSON Experiment</title> >>> <link rel="stylesheet" type="text/css" href="http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.css"/> >>> <script language="javascript" src="http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.js"/> >>> </head> >>> <body onload = "Setup()"> >>> <input type = "text" id = "JSON_Text"> >>> </input> >>> </body> >>> </html> >>> >>> JSON Example.css >>> >>> #JSON_Text { >>> position: absolute; >>> top: 200px; >>> left: 300px; >>> height: 25px; >>> width: 300px; >>> } >>> >>> JSON Example.js >>> >>> function Setup() { >>> var XMLHttp; >>> var JSON_Data; >>> >>> XMLHttp = new XMLHttpRequest(); >>> >>> XMLHttp.onreadystatechange = function () { >>> if(XMLHttp.readyState == 4){ >>> JSON_Data = JSON.parse(XMLHttp.responseText); >>> } >>> }; >>> >>> XMLHttp.open("Get", "http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); >>> XMLHttp.send(); >>> >>> >>> document.getElementById("JSON_Text").value = JSON_Data; >>> } >>> >>> People.json >>> >>> { >>> "People":{ >>> { >>> "name": "Alex", >>> "online": true >>> }, >>> { >>> "name": "Billy", >>> "online": false >>> } >>> >>> } >>> } >>> _______________________________________________ >>> Exist-open mailing list >>> Exi...@li... >>> https://lists.sourceforge.net/lists/listinfo/exist-open |
From: Joern T. <joe...@gm...> - 2024-08-19 07:20:08
|
Ted, Make sure that your json is returned by your app by testing the Get request in the Browser. Most likely your controller.xql doesn't return that file and your need a rule for that. hth, Joern Ted Hickox <meg...@gm...> schrieb am Mo., 19. Aug. 2024, 07:26: > My apology for giving you incorrect Javascript code. I corrected my > code. Here it is: > > function Setup() { > var XMLHttp; > var JSON_Data; > > > XMLHttp = new XMLHttpRequest(); > XMLHttp.open("GET", " > http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); > XMLHttp.onreadystatechange = function () { > if(XMLHttp.readyState == 4){}{ > JSON_Data = XMLHttp.responseText; > document.getElementById("JSON_Text").value = JSON_Data; > } > > }; > > } > > When I run the code and check the console, it states that it can't find > people.json. I don't know why my webpage can't find people.json Can you > assist me? > > On Sun, Aug 18, 2024 at 11:42 AM Jean-Paul Rehr <re...@gm...> wrote: > >> Ted, none of this has to do with eXist parsing JSON. >> >> The URL http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json >> is requesting a JSON document from eXist, that is, eXist is serving the >> document not parsing it. >> >> Incidentally, one can parse a json document in Xquery with the command: >> >> fn:json-doc("/db/apps/HTML_Student/people.json") >> >> JPR >> >> On Sun, Aug 18, 2024 at 6:26 PM Ted Hickox <meg...@gm...> wrote: >> >>> If it's possible to parse JSON with the eXist database, why is the >>> following code retrieving any data from my JSON document: >>> >>> JSON Example.xhtml >>> >>> <html xmlns="http://www.w3.org/1999/xhtml"> >>> <head> >>> <title>First JSON Experiment</title> >>> <link rel="stylesheet" type="text/css" href=" >>> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.css >>> "/> >>> <script language="javascript" src=" >>> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.js"/> >>> </head> >>> <body onload = "Setup()"> >>> <input type = "text" id = "JSON_Text"> >>> </input> >>> </body> >>> </html> >>> >>> JSON Example.css >>> >>> #JSON_Text { >>> position: absolute; >>> top: 200px; >>> left: 300px; >>> height: 25px; >>> width: 300px; >>> } >>> >>> JSON Example.js >>> >>> function Setup() { >>> var XMLHttp; >>> var JSON_Data; >>> >>> XMLHttp = new XMLHttpRequest(); >>> >>> XMLHttp.onreadystatechange = function () { >>> if(XMLHttp.readyState == 4){ >>> JSON_Data = JSON.parse(XMLHttp.responseText); >>> } >>> }; >>> >>> XMLHttp.open("Get", " >>> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >>> true); >>> XMLHttp.send(); >>> >>> >>> document.getElementById("JSON_Text").value = JSON_Data; >>> } >>> >>> People.json >>> >>> { >>> "People":{ >>> { >>> "name": "Alex", >>> "online": true >>> }, >>> { >>> "name": "Billy", >>> "online": false >>> } >>> >>> } >>> } >>> _______________________________________________ >>> 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: Ted H. <meg...@gm...> - 2024-08-19 05:25:44
|
My apology for giving you incorrect Javascript code. I corrected my code. Here it is: function Setup() { var XMLHttp; var JSON_Data; XMLHttp = new XMLHttpRequest(); XMLHttp.open("GET", " http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); XMLHttp.onreadystatechange = function () { if(XMLHttp.readyState == 4){}{ JSON_Data = XMLHttp.responseText; document.getElementById("JSON_Text").value = JSON_Data; } }; } When I run the code and check the console, it states that it can't find people.json. I don't know why my webpage can't find people.json Can you assist me? On Sun, Aug 18, 2024 at 11:42 AM Jean-Paul Rehr <re...@gm...> wrote: > Ted, none of this has to do with eXist parsing JSON. > > The URL http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json > is requesting a JSON document from eXist, that is, eXist is serving the > document not parsing it. > > Incidentally, one can parse a json document in Xquery with the command: > > fn:json-doc("/db/apps/HTML_Student/people.json") > > JPR > > On Sun, Aug 18, 2024 at 6:26 PM Ted Hickox <meg...@gm...> wrote: > >> If it's possible to parse JSON with the eXist database, why is the >> following code retrieving any data from my JSON document: >> >> JSON Example.xhtml >> >> <html xmlns="http://www.w3.org/1999/xhtml"> >> <head> >> <title>First JSON Experiment</title> >> <link rel="stylesheet" type="text/css" href=" >> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.css"/> >> <script language="javascript" src=" >> http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.js"/> >> </head> >> <body onload = "Setup()"> >> <input type = "text" id = "JSON_Text"> >> </input> >> </body> >> </html> >> >> JSON Example.css >> >> #JSON_Text { >> position: absolute; >> top: 200px; >> left: 300px; >> height: 25px; >> width: 300px; >> } >> >> JSON Example.js >> >> function Setup() { >> var XMLHttp; >> var JSON_Data; >> >> XMLHttp = new XMLHttpRequest(); >> >> XMLHttp.onreadystatechange = function () { >> if(XMLHttp.readyState == 4){ >> JSON_Data = JSON.parse(XMLHttp.responseText); >> } >> }; >> >> XMLHttp.open("Get", " >> http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", >> true); >> XMLHttp.send(); >> >> >> document.getElementById("JSON_Text").value = JSON_Data; >> } >> >> People.json >> >> { >> "People":{ >> { >> "name": "Alex", >> "online": true >> }, >> { >> "name": "Billy", >> "online": false >> } >> >> } >> } >> _______________________________________________ >> Exist-open mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-open >> > |
From: Jean-Paul R. <re...@gm...> - 2024-08-18 16:42:39
|
Ted, none of this has to do with eXist parsing JSON. The URL http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json is requesting a JSON document from eXist, that is, eXist is serving the document not parsing it. Incidentally, one can parse a json document in Xquery with the command: fn:json-doc("/db/apps/HTML_Student/people.json") JPR On Sun, Aug 18, 2024 at 6:26 PM Ted Hickox <meg...@gm...> wrote: > If it's possible to parse JSON with the eXist database, why is the > following code retrieving any data from my JSON document: > > JSON Example.xhtml > > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>First JSON Experiment</title> > <link rel="stylesheet" type="text/css" href=" > http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.css"/> > <script language="javascript" src=" > http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.js"/> > </head> > <body onload = "Setup()"> > <input type = "text" id = "JSON_Text"> > </input> > </body> > </html> > > JSON Example.css > > #JSON_Text { > position: absolute; > top: 200px; > left: 300px; > height: 25px; > width: 300px; > } > > JSON Example.js > > function Setup() { > var XMLHttp; > var JSON_Data; > > XMLHttp = new XMLHttpRequest(); > > XMLHttp.onreadystatechange = function () { > if(XMLHttp.readyState == 4){ > JSON_Data = JSON.parse(XMLHttp.responseText); > } > }; > > XMLHttp.open("Get", " > http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); > XMLHttp.send(); > > > document.getElementById("JSON_Text").value = JSON_Data; > } > > People.json > > { > "People":{ > { > "name": "Alex", > "online": true > }, > { > "name": "Billy", > "online": false > } > > } > } > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
From: Ted H. <meg...@gm...> - 2024-08-18 16:25:48
|
If it's possible to parse JSON with the eXist database, why is the following code retrieving any data from my JSON document: JSON Example.xhtml <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>First JSON Experiment</title> <link rel="stylesheet" type="text/css" href=" http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.css"/> <script language="javascript" src=" http://localhost:8080/exist/rest/db/apps/HTML_Student/JSON_Example.js"/> </head> <body onload = "Setup()"> <input type = "text" id = "JSON_Text"> </input> </body> </html> JSON Example.css #JSON_Text { position: absolute; top: 200px; left: 300px; height: 25px; width: 300px; } JSON Example.js function Setup() { var XMLHttp; var JSON_Data; XMLHttp = new XMLHttpRequest(); XMLHttp.onreadystatechange = function () { if(XMLHttp.readyState == 4){ JSON_Data = JSON.parse(XMLHttp.responseText); } }; XMLHttp.open("Get", " http://localhost:8080/exist/rest/db/apps/HTML_Student/people.json", true); XMLHttp.send(); document.getElementById("JSON_Text").value = JSON_Data; } People.json { "People":{ { "name": "Alex", "online": true }, { "name": "Billy", "online": false } } } |
From: Michael W. <wes...@ja...> - 2024-08-07 00:20:27
|
Hi Ted, You have the answer of how to link to an external namespace in your first XML file. Namely, use the `xmlns:xsi` and `xsi:schemaLocation` to point to an instance of the SVG schema. Good luck! On Wed, Aug 7, 2024 at 4:26 AM Ted Hickox <meg...@gm...> wrote: > Currently I have a project with the following HTML: > > <?xml version="1.0" encoding="utf-8"?> > <xs:html xmlns="http://www.w3.org/1999/xhtml" > xmlns:svg="http://www.w3.org/2000/svg" > xmlns:xs="http://www.w3.org/1999/xhtml" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.w3.org/1999/xhtml > SVG_Bezier_Curve_Webpage_XML_Schema.xsd"> > <head> > <title>SVG_Bezier_Curve</title> > <link rel="stylesheet" type="text/css" href=" > http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve.css > "/> > <script language="javascript" src=" > http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve_2.js > "/> > </head> > <body onload="Setup()"> > <input type="button" id="Bezier_Curve_Button" value="Click Me!" > onclick="Setup2()"/> > <svg:svg id="My_SVG" height="500" width="500"> > <svg:path id="Bezier_Curve_1"/> > <svg:path id="Bezier_Curve_2"/> > </svg:svg> > </body> > </xs:html> > > And I have a XML Schema that looks like this: > > <xs:schema xmlns:web="http://www.w3.org/1999/xhtml" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:svg = "http://www.w3.org/2000/svg" > xmlns:target="http://www.w3.org/1999/xhtml" > targetNamespace="http://www.w3.org/1999/xhtml" > elementFormDefault="qualified"> > <xs:import namespace="http://www.w3.org/2000/svg"/> > <xs:complexType name="HeadType"> > <xs:sequence> > <xs:element name="head" type="target:TitleType"/> > <xs:element name="body" type="target:BodyType"/> > </xs:sequence> > </xs:complexType> > <xs:complexType name="TitleType"> > <xs:sequence> > <xs:element name="title" type="xs:string"/> > <xs:element name="link" type="target:LinkType"/> > <xs:element name="script" type="target:ScriptType"/> > </xs:sequence> > </xs:complexType> > <xs:complexType name="LinkType"> > <xs:attribute name="rel" type="xs:string"/> > <xs:attribute name="type" type="xs:string"/> > <xs:attribute name="href" type="xs:string"/> > </xs:complexType> > <xs:complexType name="ScriptType"> > <xs:attribute name="language" type="xs:string"/> > <xs:attribute name="src" type="xs:string"/> > </xs:complexType> > <xs:complexType name="BodyType"> > <xs:sequence> > <xs:element name="input" type="target:InputType"/> > <xs:element name="svg" type="target:SvgType"/> > </xs:sequence> > <xs:attribute name="onload" type="xs:string"/> > </xs:complexType> > <xs:complexType name="InputType"> > <xs:attribute name="type" type="xs:string"/> > <xs:attribute name="id" type="xs:string"/> > <xs:attribute name="value" type="xs:string"/> > <xs:attribute name="onclick" type="xs:string"/> > </xs:complexType> > <xs:complexType name="SvgType"> > <xs:sequence> > <xs:element name="path" type="target:PathType"/> > <xs:element name="path" type="target:PathType"/> > </xs:sequence> > <xs:attribute name="id" type="xs:string"/> > <xs:attribute name="height" type="xs:string"/> > <xs:attribute name="width" type="xs:string"/> > </xs:complexType> > <xs:complexType name="PathType"> > <xs:attribute name="id" type="xs:string"/> > </xs:complexType> > <xs:element name="html" type="target:HeadType"/> > </xs:schema> > > Because the SVG elements in the HTML document are in a different > namespace, I'm generating a validation error. Can I create a XML Schema > for the SVG tags in my HTML and import that schema into the schema I have > now? Would this finally validate my svg tags in my HTML code? > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > -- Michael Westbay Writer/System Administrator http://www.japanesebaseball.com/ |
From: Ted H. <meg...@gm...> - 2024-08-06 19:25:26
|
Currently I have a project with the following HTML: <?xml version="1.0" encoding="utf-8"?> <xs:html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xs="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/xhtml SVG_Bezier_Curve_Webpage_XML_Schema.xsd"> <head> <title>SVG_Bezier_Curve</title> <link rel="stylesheet" type="text/css" href=" http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve.css "/> <script language="javascript" src=" http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve_2.js "/> </head> <body onload="Setup()"> <input type="button" id="Bezier_Curve_Button" value="Click Me!" onclick="Setup2()"/> <svg:svg id="My_SVG" height="500" width="500"> <svg:path id="Bezier_Curve_1"/> <svg:path id="Bezier_Curve_2"/> </svg:svg> </body> </xs:html> And I have a XML Schema that looks like this: <xs:schema xmlns:web="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:svg = "http://www.w3.org/2000/svg" xmlns:target="http://www.w3.org/1999/xhtml" targetNamespace="http://www.w3.org/1999/xhtml" elementFormDefault="qualified"> <xs:import namespace="http://www.w3.org/2000/svg"/> <xs:complexType name="HeadType"> <xs:sequence> <xs:element name="head" type="target:TitleType"/> <xs:element name="body" type="target:BodyType"/> </xs:sequence> </xs:complexType> <xs:complexType name="TitleType"> <xs:sequence> <xs:element name="title" type="xs:string"/> <xs:element name="link" type="target:LinkType"/> <xs:element name="script" type="target:ScriptType"/> </xs:sequence> </xs:complexType> <xs:complexType name="LinkType"> <xs:attribute name="rel" type="xs:string"/> <xs:attribute name="type" type="xs:string"/> <xs:attribute name="href" type="xs:string"/> </xs:complexType> <xs:complexType name="ScriptType"> <xs:attribute name="language" type="xs:string"/> <xs:attribute name="src" type="xs:string"/> </xs:complexType> <xs:complexType name="BodyType"> <xs:sequence> <xs:element name="input" type="target:InputType"/> <xs:element name="svg" type="target:SvgType"/> </xs:sequence> <xs:attribute name="onload" type="xs:string"/> </xs:complexType> <xs:complexType name="InputType"> <xs:attribute name="type" type="xs:string"/> <xs:attribute name="id" type="xs:string"/> <xs:attribute name="value" type="xs:string"/> <xs:attribute name="onclick" type="xs:string"/> </xs:complexType> <xs:complexType name="SvgType"> <xs:sequence> <xs:element name="path" type="target:PathType"/> <xs:element name="path" type="target:PathType"/> </xs:sequence> <xs:attribute name="id" type="xs:string"/> <xs:attribute name="height" type="xs:string"/> <xs:attribute name="width" type="xs:string"/> </xs:complexType> <xs:complexType name="PathType"> <xs:attribute name="id" type="xs:string"/> </xs:complexType> <xs:element name="html" type="target:HeadType"/> </xs:schema> Because the SVG elements in the HTML document are in a different namespace, I'm generating a validation error. Can I create a XML Schema for the SVG tags in my HTML and import that schema into the schema I have now? Would this finally validate my svg tags in my HTML code? |
From: Ted H. <meg...@gm...> - 2024-07-27 19:14:05
|
Here is my XHTML: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg=" http://www.w3.org/2000/svg" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.TedTheSpeedlearner.com SVG_Bezier_Curve_Webpage_XML_Schema.xsd"> <head> <title>SVG_Bezier_Curve</title> <link rel="stylesheet" type="text/css" href=" http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve.css "/> <script language="javascript" src=" http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve_2.js "> </script> </head> <body onload="Setup()"> <input type="button" id="Bezier_Curve_Button" value="Click Me!" onclick="Setup2()"/> <svg:svg id="My_SVG" height="500" width="500"> <svg:path id="Bezier_Curve_1"/> <svg:path id="Bezier_Curve_2"/> </svg:svg> </body> </html> Here is my XML Schema: <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:target=" http://www.TedTheSpeedlearner.com" targetNamespace=" http://www.TedTheSpeedlearner.com" elementFormDefault="qualified"> <complexType name="HeadType"> <sequence> <element name="head" type="target:TitleType"/> <element name="body" type="target:BodyType"/> </sequence> </complexType> <complexType name="TitleType"> <sequence> <element name="title" type="string"/> <element name="link" type="target:LinkType"/> <element name="script" type="target:ScriptType"/> </sequence> </complexType> <complexType name="LinkType"> <attribute name="rel" type="string"/> <attribute name="type" type="string"/> <attribute name="href" type="string"/> </complexType> <complexType name="ScriptType"> <attribute name="language" type="string"/> <attribute name="src" type="string"/> </complexType> <complexType name="BodyType"> <sequence> <element name="input" type="target:InputType"/> <element name="svg" type="target:SvgType"/> <element name="path" type="PathType"/> <element name="path" type="PathType"/> </sequence> <attribute name="onload" type="string"/> </complexType> <complexType name="SvgType"> <attribute name="xmlns" type="string"/> <attribute name="id" type="string"/> <attribute name="height" type="string"/> <attribute name="width" type="string"/> </complexType> <complexType name="InputType"> <attribute name="id" type="string"/> <attribute name="onclick" type="string"/> </complexType> <complexType name="PathType"> <attribute name="id" type="string"/> </complexType> <element name="html" type="target:HeadType"/> </schema> And here is my Xquery: xquery version "3.0"; import module namespace validation="http://exist-db.org/xquery/validation"; let $schema := xs:anyURI('/db/apps/HTML_Student/SVG_Bezier_Curve_Webpage_XML_Schema.xsd') let $instance := xs:anyURI('/db/apps/HTML_Student/SVG_Bezier_Curve.xhtml') return (validation:jaxp-report($instance, xs:boolean("false"), $schema)) When I run the Xquery, the following error occurs: [image: image.png] I don't know what that error is so I don't know how to fix it. Please assist me. |
From: Nick S. <nsi...@nu...> - 2024-07-27 18:47:30
|
If our eXist-db has an unclean shutdown and we restart it and we see the below error, in our logs, what is the recommended action we should take? 2024-07-27 18:16:28,239 [main] ERROR (BFile.java [readOffsets]:2547) - Problematic tid found: 12338; trying to recover ... 2024-07-27 18:16:28,240 [main] ERROR (BFile.java [readOffsets]:2547) - Problematic tid found: 19508; trying to recover ... 2024-07-27 18:16:28,240 [main] ERROR (BFile.java [readOffsets]:2547) - Problematic tid found: 17473; trying to recover ... This error does not indicate whether the effort to recover the tid was successful or not. What is a tid? My experience historically, has been to instantiate another server and try to export the data and import it into the new server. I don't believe I have ever been able to reliably fix whatever this error is trying to tell me. I just try to get a new system setup and replace the system that reports this error. I would be interested in hearing what other people do or recommend. Nick -- Nick Sincaglia President/Founder NueMeta, LLC Digital Media & Technology Phone: +1-630-303-7035 nsi...@nu... http://www.nuemeta.com Skype: nsincaglia |
From: Ted H. <meg...@gm...> - 2024-07-26 03:59:30
|
I got an error message when I ran an xquery against my XHTML document. Here is the error: [image: image.png] Here is my XHTML: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>SVG_Bezier_Curve</title> <link rel="stylesheet" type="text/css" href=" http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve.css "/> <script language="javascript" src=" http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve_2.js "> </script> </head> <body onload="Setup()"> <input type="button" id="Bezier_Curve_Button" value="Click Me!" onclick="Setup2()"/> <svg xmlns="http://www.w3.org/2000/svg" id="My_SVG" height="500" width="500"> <path id="Bezier_Curve_1"/> <path id="Bezier_Curve_2"> </path> </svg> </body> </html> And here is my XML Schema: <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:target=" http://www.TedTheSpeedlearner.com" targetNamespace=" http://www.TedTheSpeedlearner.com" elementFormDefault="qualified"> <complexType name="HeadType"> <sequence> <element name="head" type="target:TitleType"/> <element name="body" type="target:BodyType"/> </sequence> </complexType> <complexType name="TitleType"> <sequence> <element name="title" type="string"/> <element name="link" type="target:LinkType"/> <element name="script" type="target:ScriptType"/> </sequence> </complexType> <complexType name="LinkType"> <attribute name="rel" type="string"/> <attribute name="type" type="string"/> <attribute name="href" type="string"/> </complexType> <complexType name="ScriptType"> <attribute name="language" type="string"/> <attribute name="src" type="string"/> </complexType> <complexType name="BodyType"> <sequence> <element name="input" type="target:InputType"/> <element name="svg" type="target:SvgType"/> </sequence> <attribute name="onload" type="string"/> </complexType> <complexType name="SvgType"> <sequence> <attribute name="id" type="string"/> <attribute name="height" type="string"/> <attribute name="width" type="string"/> <element name="path" type="PathType"/> <element name="path" type="PathType"/> </sequence> <attribute name="id" type="string"/> </complexType> <complexType name="InputType"> <attribute name="id" type="string"/> <attribute name="onclick" type="string"/> </complexType> <complexType name="PathType"> <attribute name="id" type="string"/> </complexType> <element name="html" type="target:HeadType"/> </schema> |
From: Ralph C. <ra...@ra...> - 2024-07-17 13:35:42
|
Thanks Jean-Paul, that worked perfectly! Cheers Ralph On 15/07/2024 19:37, Jean-Paul Rehr wrote: > In my experience this requires reindexing the entire database. When > this happens, as a general practice, I go through and reindex each app > separately. I start with the "core" apps like eXide, Monex, package > manager, etc. As you go through each app and reindex you should find > that each app is back online again... > > JPR > > On Mon, Jul 15, 2024 at 7:39 PM Ralph Corrigan <ra...@ra...> > wrote: > >> Hi all, following a JVM crash at the weekend, all of the apps front >> ends (except the dashboard) are failing to load and displaying the >> following error (this one from Monex). Has anyone seen anything >> similar? The db is accessible from Oxygen and seems fine, but nothing >> (including exide) will load... >> >> Ralph >> >> <exception> >> >> <path>/db/apps/monex/modules/view.xql</path> >> <message>exerr:ERROR The actual return type does not match the >> sequence type declared in the function's signature: >> config:app-title(node(), map(*)) text(). Expected cardinality: exactly >> one, got 0. [at line 63, column 50, source: >> /db/apps/monex/modules/view.xql] In function: config:app-title(node(), >> map(*)) [-1:-1:/db/apps/monex/modules/config.xqm] >> templates:process-output(element(), map(*), item()*, element()) >> [211:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:call-by-introspection(element(), map(*), map(*), >> function(*)) >> [189:28:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:call(item(), element(), map(*)) >> [137:36:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:process(node()*, map(*)) >> [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:process(node()*, map(*)) >> [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:process(node()*, map(*)) >> [428:17:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:process-output(element(), map(*), item()*) >> [230:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:process-output(element(), map(*), item()*, element()) >> [211:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:call-by-introspection(element(), map(*), map(*), >> function(*)) >> [189:28:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:call(item(), element(), map(*)) >> [145:37:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:process(node()*, map(*)) >> [133:51:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:process(node()*, map(*)) >> [90:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] >> templates:apply(node()+, function(*), map(*)?, map(*)?) >> [43:5:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]</message> >> </exception> _______________________________________________ >> Exist-open mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-open |
From: Ted H. <meg...@gm...> - 2024-07-17 13:25:51
|
Here is my XHTML <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>SVG_Bezier_Curve</title> <link rel="stylesheet" type="text/css" href=" http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve.css "/> <script language="javascript" src=" http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve_2.js "> </script> </head> <body> <input type="text" id="My_Text" value="I was here."/> <input type="button" onclick="Setup2()"/> <input type="button" onclick="Setup()"/> <p id="My_Paragraph"/> <svg xmlns="http://www.w3.org/2000/svg" id="My_SVG" height="500" width="500"> <path id="Bezier_Curve_1"/> <path id="Bezier_Curve_2" d="M 300, 200 A 50, 50 0,0,1 400,200" stroke="red" stroke-width="3" fill="none"> </path> </svg> </body> </html> Here is my Javascript: function Setup() { var Bezier_Curve_Identification; var Attribute_Name; var Attribute_Name_2; var Coordinate; var My_Properties; document.getElementById("My_Text").value = "My Setup."; Attribute_Name = "d"; Attribute_Name_2 = "style"; My_Properties = "stroke: blue; stroke-width: 3; fill: none;"; Coordinate = "M 300 200 A 20 20 0 0 0 400 200"; Bezier_Curve_Identification = document.getElementById('Bezier_Curve_1'); Bezier_Curve_Identification.setAttribute(Attribute_Name, Coordinate); Bezier_Curve_Identification.setAttribute(Attribute_Name_2, My_Properties); } function Setup2() { var SVG_Data; var Retrieved_Data; SVG_Data = new XMLHttpRequest(); SVG_Data.open("GET"," http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve.xq", true); SVG_Data.onreadystatechange = function () { if (SVG_Data.readyState == 4) { Retrieved_Data = SVG_Data.responseText; document.getElementById("My_Text").value = Retrieved_Data;} }; SVG_Data.send();} Here is my Xquery: xquery version "3.0"; declare default element namespace "http://www.TedTheSpeedlearner.com"; declare option exist:serialize "method=text media-type=text/plain"; let $header-addition := response:set-header("Access-Control-Allow-Origin","*"); let $doc := doc("SVG_Bezier_Curve_Data.xml")/SVG_Data_Collection/Bezier_Curve_1; let $First_Data_Name := $doc/Main_Attribute; let $Data := concat($First_Data_Name, "*"); let $Second_Data_Name := $doc/Initial_Attribute; let $Data := concat($Data, $Second_Data_Name, "-"); let $Third_Data_Name := $doc/Coordinate_Start; let $Data := concat($Data, $Third_Data_Name, "-"); let $Fourth_Data_Name := $doc/Arc_Attribute; let $Data := concat($Data, $Fourth_Data_Name, "-"); let $Fifth_Data_Name := $doc/Bezier_Arc; let $Data := concat($Data, $Fifth_Data_Name, "-"); let $Sixth_Data_Name := $doc/Terminal_Coordinate; let $Data := concat($Data, $Sixth_Data_Name); return $Data; Here is my data: <SVG_Data_Collection xmlns="http://www.TedTheSpeedlearner.com" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.TedTheSpeedlearner.com SVG_Bezier_Curve_Data_Schema.xsd"> <Bezier_Curve_1> <Main_Attribute>d</Main_Attribute> <Initial_Attribute>M</Initial_Attribute> <Coordinate_Start>300 200</Coordinate_Start> <Arc_Attribute>A</Arc_Attribute> <Bezier_Arc>20 20 0 0 0</Bezier_Arc> <Terminal_Coordinate>400 200</Terminal_Coordinate> <Style_Attribute>style</Style_Attribute> <Style_Color>stroke: red;</Style_Color> <Style_Width>stroke-width: 3;</Style_Width> <Style_Fill>fill: none;</Style_Fill> </Bezier_Curve_1> <Bezier_Curve_2> <Main_Attribute>d</Main_Attribute> <Initial_Attribute>M</Initial_Attribute> <Coordinate_Start>300 200</Coordinate_Start> <Arc_Attribute>A</Arc_Attribute> <Bezier_Arc>20 20 0 0 0</Bezier_Arc> <Terminal_Coordinate>400 200</Terminal_Coordinate> <Style_Attribute>style</Style_Attribute> <Style_Color>stroke: blue;</Style_Color> <Style_Width>stroke-width: 3;</Style_Width> <Style_Fill>fill: none;</Style_Fill> </Bezier_Curve_2> </SVG_Data_Collection> I already validated the XML data. Why do I get this error: <html><head><meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/><title>Error 404 Document /db/apps/HTML_Student/SVG_Bezier_Curve.xq not found</title></head><body><h2>HTTP ERROR 404 Document /db/apps/HTML_Student/SVG_Bezier_Curve.xq not found</h2><table><tr><th>URI:</th><td>/exist/rest/db/apps/HTML_Student/SVG_Bezier_Curve.xq</td></tr><tr><th>STATUS:</th><td>404</td></tr><tr><th>MESSAGE:</th><td>Document /db/apps/HTML_Student/SVG_Bezier_Curve.xq not found</td></tr><tr><th>SERVLET:</th><td>EXistServlet</td></tr></table><hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.50.v20221201</a><hr/></body></html> |
From: Jean-Paul R. <re...@gm...> - 2024-07-15 18:37:31
|
In my experience this requires reindexing the entire database. When this happens, as a general practice, I go through and reindex each app separately. I start with the "core" apps like eXide, Monex, package manager, etc. As you go through each app and reindex you should find that each app is back online again... JPR On Mon, Jul 15, 2024 at 7:39 PM Ralph Corrigan <ra...@ra...> wrote: > Hi all, following a JVM crash at the weekend, all of the apps front ends > (except the dashboard) are failing to load and displaying the following > error (this one from Monex). Has anyone seen anything similar? The db is > accessible from Oxygen and seems fine, but nothing (including exide) will > load... > > Ralph > <exception> > <path>/db/apps/monex/modules/view.xql</path> > <message>exerr:ERROR The actual return type does not match the sequence > type declared in the function's signature: config:app-title(node(), map(*)) > text(). Expected cardinality: exactly one, got 0. [at line 63, column 50, > source: /db/apps/monex/modules/view.xql] In function: > config:app-title(node(), map(*)) [-1:-1:/db/apps/monex/modules/config.xqm] > templates:process-output(element(), map(*), item()*, element()) > [211:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:call-by-introspection(element(), map(*), map(*), function(*)) > [189:28:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:call(item(), element(), map(*)) > [137:36:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:process(node()*, map(*)) > [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:process(node()*, map(*)) > [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:process(node()*, map(*)) > [428:17:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:process-output(element(), map(*), item()*) > [230:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:process-output(element(), map(*), item()*, element()) > [211:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:call-by-introspection(element(), map(*), map(*), function(*)) > [189:28:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:call(item(), element(), map(*)) > [145:37:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:process(node()*, map(*)) > [133:51:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:process(node()*, map(*)) > [90:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > templates:apply(node()+, function(*), map(*)?, map(*)?) > [43:5:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] > </message> > </exception> > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |