From dennis.knorr at gmx.net Thu Jun 21 17:36:59 2018 From: dennis.knorr at gmx.net (dennis knorr) Date: Thu, 21 Jun 2018 19:36:59 +0200 Subject: tellico and SRU Servers as own data definition. Message-ID: <264e176d-d38e-268d-8588-1f6d7f8e929f@gmx.net> Hi, after a few years (how time flies) i finally have time again for trying to use tellico with the "deutsche nationalbibliothek" dnb service. They use SRU and MARC21-XML (looking at http://www.dnb.de/DE/Service/DigitaleDienste/SRU/sru_node.html) For using the SRU Interface you have to register for a token, where the described an example where i could use the SRU Interface with the following link: https://services.dnb.de/sru/dnb?version=1.1&operation=searchRetrieve&query=%22Deutsche%20Nationalbibliothek%22&accessToken=XXXXXXXX or https://services.dnb.de/oai/repository?verb=ListRecords&from=2012-02-08T13:59:55Z&until=2012-02-08T15:00:00Z&set=dnb&metadataPrefix=oai_dc&accessToken=XXXXXXXXXX There were other examples with a tilde "~", too. But i were not sure, if tellico supports that style of request. i then tried to add an sru server with a datasource and parameters like in the screenshot of the attachment. but the search for anything with that server did not return anything. And i got the following error in the Konsole: ############################################### Entity: line 1: parser error : Space required after the Public Identifier ^ Entity: line 1: parser error : SystemLiteral " or ' expected ^ Entity: line 1: parser error : SYSTEM or PUBLIC, the URI is missing ^ Entity: line 12: parser error : Opening and ending tag mismatch: hr line 10 and body ^ Entity: line 12: parser error : Opening and ending tag mismatch: body line 4 and html ^ Entity: line 13: parser error : Premature end of data in tag html line 2 ^ XSLTHandler::applyStylesheet() - error parsing input string! unrecognized format: "marcxml" ############################################### Any idea what i did wrong, or how i could debug this? i am not really proficient in C++/QT (would be a good time anyway...) but writing cout << string should be doable. my problem is, i have no knowledge about SRU/MARC21-XML at all and do not know how to get such knowledge. A google search just revealed a few libraries which convert between marc21-xml and rdf. There does not seem to be much information how to do all that stuff online. So my questions are: 1. Any idea, what i did wrong in my configuration? 2. Does any of my input help to say, in which way i could debug it better? 3. Do anyone of you know of resources how to query/process SRU and MARC21-XML Stuff? Yours, Dennis -------------- next part -------------- A non-text attachment was scrubbed... Name: tellico.png Type: image/png Size: 221064 bytes Desc: not available URL: From dennis.knorr at gmx.net Sun Jun 24 07:26:59 2018 From: dennis.knorr at gmx.net (dennis knorr) Date: Sun, 24 Jun 2018 09:26:59 +0200 Subject: tellico and SRU Servers as own data definition. (found a problem) In-Reply-To: <264e176d-d38e-268d-8588-1f6d7f8e929f@gmx.net> References: <264e176d-d38e-268d-8588-1f6d7f8e929f@gmx.net> Message-ID: <815a822b-e1eb-58a0-ebbd-45dc0ab16534@gmx.net> Ahoi! :-) after digging through the sourcecode and working with the network sniffer i identified following working search string: http://services.dnb.de/sru/dnb?accessToken=TOKENNUMBER&operation=searchRetrieve&version=1.1&maximumRecords=25&recordSchema=MARC21-xml&query=%22Scheibenwelt%22 the recordscheme marcxml is not known at the dnb, it has to be MARC21-xml, and at first i had problems with dc.title, too. but that seems to work. this only seemed to work, if i edit the config-file and entered there the correct value. at the moment i think, there could be a problem with the order of HTTP parameters, but i have to verify that. at the moment the search results only show one result, though more are delivered. but i have to look into that. its exciting to hack again! :D Am 21.06.2018 um 19:36 schrieb dennis knorr: > Hi, > after a few years (how time flies) i finally have time again for trying > to use tellico with the "deutsche nationalbibliothek" dnb service. > They use SRU and MARC21-XML (looking at > http://www.dnb.de/DE/Service/DigitaleDienste/SRU/sru_node.html) > > For using the SRU Interface you have to register for a token, where the > described an example where i could use the SRU Interface with the > following link: > > https://services.dnb.de/sru/dnb?version=1.1&operation=searchRetrieve&query=%22Deutsche%20Nationalbibliothek%22&accessToken=XXXXXXXX > > or > > https://services.dnb.de/oai/repository?verb=ListRecords&from=2012-02-08T13:59:55Z&until=2012-02-08T15:00:00Z&set=dnb&metadataPrefix=oai_dc&accessToken=XXXXXXXXXX > > There were other examples with a tilde "~", too. But i were not sure, if > tellico supports that style of request. > > i then tried to add an sru server with a datasource and parameters like > in the screenshot of the attachment. but the search for anything with > that server did not return anything. > > And i got the following error in the Konsole: > ############################################### > Entity: line 1: parser error : Space required after the Public Identifier > > ^ > Entity: line 1: parser error : SystemLiteral " or ' expected > > ^ > Entity: line 1: parser error : SYSTEM or PUBLIC, the URI is missing > > ^ > Entity: line 12: parser error : Opening and ending tag mismatch: hr line > 10 and body > > ^ > Entity: line 12: parser error : Opening and ending tag mismatch: body > line 4 and html > > ^ > Entity: line 13: parser error : Premature end of data in tag html line 2 > > ^ > XSLTHandler::applyStylesheet() - error parsing input string! > unrecognized format: "marcxml" > > ############################################### > > > Any idea what i did wrong, or how i could debug this? i am not really > proficient in C++/QT (would be a good time anyway...) but writing cout > << string should be doable. my problem is, i have no knowledge about > SRU/MARC21-XML at all and do not know how to get such knowledge. A > google search just revealed a few libraries which convert between > marc21-xml and rdf. > > There does not seem to be much information how to do all that stuff online. > > So my questions are: > 1. Any idea, what i did wrong in my configuration? > 2. Does any of my input help to say, in which way i could debug it better? > 3. Do anyone of you know of resources how to query/process SRU and > MARC21-XML Stuff? > > Yours, Dennis > From robby at periapsis.org Tue Jun 26 01:46:08 2018 From: robby at periapsis.org (Robby Stephenson) Date: Mon, 25 Jun 2018 21:46:08 -0400 Subject: tellico and SRU Servers as own data definition. (found a problem) In-Reply-To: <815a822b-e1eb-58a0-ebbd-45dc0ab16534@gmx.net> References: <264e176d-d38e-268d-8588-1f6d7f8e929f@gmx.net> <815a822b-e1eb-58a0-ebbd-45dc0ab16534@gmx.net> Message-ID: HI Dennis, Sorry it took me a bit to respond, I've been on travel. On Sun, Jun 24, 2018 at 3:26 AM, dennis knorr wrote: > Ahoi! :-) > after digging through the sourcecode and working with the network > sniffer i identified following working search string: > > http://services.dnb.de/sru/dnb?accessToken=TOKENNUMBER& > operation=searchRetrieve&version=1.1&maximumRecords=25& > recordSchema=MARC21-xml&query=%22Scheibenwelt%22 > > the recordscheme marcxml is not known at the dnb, it has to be > MARC21-xml, and at first i had problems with dc.title, too. but that > seems to work. > this only seemed to work, if i edit the config-file and entered there > the correct value. > You can set the recordschema to MARC21-xml directly in Tellico. Add your accessToken in the parameter list there. I'll attach a screenshot. Sounds like you got that to work. at the moment i think, there could be a problem with the order of HTTP > parameters, but i have to verify that. > > at the moment the search results only show one result, though more are > delivered. but i have to look into that. > Now, as to why there's only one response, DNB isn't sending back valid MARC21 XML as Tellico interprets it, based on the Library of Congress schema. If you modify the installed MARC21slim2MODS3.xsl file slightly, it'll work. I'll attach a modified copy - overwrite your installed version or put a personal copy in ~/.local/share/tellico/. With those changes, I get over 25 results in Tellico. Robby -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dnb_settings.png Type: image/png Size: 17110 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MARC21slim2MODS3.xsl Type: application/xslt+xml Size: 208772 bytes Desc: not available URL: