From: Operating system: PHP version: 5.3.6 Package: SimpleXML related Bug Type: Feature/Change Request Bug description:SimpleXML and HTML5 microformat
Description: ------------ We would like to manipulate and genere HTML5 microformat. Parsing a HTML5 microformat with simpleXML is not possible : Some warning are generated and simplexml_load_string function return false. The problem is with the itemscope attribute : It has no value. Our XML is available on this web site : http://schema.org/Person Can you add these manipulations in simpleXML API ? * add attribut without value * parsing XML with attribute without value. Thanks. Test script: --------------- <?php $xml = <<<XML <div itemscope itemtype="http://schema.org/Person"> <span itemprop="name">Jane Doe</span> <img src="janedoe.jpg" itemprop="image" /> <span itemprop="jobTitle">Professor</span> <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <span itemprop="streetAddress"> 20341 Whitworth Institute 405 N. Whitworth </span> <span itemprop="addressLocality">Seattle</span>, <span itemprop="addressRegion">WA</span> <span itemprop="postalCode">98052</span> </div> <span itemprop="telephone">(425) 123-4567</span> <a href="mailto:jane-...@xyz.edu" itemprop="email"> jane-...@xyz.edu</a> Jane's home page: <a href="www.janedoe.com" itemprop="url">janedoe.com</a> Graduate students: <a href="www.xyz.edu/students/alicejones.html" itemprop="colleagues"> Alice Jones</a> <a href="www.xyz.edu/students/bobsmith.html" itemprop="colleagues"> Bob Smith</a> </div> XML; $a = simplexml_load_string($xml); if($a == false) { echo "XML not valid"; } else { echo $a->asXML(); } -- Edit bug report at https://bugs.php.net/bug.php?id=55127&edit=1 -- Try a snapshot (PHP 5.2): https://bugs.php.net/fix.php?id=55127&r=trysnapshot52 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55127&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55127&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55127&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55127&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55127&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55127&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55127&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55127&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55127&r=support Expected behavior: https://bugs.php.net/fix.php?id=55127&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55127&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55127&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55127&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55127&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55127&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55127&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55127&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55127&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55127&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55127&r=mysqlcfg Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55127&r=trysnapshot54