$xpath = new DOMXPath($doc); $nodes = $xpath->query("//family"); $upload_family = $nodes->item(0)->nodeValue; if ($upload_family == $family) { $nodes = $xpath->query("//weight"); foreach ($nodes as $node) { $name = $node->getAttribute('id'); $value = $node->nodeValue; $weights[$name] = $value; } $text = "<div style='texte-align: center; color: red'>" . $weighting['name'] . $msg['s2_loaded'] . "</div><br/>"; } else { $text = "<div style='texte-align: center; color: red'>" . $family . $msg['s2_error1'] . $upload_family . $msg['s2_error2'] . "</div><br/>"; } } $myDoc = new QSOSDocument($repo . $file); $tree = $myDoc->getTree(); $familyname = $myDoc->getkey("qsosappfamily"); echo "<div style='font-weight: bold'>" . $msg['s2_title'] . "<br/><br/></div>\n"; echo $text; echo "<form id='myForm' enctype='multipart/form-data' method='POST' action='set_weighting.php'>\n"; echo "<input type='hidden' name='lang' value='{$lang}'/>\n"; echo "<input type='hidden' name='svg' value='{$svg}'/>\n"; echo "<input type='hidden' name='family' value='{$family}'/>\n"; echo "<input type='hidden' name='new' value='true'/>\n"; echo "<input type='hidden' name='qsosspecificformat' value='{$qsosspecificformat}'/>\n"; echo "<table id='table' style='border-collapse: collapse; font-size: 12pt; table-layout: fixed'>\n"; echo "<tr class='title' style='width: 400px'><td>{$familyname}</td>\n"; echo "<td><div style='width: 60px; text-align: center'>" . $msg['s2_weight'] . "</div></td>\n"; echo "</tr>\n"; showtree($myDoc, $tree, 0, '');
<?php /* Tests of the QSOSDocument class */ include '../libs/QSOSDocument.php'; $d = new QSOSDocument("test-evaluation.qsos"); function out($text) { echo $text . "<br/><br/>"; } out("checkXSD() : " . print_r($d->checkXSD('../xml/xsd/qsos.xsd')));