From fff1bbcfaac03a4791c4465f8f8ae6dc6677bed3 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Tue, 2 Jul 2013 11:44:42 +0200 Subject: [PATCH] added description to TrbNetSetup --- xml-db/database/TrbNet.xml | 15 ++++++++------- xml-db/schema/TrbNetSetup.xsd | 1 + xml-db/setup/trb-setup-default.xml | 7 +++++-- xml-db/xml-db.pl | 3 ++- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/xml-db/database/TrbNet.xml b/xml-db/database/TrbNet.xml index 2c2f28b..eed0a4e 100644 --- a/xml-db/database/TrbNet.xml +++ b/xml-db/database/TrbNet.xml @@ -7,12 +7,13 @@ Common Registers on allmost all endpoints - - - Common Status Register 0 - - Board temperature - - + + + Common Status Register 0 + + Board temperature + + + diff --git a/xml-db/schema/TrbNetSetup.xsd b/xml-db/schema/TrbNetSetup.xsd index 43ceac7..c947792 100644 --- a/xml-db/schema/TrbNetSetup.xsd +++ b/xml-db/schema/TrbNetSetup.xsd @@ -8,6 +8,7 @@ + diff --git a/xml-db/setup/trb-setup-default.xml b/xml-db/setup/trb-setup-default.xml index eed3e98..37e459e 100644 --- a/xml-db/setup/trb-setup-default.xml +++ b/xml-db/setup/trb-setup-default.xml @@ -1,10 +1,13 @@ + +A hypothetic TRB set-up that due to some strange coincidence exists in Mainz. + @@ -14,7 +17,7 @@ address, or sometimes it specifies the chain number of the external PaDiWa frontend --> - + diff --git a/xml-db/xml-db.pl b/xml-db/xml-db.pl index 54af587..4822072 100755 --- a/xml-db/xml-db.pl +++ b/xml-db/xml-db.pl @@ -149,7 +149,7 @@ sub EvaluateTrbNode($$$) { # and we can check some more required fields foreach my $n ($entity->findnodes('//field | //register | //memory | //fifo | //group')) { if ($n->nodeName eq 'field') { - PrintMessage($n, 'Fatal Error: "start" attribute is required', 1) unless exists $n->{'start'}; + PrintMessage($n, 'Fatal Error: "start" attribute is required', 0) unless exists $n->{'start'}; } else { PrintMessage($n, 'Fatal Error: "address" attribute is required', 1) unless exists $n->{'address'}; } @@ -337,6 +337,7 @@ sub ValidateXML($$) { my $doc = shift; my $schemas = shift; my $xsd_file = $doc->getDocumentElement->getAttribute('xsi:noNamespaceSchemaLocation'); + # Strip filename from path to select proper schema ($xsd_file) = $xsd_file =~ m%.*/([^/]*)$%; die "Schema $xsd_file not found to validate <$_>" unless defined $schemas->{$xsd_file}; $schemas->{$xsd_file}->validate($doc); -- 2.43.0