cvs: pear /XML_DTD DTD.php
| From: | Mika Tuupola | Date: | Wed, 18 Feb 2004 14:34:19 +0000 |
| Subject: | cvs: pear /XML_DTD DTD.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-16642@lists.php.net to get a copy of this message | ||
tuupola Wed Feb 18 09:34:19 2004 EDT
Modified files:
/pear/XML_DTD DTD.php
Log:
* fix bug #168
# No response from the developers for a week so committing it myself.
http://cvs.php.net/diff.php/pear/XML_DTD/DTD.php?r1=1.4&r2=1.5&ty=u
Index: pear/XML_DTD/DTD.php
diff -u pear/XML_DTD/DTD.php:1.4 pear/XML_DTD/DTD.php:1.5
--- pear/XML_DTD/DTD.php:1.4 Fri Sep 19 14:08:03 2003
+++ pear/XML_DTD/DTD.php Wed Feb 18 09:34:18 2004
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: DTD.php,v 1.4 2003/09/19 18:08:03 cox Exp $
+// $Id: DTD.php,v 1.5 2004/02/18 14:34:18 tuupola Exp $
//
/*
@@ -46,7 +46,7 @@
* @category XML
* @author Tomas V.V.Cox <cox@idecnet.com>
* @copyright Copyright (c) 2003
- * @version $Id: DTD.php,v 1.4 2003/09/19 18:08:03 cox Exp $
+ * @version $Id: DTD.php,v 1.5 2004/02/18 14:34:18 tuupola Exp $
* @access public
*/
class XML_DTD_Parser
@@ -191,7 +191,7 @@
} else {
$content = null;
do {
- $children = preg_split('/([^#a-zA-Z0-9.-]+)/', $ch, -1,
PREG_SPLIT_NO_EMPTY);
+ $children = preg_split('/([^#a-zA-Z0-9_.-]+)/', $ch, -1,
PREG_SPLIT_NO_EMPTY);
if (in_array('#PCDATA', $children)) {
$content = '#PCDATA';
if (count($children) == 1) {
@@ -202,7 +202,7 @@
$this->dtd['elements'][$elem_name]['child_validation_dtd_regex'] = $ch;
// Convert the DTD regex language into PCRE regex format
$reg = str_replace(',', ',?', $ch);
- $reg = preg_replace('/([#a-zA-Z0-9.-]+)/', '(,?\\0)', $reg);
+ $reg = preg_replace('/([#a-zA-Z0-9_.-]+)/', '(,?\\0)', $reg);
$this->dtd['elements'][$elem_name]['child_validation_pcre_regex'] = $reg;
} while (false);
}
@@ -282,7 +282,7 @@
* @category XML
* @author Tomas V.V.Cox <cox@idecnet.com>
* @copyright Copyright (c) 2003
- * @version $Id: DTD.php,v 1.4 2003/09/19 18:08:03 cox Exp $
+ * @version $Id: DTD.php,v 1.5 2004/02/18 14:34:18 tuupola Exp $
* @access public
*/
class XML_DTD_Tree