sysdeftools/validate/checklinks.pl
author Bob Rosenberg <bob.rosenberg@nokia.com>
Thu, 22 Jul 2010 12:30:22 +0100
branchHighFidelityModel
changeset 390 a47fc547d2e3
parent 319 b085ba15cdaa
permissions -rw-r--r--
Simplify and add hacks for some XSLT processors: simpler xpath expressions in filtering.xsl and qt hack in mergesysdef.xsl. Move path processing XSLT templates to separate module so it can be used in both joining and merging. Add .bat files for each of the PERL and XSLT scripts so they can be more esily called from the command line (joinsysdef.bat calls joinsysdef.pl, not joinsysdef.xsl).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
     1
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     2
# All rights reserved.
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     3
# This component and the accompanying materials are made available
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
     4
# under the terms of "Eclipse Public License v1.0"
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     5
# which accompanies this distribution, and is available
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     7
#
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     8
# Initial Contributors:
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     9
# Nokia Corporation - initial contribution.
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    10
#
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    11
# Contributors:
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    12
#
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    13
# Description:
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    14
# Script to validate the unit links in a system definition or package definition XML file
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    15
#!/usr/bin/perl
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    16
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    17
use strict;
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    18
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    19
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    20
use FindBin;		# for FindBin::Bin
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    21
use lib $FindBin::Bin;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    22
use lib "$FindBin::Bin/lib";
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    23
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    24
use Cwd;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    25
use Cwd 'abs_path';
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    26
use Getopt::Long;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    27
use File::Basename;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    28
use File::Spec;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    29
use XML::DOM;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    30
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    31
my $output;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    32
my $path;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    33
my %defineParams;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    34
my %defines;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    35
my $defaultns = 'http://www.symbian.org/system-definition';	# needed if no DTD
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    36
my $realloc;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    37
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    38
# need to add options for controlling which metas are filtered out and which are included inline
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    39
GetOptions
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    40
	(
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    41
	'path=s' => $path,
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    42
	 'effective-sysdef=s' => \$realloc
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    43
	);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    44
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    45
# -path specifies the full system-model path to the file which is being processed. 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    46
#	This must be an absolute path if you're processing a root sysdef.
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    47
#	If processing a pkgdef file, you can use "./package_definition.xml" to leave all links relative. Though I can't really see the use case for this.
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    48
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    49
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    50
# if config is not set, no confguration will be done.
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    51
# If it is set, all configuration metadata will be processed and stripped from the output, even if the confguration data is empty
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    52
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    53
 if($path eq '') {$path = '/os/deviceplatformrelease/foundation_system/system_model/system_definition.xml'}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    54
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    55
($#ARGV == -1 ) && &help();
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    56
my $sysdef = &abspath(shift);	# resolve the location of the root sysdef
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    57
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    58
$realloc = $realloc || $sysdef;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    59
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    60
my %unitmap;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    61
my @p1=reverse(split(/[\\\/]/,$path));
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    62
my @p2=reverse(split(/[\\\/]/,$realloc));
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    63
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    64
shift(@p1);shift(@p2); # don't care abt file name
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    65
while(lc($p1[0]) eq lc($p2[0])) {shift(@p1);shift(@p2)}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    66
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    67
$unitmap{join('/',reverse(@p1))} = join("/",reverse(@p2));
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    68
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    69
my @p1=reverse(split(/[\\\/]/,$sysdef));
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    70
my @p2=reverse(split(/[\\\/]/,$realloc));
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    71
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    72
shift(@p1);shift(@p2); # don't care abt file name
319
b085ba15cdaa More error msgs in joining and checklinks. Better support for 3.0.1 in merging and downgrading.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 312
diff changeset
    73
while(lc($p1[0]) eq lc($p2[0]) && scalar(@p1)) {shift(@p1);shift(@p2)}
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    74
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    75
$unitmap{join('/',reverse(@p1))} = join("/",reverse(@p2));
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    76
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    77
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    78
# rootmap is a mapping from the filesystem to the paths in the doc
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    79
my %rootmap = &rootMap($path,$sysdef);	
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    80
my %nsmap;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    81
my %urimap;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    82
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    83
my $parser = new XML::DOM::Parser;
312
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
    84
my   $sysdefdoc;
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
    85
eval {
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
    86
	$sysdefdoc = $parser->parsefile ($sysdef);
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
    87
};
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
    88
if(!$sysdefdoc) {
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
    89
	die "ERROR: could not open $sysdef\n";
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
    90
}
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
    91
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    92
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    93
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    94
my $maxschema = $sysdefdoc->getDocumentElement()->getAttribute('schema');	# don't check value, just store it.
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    95
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    96
my $docroot =  $sysdefdoc->getDocumentElement;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    97
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    98
my $ns = $docroot->getAttribute('id-namespace');
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
    99
if(!$ns && $nsmap{''})
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   100
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   101
	$docroot->setAttribute('id-namespace',$nsmap{''});
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   102
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   103
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   104
$docroot->setAttribute('schema',$maxschema);	# output has the largest syntax version of all includes
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   105
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   106
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   107
while(my($pre,$uri) = each(%nsmap))
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   108
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   109
	$pre ne '' || next ;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   110
	$docroot->setAttribute("xmlns:$pre",$uri);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   111
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   112
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   113
&walk($sysdef,$docroot);	# process the XML
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   114
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   115
 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   116
sub abspath
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   117
	{ 	# normalize the path into an absolute one
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   118
	my  ($name,$path) = fileparse($_[0]);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   119
	$path=~tr,\\,/,;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   120
	if( -e $path)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   121
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   122
		return abs_path($path)."/$name";
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   123
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   124
	my @dir = split('/',$_[0]);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   125
	my @new;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   126
	foreach my $d (@dir)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   127
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   128
		if($d eq '.') {next}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   129
		if($d eq '..')
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   130
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   131
			pop(@new);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   132
			next;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   133
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   134
		push(@new,$d)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   135
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   136
	return join('/',@new);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   137
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   138
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   139
sub rootMap {
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   140
	my @pathdirs = split(/\//,$_[0]);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   141
	my @rootdirs = split(/\//,$_[1]);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   142
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   143
	while(lc($rootdirs[$#rootdirs])  eq lc($pathdirs[$#pathdirs])  )
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   144
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   145
		pop(@rootdirs);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   146
		pop(@pathdirs);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   147
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   148
	return (join('/',@rootdirs)  => join('/',@pathdirs) );
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   149
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   150
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   151
sub rootMapMeta {
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   152
	# find all the explict path mapping from the link-mapping metadata
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   153
	my $node = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   154
	foreach my $child (@{$node->getChildNodes})
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   155
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   156
			if ($child->getNodeType==1 && $child->getTagName eq 'map-prefix')
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   157
				{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   158
				my $from = $child->getAttribute('link');
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   159
				my $to = $child->getAttribute('to');		# optional, but blank if not set
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   160
				$rootmap{$from} = $to;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   161
				}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   162
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   163
	# once this is processed we have no more need for it. Remove from output
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   164
	$node->getParentNode->removeChild($node);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   165
	}
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   166
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   167
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   168
sub walk
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   169
	{ 	# walk through the doc, resolving all links
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   170
	my $file = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   171
	my $node = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   172
	my $type = $node->getNodeType;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   173
	if($type!=1) {return}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   174
	my $tag = $node->getTagName;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   175
	if($tag=~/^(layer|package|collection|component)$/ )
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   176
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   177
		my $link= $node->getAttribute('href');
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   178
		if($link)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   179
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   180
			my $file = &resolvePath($file,$link); 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   181
			if(-e $file)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   182
				{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   183
				&combineLink($node,$file);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   184
				}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   185
			else
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   186
				{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   187
				print  "Note: $file not found\n";
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   188
				$node->removeAttribute('href');
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   189
				}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   190
			return;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   191
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   192
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   193
	elsif($tag=~/^(SystemDefinition|systemModel)$/ )
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   194
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   195
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   196
	elsif($tag eq 'unit')
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   197
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   198
		my %at = &atts($node);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   199
		my $pro;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   200
		foreach my $o (keys(%at)) 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   201
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   202
			if($o eq 'proFile' || $o=~/:proFile$/)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   203
				{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   204
				$pro = $at{$o};
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   205
				last;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   206
				}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   207
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   208
		my $filter=$node->getParentNode()->getAttribute('filter');
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   209
		if($filter ne '' && $at{'filter'}) {$filter.=','.$at{'filter'}}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   210
		elsif($at{'filter'}) {$filter=$at{'filter'}}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   211
		if($filter ne '') {$filter="\t($filter)"}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   212
		foreach my $atr ('bldFile','mrp','base')
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   213
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   214
			my $ext;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   215
			my $link= $at{$atr};
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   216
			if($atr eq 'bldFile') {
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   217
				$ext = ($pro ne '') ? "/$pro" : '/bld.inf'
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   218
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   219
			if($link ne '')
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   220
				{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   221
				my $ok = 0;
312
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   222
				my $trylink;
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   223
				if($link && !($link=~/^\//))
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   224
					{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   225
					$link= &abspath(File::Basename::dirname($file)."/$link");
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   226
					$ok = (-e "$link$ext");
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   227
					if(!$ok)	
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   228
						{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   229
						foreach my $a (keys %rootmap)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   230
							{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   231
							$link=~s,^$a,$rootmap{$a},ie;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   232
							# remove leading ./  which is used to indicate that paths should remain relative
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   233
							$link=~s,^\./([^/]),$1,; 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   234
							}
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   235
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   236
						}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   237
					}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   238
				if(!$ok)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   239
					{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   240
					foreach my $a (keys %unitmap) {
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   241
						if($a eq substr($link,0,length($a))) {
312
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   242
							$trylink = $unitmap{$a}.substr($link,length($a));
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   243
							if(-e "$trylink$ext") {
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   244
								$ok=1;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   245
								$link = $trylink;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   246
								last;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   247
							}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   248
						}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   249
					}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   250
					}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   251
				if(!$ok)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   252
					{
312
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   253
					print "Error: $atr not found in ",($trylink ne '') ? $trylink : $link,"$filter\n";
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   254
					}				
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   255
				}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   256
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   257
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   258
	elsif($tag eq 'meta')
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   259
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   260
		my $rel= $node->getAttribute('rel') || 'Generic';
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   261
		my $link= $node->getAttribute('href');
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   262
		$link=~s,^file://(/([a-z]:/))?,$2,; # convert file URI to absolute path
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   263
		if ($link ne '' ) 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   264
			{ 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   265
			if($link=~/^[\/]+:/)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   266
				{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   267
				print  "Note: Remote URL $link not validated\n";
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   268
				next; # do not alter children
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   269
				}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   270
			if(! ($link=~/^\//))
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   271
				{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   272
				$link= &abspath(File::Basename::dirname($file)."/$link");
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   273
				}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   274
			if(! -e $link) 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   275
				{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   276
				if(! -e &realPath($link)) {
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   277
					print  "Warning: Local metadata file not found: $link\n";
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   278
				}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   279
				next; # do not alter children
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   280
				}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   281
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   282
		if($node->getAttribute('rel') eq 'link-mapping')
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   283
			{# need to process this now
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   284
			&rootMapMeta($node);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   285
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   286
		return;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   287
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   288
	else {return}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   289
	my $checkversion=0;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   290
	foreach my $item (@{$node->getChildNodes})
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   291
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   292
		#print $item->getNodeType,"\n";
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   293
		&walk($file,$item);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   294
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   295
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   296
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   297
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   298
	}
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   299
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   300
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   301
sub realPath
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   302
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   303
	my $link = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   304
	foreach my $a (keys %unitmap)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   305
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   306
		if($a eq substr($link,0,length($a))) 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   307
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   308
			my $trylink = $unitmap{$a}.substr($link,length($a));
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   309
			if(-e $trylink) {return $trylink}
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   310
			}
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   311
		}
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   312
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   313
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   314
sub combineLink
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   315
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   316
	# combine data from linked sysdef fragment w/ equivalent element in parent document
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   317
	my $node = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   318
	my $file = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   319
	my $getfromfile = &localfile($file);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   320
	$getfromfile eq '' && return;  # already raised warning, no need to repeat
312
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   321
	my $doc;
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   322
	eval {
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   323
		$doc = $parser->parsefile ($getfromfile);
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   324
	};
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   325
	if(!$doc) {
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   326
		print "ERROR: could not open $getfromfile\n";
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   327
		return;
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   328
	}
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   329
	my $item =&firstElement($doc->getDocumentElement);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   330
	$item || die "badly formatted $file";	
312
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   331
	my @upid = &getNamespaceAndValue($node,'id');
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   332
	my @downid = &getNamespaceAndValue($item,'id');
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   333
	(($upid[0] eq $downid[0]) && ($upid[1] eq $downid[1]))  || die "$upid[1] ($upid[0]) differs from $downid[1] ($downid[0]) ";	# make sure the link is valid
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   334
	&walk($getfromfile,$item);
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   335
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   336
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   337
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   338
sub copyInto
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   339
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   340
	# make a deep copy the node (2nd arg) into the element (1st arg)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   341
	my $parent=shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   342
	my $item = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   343
	my $doc = $parent->getOwnerDocument;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   344
	my $type = $item->getNodeType;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   345
	my $new;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   346
	if($type==1) 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   347
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   348
		$new = $doc->createElement($item->getTagName);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   349
		my %down = &atts($item);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   350
		foreach my $ordered ('id','name','bldFile','mrp','level','levels','introduced','deprecated','filter')
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   351
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   352
			if($down{$ordered})
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   353
				{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   354
				$new->setAttribute($ordered,$down{$ordered});
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   355
				delete $down{$ordered}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   356
				}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   357
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   358
		while(my($a,$b) = each(%down))
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   359
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   360
			$new->setAttribute($a,$b);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   361
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   362
		foreach my $child (@{$item->getChildNodes})
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   363
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   364
			&copyInto($new,$child);
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   365
			}
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   366
		}
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   367
	elsif($type==3) 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   368
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   369
		$new = $doc->createTextNode ($item->getData);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   370
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   371
	elsif($type==8) 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   372
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   373
		$new = $doc->createComment  ($item->getData);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   374
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   375
	if($new)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   376
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   377
		$parent->appendChild($new);
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   378
		}
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   379
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   380
312
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   381
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   382
sub getNamespaceAndValue
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   383
	{
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   384
	my $node = shift;
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   385
	my $attr = shift || 'id';
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   386
	my $id = $node->getAttribute($attr);
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   387
	if($id eq '') {return}
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   388
	my $ns;
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   389
	if($id=~s/^(.*)://)
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   390
		{ # it's got a ns, find out what it is
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   391
		$ns=&getNs($node,$1);
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   392
		}
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   393
	else
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   394
		{
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   395
		$ns = $node->getOwnerDocument->getDocumentElement->getAttribute("id-namespace") ||
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   396
			$defaultns;
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   397
		}
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   398
	return ($ns,$id);;
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   399
	}
9527bd30de64 updates to validation scripts and bugfixes for rootsysdef
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 209
diff changeset
   400
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   401
sub getNs
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   402
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   403
	# find the namespace URI that applies to the specified prefix.
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   404
	my $node = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   405
	my $pre = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   406
	my $uri = $node->getAttribute("xmlns:$pre");
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   407
	if($uri) {return $uri}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   408
	my $parent = $node->getParentNode;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   409
	if($parent && $parent->getNodeType==1)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   410
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   411
		return getNs($parent,$pre);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   412
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   413
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   414
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   415
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   416
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   417
sub firstElement {
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   418
	# return the first element in this node
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   419
	my $node = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   420
	foreach my $item (@{$node->getChildNodes}) {
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   421
		if($item->getNodeType==1) {return $item}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   422
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   423
}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   424
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   425
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   426
sub atts {
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   427
	# return a hash of all attribtues defined for this element
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   428
	my $node = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   429
	my %at = $node->getAttributes;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   430
	my %list;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   431
	foreach my $a (keys %{$node->getAttributes}) 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   432
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   433
		if($a ne '')
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   434
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   435
			$list{$a} = $node->getAttribute ($a);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   436
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   437
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   438
	return %list;
151
84b123918d3f Added latest version of sysdeftools. See readme.txt for details on content.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   439
}
209
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   440
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   441
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   442
sub ns 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   443
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   444
	# return a hash of ns prefix and uri -- the xmlns: part is stripped off
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   445
	my $node = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   446
	my %list;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   447
	foreach my $a (keys %{$node->getAttributes}) 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   448
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   449
		my $pre = $a;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   450
		if($pre=~s/^xmlns://)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   451
			{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   452
			$list{$pre} = $node->getAttribute ($a);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   453
			}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   454
		}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   455
	return %list;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   456
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   457
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   458
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   459
sub resolvePath
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   460
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   461
	# return full path to 2nd arg relative to first (path or absolute URI)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   462
	my $base = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   463
	my $path = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   464
	if($path=~m,^/,) {return $path } # path is absolute, but has no drive. Let OS deal with it.
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   465
	if($path=~s,^file:///([a-zA-Z]:/),$1,) {return $path } # file URI with drive letter
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   466
	if($path=~m,^file://,) {return $path } # file URI with no drive letter (unit-style). Just pass on as is with leading / and let OS deal with it
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   467
	if($path=~m,^[a-z0-9][a-z0-9]+:,i) {return $path } # absolute URI -- no idea how to handle, so just return
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   468
	return &abspath(File::Basename::dirname($base)."/$path");
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   469
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   470
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   471
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   472
sub resolveURI
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   473
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   474
	# return full path to 2nd arg relative to first (path or absolute URI)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   475
	my $base = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   476
	my $path = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   477
	if($path=~m,[a-z0-9][a-z0-9]+:,i) {return $path } # absolute URI -- just return
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   478
	if($path=~m,^/,) {return $path } # path is absolute, but has no drive. Let OS deal with it.
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   479
	return &abspath(File::Basename::dirname($base)."/$path");
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   480
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   481
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   482
sub localfile
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   483
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   484
	my $file = shift;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   485
	if($file=~s,file:///([a-zA-Z]:/),$1,) {return $file } # file URI with drive letter
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   486
	if($file=~m,file://,) {return $file } # file URI with no drive letter (unit-style). Just pass on as is with leading / and let OS deal with it
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   487
	if($file=~m,^([a-z0-9][a-z0-9]+):,i)
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   488
		{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   489
		print  "ERROR: $1 scheme not supported\n";
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   490
		return;  # return empty string if not supported.
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   491
		} 
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   492
	return $file
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   493
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   494
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   495
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   496
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   497
	
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   498
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   499
sub help
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   500
	{
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   501
	my $name= $0; $name=~s,^.*[\\/],,;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   502
my $text;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   503
format STDERR =
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   504
 ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   505
  $text,
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   506
     ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   507
    $text
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   508
.
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   509
print STDERR "usage: $name  [options...] sysdef\n  valid options are:\n\n";
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   510
	foreach (
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   511
		"-path [sm-path]\tspecifies the full system-model path to the file which is being processed. By default this is  \"/os/deviceplatformrelease/foundation_system/system_model/system_definition.xml\"",
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   512
			"   This must be an absolute path if you're processing a root sysdef.",
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   513
			"   If processing a pkgdef file, you can use \"./package_definition.xml\" to leave all links relative.",
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   514
		"effective-sysdef [local-file]\tspecifies another local filesystem location the sysdef should be considered when resolving linked metas and unit paths, but not system model item hrefs. This is mainly used for testing system-wide changes to pkgdefs since it allows the pkgdefs to exist in a separate location to the rest of the codeline"
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   515
		) {
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   516
		$text = $_;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   517
		write STDERR;
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   518
		print STDERR "\n";
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   519
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   520
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   521
	exit(1);
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   522
	}
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   523
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   524
af20ebf91ca6 sysmodelgen bugfix when drawing collections next to nested packages. Major revision to validation script checklinks.pl (it's now reliable). joinsysdef.pl now reports errors on duplicate IDs.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents: 151
diff changeset
   525