From: bernardo at datamex dot com dot br Operating system: Freebsd 7 PHP version: 5.2.10 PHP Bug Type: DOM XML related Bug description: Erro in domdocument->schemaValidate
Description: ------------ erros na validação de xsd coisas do tipo Error: Element '{http://www.portalfiscal.inf.br/nfe}IE': [facet 'pattern'] The value 'ISENTO' is not accepted by the pattern '[0-9]{0,14}|ISENTO|PR[0-9]{4,8}'. o php esta em iso-8859-1 o xml esta em utf-8 xsds in http://www.bernardosilva.com.br/NFe.rar xml in http://www.bernardosilva.com.br/43090803116611000198550010000000010700000127.xml Reproduce code: --------------- $xml = new DomDocument(); $xml->load('43090803116611000198550010000000010700000127.xml') $tempDom = new DOMDocument(); $tempDom->loadXML(utf8_encode($xml->saveXML())); if ($tempDom->schemaValidate('nfe_v1.10.xsd')) echo "ok" else echo "erro" Expected result: ---------------- ok Actual result: -------------- erro -- Edit bug report at http://bugs.php.net/?id=49325&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49325&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49325&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49325&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49325&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49325&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49325&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49325&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49325&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49325&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49325&r=support Expected behavior: http://bugs.php.net/fix.php?id=49325&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49325&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49325&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49325&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49325&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49325&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49325&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49325&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49325&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49325&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49325&r=mysqlcfg