Skip to content

Commit

Permalink
Improve XML format for parents
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Aug 7, 2024
1 parent f95ba68 commit ed2d6b1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -3374,8 +3374,7 @@ sub print_person
if(my $aka = $person->as_string({ use_aka => 1 })) {
$phrase->append(" (also known as $aka)");
print $html " (also known as $aka)";
$aka = wide_to_xml($aka);
print $xml " (also known as $aka)";
print $xml '<aka>', wide_to_xml($aka), "</aka>\n\t\t\t\t";
}

my $start_of_paragraph = 0;
Expand Down Expand Up @@ -8018,15 +8017,17 @@ sub print_person
if($father && (my $f = person_line_html({ person => $father, year => $year }))) {
print $html "<li>$f</li>";
print $csv person_line_csv({ person => $father, year => $year });
my $x = wide_to_xml($f);
print $xml "\n\t\t<father>$x</father>";
print $xml "\n\t\t<father>\n\t\t\t<xref>", $father->xref(),
"</xref>\n\t\t\t<first_name>", given_names($father), "</first_name>\n\t\t\t<surname>",
normalize_name($father->surname()), "</surname>\n\t\t</father>";
}
print $csv '!';
if($mother && (my $m = person_line_html({ person => $mother, year => $year }))) {
print $html "<li>$m</li>";
print $csv person_line_csv({ person => $mother, year => $year });
my $x = wide_to_xml($m);
print $xml "\n\t\t<mother>$x</mother>";
print $xml "\n\t\t<mother>\n\t\t\t<xref>", $mother->xref(),
"</xref>\n\t\t\t<first_name>", given_names($mother), "</first_name>\n\t\t\t<surname>",
normalize_name($mother->surname()), "</surname>\n\t\t</mother>";
}
print $html '</ol>';
} else {
Expand Down Expand Up @@ -11087,8 +11088,7 @@ sub place {
if(ref($address) eq 'Gedcom::Record') {
$place = getaddress($address);
$address = undef;
} else {
$place = $place->place();
} elsif($place = $place->place()) {
$place = undef if($place eq '-');
}
if(!defined($place)) {
Expand Down

0 comments on commit ed2d6b1

Please sign in to comment.