--- a/sysdeftools/joinsysdef.pl Tue Jun 01 11:42:12 2010 +0100
+++ b/sysdeftools/joinsysdef.pl Tue Jun 01 13:15:51 2010 +0100
@@ -610,12 +610,19 @@
$link=&resolvePath($file,$link);
if(-e $link)
{
- my $doc = $parser->parsefile ($link);
- &checkSyntaxVersion($doc->getDocumentElement->getAttribute('schema')); # ensure we track we highest syntax number
- my @docns = &namespaces($link,$doc->getDocumentElement);
- undef $doc;
- return (@res,@docns);
- #ignore any children nodes if this is a link
+ my $doc;
+ eval {
+ $doc = $parser->parsefile ($link);
+ };
+ if($doc)
+ {
+ &checkSyntaxVersion($doc->getDocumentElement->getAttribute('schema')); # ensure we track we highest syntax number
+ my @docns = &namespaces($link,$doc->getDocumentElement);
+ undef $doc;
+ return (@res,@docns);
+ #ignore any children nodes if this is a link
+ }
+ print STDERR "Error: Malformed XML. Could not process $link\n";
}
# print STDERR "Note: $link not found\n"; -- no need to warm now. Do so later when trying to join
}