PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » XML » XML_DTD » Bug #5561

Doesn't handle more than 1000 lines of XML

Details

Submitted2005-09-29 14:00 UTC
Fromsebastian_wilczynski at o2 dot pl
StatusNo Feedback
PackageXML_DTD
PHP Version4.4.0
OSWin XP
Roadmaps(Not assigned)

Comments

[2005-09-29 14:00 UTC] sebastian_wilczynski at o2 dot pl

Description:
------------
When I put XML to validate that have more than 1000 lines i get "Document contains no data" message from Mozilla FF. I analysed the code and found that this regex can not be executed when I have over 2000 lines XML:

preg_match('/^'.$regex.'$/', $children_list)

in this part of the code

// Validate the order of the children
if (!$was_error && count($dtd_children)) {
$children_list = implode(',', $children);
$regex = $this->dtd->getPcreRegex($name);
if (!preg_match('/^'.$regex.'$/', $children_list)) {
$dtd_regex = $this->dtd->getDTDRegex($name);
$this->_errors("In element <$name> the children list found:\n'$children_list', ".
"does not conform the DTD definition: '$dtd_regex'", $lineno);
}
}