From: Operating system: Linux Ubuntu 10.10 PHP version: Irrelevant Package: *XML functions Bug Type: Bug Bug description:xml_parse() reads illegal start character in id-attribute
Description: ------------ PHP version: PHP 5.3.3-1ubuntu9.3 with Suhosin-Patch (cli) (built: Jan 12 2011 16:08:14) libXML Compiled Version: 2.7.7 libXML Loaded Version: 20707 The following invalid XTM 2.0 document (invalid id attribute) is parsed successfully using xml_parse(): <topicMap xmlns="http://www.topicmaps.org/xtm/" version="2.0"> <topic id="2topic"> </topic> </topicMap> ID is a derived datatype from XML NCName (see http://www.w3.org/TR/xmlschema-2/#NCName). NCNames must not start with [0-9]. NameStartChar is defined as: NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] (see http://www.w3.org/TR/xml11/#sec-common-syn) Test script: --------------- xml_parse() is wrapped in http://quaaxtm.svn.sourceforge.net/viewvc/quaaxtm/trunk/lib/quaaxtmio/src/in/XTM201TopicMapReader.class.php?revision=400 Expected result: ---------------- Parsing of <topic id="2topic"> should throw an appropriate XML error, e.g. XML_ERROR_SYNTAX -- Edit bug report at http://bugs.php.net/bug.php?id=53988&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53988&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53988&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53988&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53988&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53988&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53988&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53988&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53988&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53988&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53988&r=support Expected behavior: http://bugs.php.net/fix.php?id=53988&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53988&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53988&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53988&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53988&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53988&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53988&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53988&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53988&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53988&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53988&r=mysqlcfg
