From 3fc7344460387dd9ada0a6f9fe4bcdaa5633c715 Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Mon, 1 Jul 2013 08:39:13 +0200 Subject: [PATCH] Schema for trb-setup.xml completed based on TrbNetCommon. It's hopefully not too complex now. --- xml-db/database/TrbNetCommon.xsd | 89 ++++++++++++++++++-------------- xml-db/database/TrbNetEntity.xsd | 42 +++++++-------- xml-db/database/TrbNetSetup.xsd | 66 +++++++++++++++++++++-- xml-db/xml-db.pl | 12 +++-- 4 files changed, 141 insertions(+), 68 deletions(-) diff --git a/xml-db/database/TrbNetCommon.xsd b/xml-db/database/TrbNetCommon.xsd index e195800..327dc65 100644 --- a/xml-db/database/TrbNetCommon.xsd +++ b/xml-db/database/TrbNetCommon.xsd @@ -116,47 +116,56 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -164,7 +173,7 @@ - + diff --git a/xml-db/database/TrbNetEntity.xsd b/xml-db/database/TrbNetEntity.xsd index 25ba769..0162560 100644 --- a/xml-db/database/TrbNetEntity.xsd +++ b/xml-db/database/TrbNetEntity.xsd @@ -26,7 +26,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -81,30 +81,28 @@ + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/xml-db/database/TrbNetSetup.xsd b/xml-db/database/TrbNetSetup.xsd index ed72878..d5716e1 100644 --- a/xml-db/database/TrbNetSetup.xsd +++ b/xml-db/database/TrbNetSetup.xsd @@ -23,12 +23,72 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - + diff --git a/xml-db/xml-db.pl b/xml-db/xml-db.pl index 271846e..aac9e0a 100755 --- a/xml-db/xml-db.pl +++ b/xml-db/xml-db.pl @@ -42,6 +42,10 @@ sub Main { # load the unmerged database and the provided files my ($db,$files) = &LoadDBAndFiles; + foreach my $file (keys %$files) { + print "Working on $file...\n" if $verbose; + + } # testing... #DumpDatabase($db); @@ -57,11 +61,11 @@ sub DumpDatabase($) { my $db = shift; foreach my $file (keys %$db) { print "Dumping $file...\n"; - DumpDatabaseFile($db->{$file}); + DumpDocument($db->{$file}); } } -sub DumpDatabaseFile($) { +sub DumpDocument($) { my $doc = shift; #my $doc = $db->{'testing.xml'}; #my $doc = $db->{'jtag_registers_SPEC.xml'}; @@ -93,7 +97,9 @@ sub DumpDatabaseFile($) { printf("%04x:%02d:%02d %s/%s\n", $address, $field->getAttribute('start'), $field->getAttribute('size') || 1, - $name, $field->getAttribute('name')); + $name, $field->getAttribute('name') + ); + #print $field->getAttribute('errorflag') || 'false',"\n"; } } -- 2.43.0