From e7185ca741dea2cb2e4aa2d9b6064931776405de Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Fri, 28 Jun 2013 14:41:13 +0200 Subject: [PATCH] Added comments to schema, fixed its indentation, xml-db.pl checks now validity --- xml-db/database/TrbNet.xsd | 356 ++++++++++++++++++------------------ xml-db/database/testing.xml | 4 +- xml-db/xml-db.pl | 6 +- 3 files changed, 190 insertions(+), 176 deletions(-) diff --git a/xml-db/database/TrbNet.xsd b/xml-db/database/TrbNet.xsd index 6c95a82..d634573 100644 --- a/xml-db/database/TrbNet.xsd +++ b/xml-db/database/TrbNet.xsd @@ -1,184 +1,194 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/xml-db/database/testing.xml b/xml-db/database/testing.xml index 2619fb8..183bf34 100644 --- a/xml-db/database/testing.xml +++ b/xml-db/database/testing.xml @@ -2,7 +2,7 @@ Wait time between write sequence and start signal. diff --git a/xml-db/xml-db.pl b/xml-db/xml-db.pl index abc6cb3..eb10576 100755 --- a/xml-db/xml-db.pl +++ b/xml-db/xml-db.pl @@ -27,10 +27,14 @@ pod2usage(-exitval => 0, -verbose => 2) if $man; print "Database: $db_dir\n" if $verbose; my $doc = XML::LibXML->new->parse_file("$db_dir/testing.xml"); -my $xmlschema = XML::LibXML::Schema->new( location => "$db_dir/TrbNet.xsd" ); +my $xmlschema = XML::LibXML::Schema->new('location' => "$db_dir/". + $doc->getDocumentElement->getAttribute('xsi:noNamespaceSchemaLocation')); $xmlschema->validate($doc); +#print $xsd; + + __END__ =head1 NAME -- 2.43.0