Index: XmlValidator.php =================================================================== RCS file: /repository/pear/XML_DTD/DTD/XmlValidator.php,v retrieving revision 1.3 diff -u -r1.3 XmlValidator.php --- XmlValidator.php 22 Sep 2003 17:42:04 -0000 1.3 +++ XmlValidator.php 3 Apr 2004 21:50:16 -0000 @@ -147,11 +147,13 @@ } // Search for children names not allowed $was_error = false; + $childIndex = 0; foreach ($children as $child) { if (!in_array($child, $dtd_children)) { - $this->_errors("<$child> not allowed under <$name>", $lineno); + $this->_errors("<$child> not allowed under <$name>", $node->children[$childIndex]->lineno); $was_error = true; } + $childIndex++; } // Validate the order of the children if (!$was_error && count($dtd_children)) {