4209: XML DTD rewrite, cleanup
svn: r17648
This commit is contained in:
parent
f8c7e748c7
commit
5d467fc7ea
@ -107,7 +107,7 @@ PEOPLE
|
||||
objref*, address*, attribute*, url*, childof*,
|
||||
parentin*, personref*, noteref*, sourceref*, tagref*)>
|
||||
<!ATTLIST person
|
||||
id CDATA #REQUIRED
|
||||
id CDATA #IMPLIED
|
||||
handle ID #REQUIRED
|
||||
priv (0|1) #IMPLIED
|
||||
marker CDATA #IMPLIED
|
||||
@ -182,7 +182,7 @@ FAMILY
|
||||
<!ELEMENT family (rel?, father?, mother?, eventref*, lds_ord*, objref*,
|
||||
childref*, attribute*, noteref*, sourceref*, tagref*)>
|
||||
<!ATTLIST family
|
||||
id CDATA #REQUIRED
|
||||
id CDATA #IMPLIED
|
||||
handle ID #REQUIRED
|
||||
priv (0|1) #IMPLIED
|
||||
marker CDATA #IMPLIED
|
||||
@ -216,7 +216,7 @@ EVENT
|
||||
<!ELEMENT event (type?, (daterange|datespan|dateval|datestr)?, place?, cause?,
|
||||
description?, attribute*, noteref*, sourceref*, objref*)>
|
||||
<!ATTLIST event
|
||||
id CDATA #REQUIRED
|
||||
id CDATA #IMPLIED
|
||||
handle ID #REQUIRED
|
||||
priv (0|1) #IMPLIED
|
||||
marker CDATA #IMPLIED
|
||||
@ -231,7 +231,7 @@ SOURCES
|
||||
<!ELEMENT source (stitle?, sauthor?, spubinfo?, sabbrev?,
|
||||
noteref*, objref*, data_item*, reporef*)>
|
||||
<!ATTLIST source
|
||||
id CDATA #REQUIRED
|
||||
id CDATA #IMPLIED
|
||||
handle ID #REQUIRED
|
||||
priv (0|1) #IMPLIED
|
||||
marker CDATA #IMPLIED
|
||||
@ -251,7 +251,7 @@ PLACES
|
||||
<!ELEMENT placeobj (ptitle?, coord?, location*, objref*, url*, noteref*,
|
||||
sourceref*)>
|
||||
<!ATTLIST placeobj
|
||||
id CDATA #REQUIRED
|
||||
id CDATA #IMPLIED
|
||||
handle ID #REQUIRED
|
||||
priv (0|1) #IMPLIED
|
||||
marker CDATA #IMPLIED
|
||||
@ -287,7 +287,7 @@ OBJECTS
|
||||
<!ELEMENT object (file, attribute*, noteref*,
|
||||
(daterange|datespan|dateval|datestr)?, sourceref*, tagref*)>
|
||||
<!ATTLIST object
|
||||
id CDATA #REQUIRED
|
||||
id CDATA #IMPLIED
|
||||
handle ID #REQUIRED
|
||||
priv (0|1) #IMPLIED
|
||||
marker CDATA #IMPLIED
|
||||
@ -309,7 +309,7 @@ REPOSITORIES
|
||||
|
||||
<!ELEMENT repository (rname, type, address*, url*, noteref*)>
|
||||
<!ATTLIST repository
|
||||
id CDATA #REQUIRED
|
||||
id CDATA #IMPLIED
|
||||
handle ID #REQUIRED
|
||||
priv (0|1) #IMPLIED
|
||||
marker CDATA #IMPLIED
|
||||
@ -326,7 +326,7 @@ NOTES
|
||||
|
||||
<!ELEMENT note (text, style*, tagref*)>
|
||||
<!ATTLIST note
|
||||
id CDATA #REQUIRED
|
||||
id CDATA #IMPLIED
|
||||
handle ID #REQUIRED
|
||||
priv (0|1) #IMPLIED
|
||||
marker CDATA #IMPLIED
|
||||
|
@ -143,7 +143,7 @@
|
||||
|
||||
<define name="primary-object">
|
||||
<ref name="table-object"/>
|
||||
<attribute name="id"><text/></attribute>
|
||||
<optional><attribute name="id"><text/></attribute></optional>
|
||||
<optional><attribute name="priv"><choice>
|
||||
<value>0</value>
|
||||
<value>1</value>
|
||||
|
@ -121,7 +121,7 @@ class BaseMergeCheck(unittest.TestCase):
|
||||
def do_test(self, phoenix_id, titanic_id, input_doc, expect_doc,
|
||||
test_error_str='', debug=False):
|
||||
"""Do the merge and "assert" the result."""
|
||||
process = subprocess.Popen('python gramps.py '
|
||||
process = subprocess.Popen('python gramps.py -d .ImportXML '
|
||||
'--config=preferences.eprefix:DEFAULT '
|
||||
'-i - -f gramps -a tool '
|
||||
'-p "name=climerge,primary=%s,secondary=%s" '
|
||||
@ -143,7 +143,7 @@ class BaseMergeCheck(unittest.TestCase):
|
||||
|
||||
def do_family_test(self, phoenix_id, titanic_id, father_h, mother_h,
|
||||
input_doc, expect_doc, test_error_str='', debug=False):
|
||||
process = subprocess.Popen('python gramps.py '
|
||||
process = subprocess.Popen('python gramps.py -d .ImportXML '
|
||||
'--config=preferences.eprefix:DEFAULT '
|
||||
'-i - -f gramps -a tool '
|
||||
'-p "name=climerge,primary=%s,secondary=%s,father_h=%s,mother_h=%s" '
|
||||
@ -165,7 +165,7 @@ class BaseMergeCheck(unittest.TestCase):
|
||||
|
||||
def raw_contains(self, phoenix_id, titanic_id, input_doc, expect_str,
|
||||
test_error_str='', debug=False):
|
||||
process = subprocess.Popen('python gramps.py '
|
||||
process = subprocess.Popen('python gramps.py -d .ImportXML '
|
||||
'--config=preferences.eprefix:DEFAULT '
|
||||
'-i - -f gramps -a tool '
|
||||
'-p "name=climerge,primary=%s,secondary=%s" '
|
||||
|
@ -1076,7 +1076,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
str_prefix = pattern_match.group(1)
|
||||
nr_width = pattern_match.group(2)
|
||||
def closure_func(gramps_id):
|
||||
if gramps_id.startswith(str_prefix):
|
||||
if gramps_id and gramps_id.startswith(str_prefix):
|
||||
id_number = gramps_id[len(str_prefix):]
|
||||
if id_number.isdigit():
|
||||
id_value = int(id_number, 10)
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user