Skip to content

Commit b4f7be9

Browse files
committed
revert GEPS045 stuff
1 parent 2321523 commit b4f7be9

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

lxml/lxmlGramplet.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def epoch(t):
122122
#
123123
#-------------------------------------------------------------------------
124124

125-
NAMESPACE = '{http://gramps-project.org/xml/1.8.0/}'
125+
NAMESPACE = '{http://gramps-project.org/xml/1.7.1/}'
126126

127127
class lxmlGramplet(Gramplet):
128128
"""
@@ -321,7 +321,7 @@ def ReadXML(self, entry):
321321
#tree = etree.ElementTree(file=filename)
322322
tree = etree.parse(filename)
323323
doctype = tree.docinfo.doctype
324-
current = '<!DOCTYPE database PUBLIC "-//Gramps//DTD Gramps XML 1.8.0//EN" "http://gramps-project.org/xml/1.8.0/grampsxml.dtd">'
324+
current = '<!DOCTYPE database PUBLIC "-//Gramps//DTD Gramps XML 1.7.1//EN" "http://gramps-project.org/xml/1.7.1/grampsxml.dtd">'
325325
if self.RNGValidation(tree, rng) == True:
326326
try:
327327
self.ParseXML(tree, filename)
@@ -423,12 +423,13 @@ def ParseXML(self, tree, filename):
423423

424424
if three.tag == NAMESPACE + 'pname':
425425
text = str(three.attrib.get('value'))
426-
translation = str(three.attrib.get('lang'))
427-
if translation == 'None':
428-
translation = xml_lang()[0:2]
429-
text = text + _(' - (? or %(lang)s)') % {'lang':translation}
430-
else:
431-
text = text + _(' - (%(lang)s)') % {'lang':translation}
426+
# GEPS045 (XML schema 1.8.0)
427+
#translation = str(three.attrib.get('lang'))
428+
#if translation == 'None':
429+
#translation = xml_lang()[0:2]
430+
#text = text + _(' - (? or %(lang)s)') % {'lang':translation}
431+
#else:
432+
#text = text + _(' - (%(lang)s)') % {'lang':translation}
432433
if text not in places:
433434
places.append(text) # temp display
434435
if three.tag == NAMESPACE + 'stitle' and three.text not in sources:
@@ -537,7 +538,7 @@ def ParseXML(self, tree, filename):
537538
def xsd(self, xsd, filename):
538539
"""
539540
Look at schema, validation, conform, structure, content, etc...
540-
Code for 1.8.0 and +
541+
Code for 1.7.1
541542
"""
542543

543544
# syntax check against XSD for file format
@@ -558,7 +559,7 @@ def xsd(self, xsd, filename):
558559
def check_valid(self, filename):
559560
"""
560561
Look at schema, validation, conform, etc...
561-
Code for 1.8.0 and +
562+
Code for 1.7.1
562563
"""
563564

564565
# syntax check against DTD for file format

0 commit comments

Comments
 (0)