Commit c017ecfd authored by Neeme Kahusk's avatar Neeme Kahusk

kontakt as

utuseta
parent 3bb9ee62
SIMPLE = ['ressursi nimed','doi']
NAMES = ['eestikeelne ressursi nimi','ingliskeelne ressursi nimi','kontaktisiku asutus','doi']
NAMES_ATA = ['eestikeelne ressursi nimi','ingliskeelne ressursi nimi','kontaktisik asutuseta','doi']
......@@ -13,9 +13,9 @@ from pathlib import Path
from lxml import etree
from prepare import read_xml
from configure_columns import SIMPLE, NAMES
from configure_columns import SIMPLE, NAMES, NAMES_ATA
XPATHLIST = NAMES
XPATHLIST = NAMES_ATA
class Name(object):
def __init__(self):
......@@ -81,7 +81,8 @@ def text_or_subtexts(element: etree._Element):
a = 'http://doi.org/' + a
return a
else:
for el in element.xpath('./descendant-or-self::*/text()'):
#for el in element.xpath('./descendant-or-self::*/text()'):
for el in element.xpath('./*[not(descendant::affiliation) and not(ancestor-or-self::affiliation)]/text()'):
out.append(el)
return ', '.join(out)
......
......@@ -15,6 +15,7 @@ levitamise vahend distributionInfo/licenceInfo/distributionAccessMedium .//x:di
distributionInfo/licenceInfo/distributionAccessMedium .//x:distributionInfo/x:licenceInfo/x:distributionAccessMedium downloadable 224 {http://www.ilsp.gr/META-XMLSchema}distributionInfo/{http://www.ilsp.gr/META-XMLSchema}licenceInfo/{http://www.ilsp.gr/META-XMLSchema}distributionAccessMedium[2]
allalaadimiskoht distributionInfo/licenceInfo/downloadLocation .//x:distributionInfo/x:licenceInfo/x:downloadLocation ftp://ftp.eki.ee/pub/keeletehnoloogia/inglise-eesti/ 224 {http://www.ilsp.gr/META-XMLSchema}distributionInfo/{http://www.ilsp.gr/META-XMLSchema}licenceInfo/{http://www.ilsp.gr/META-XMLSchema}downloadLocation
kontaktisik contactPerson .//x:contactPerson
kontaktisik asutuseta .//x:contactPerson
kontaktisiku perekonnanimi contactPerson/surname lang=en ".//x:contactPerson/x:surname[@lang=""en""]" Hein 224 {http://www.ilsp.gr/META-XMLSchema}contactPerson/{http://www.ilsp.gr/META-XMLSchema}surname
kontaktisiku eesnimi contactPerson/givenName lang=en ".//x:contactPerson/x:givenName[@lang=""en""]" Indrek 224 {http://www.ilsp.gr/META-XMLSchema}contactPerson/{http://www.ilsp.gr/META-XMLSchema}givenName
kontaktisiku meiliaadress contactPerson/communicationInfo/email .//x:contactPerson/x:communicationInfo/x:email Indrek.Hein@eki.ee 224 {http://www.ilsp.gr/META-XMLSchema}contactPerson/{http://www.ilsp.gr/META-XMLSchema}communicationInfo/{http://www.ilsp.gr/META-XMLSchema}email
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment