ID: 32760 Updated by: [EMAIL PROTECTED] Reported By: vld3 at rambler dot ru -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: win/xp PHP Version: 5CVS-2005-04-19 (dev) New Comment:
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2005-04-19 14:00:30] vld3 at rambler dot ru Description: ------------ this is fragment 'sampledata.xml': __________________________________________________________ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <xsd:schema targetNamespace="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-03-23T12:23:53" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-03-23T12:23:53" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:attribute name="Год" type="xsd:integer"/> <xsd:attribute name="Наименование_госзаказчика" type="my:requiredString"/> <xsd:attribute name="Год_отчет" type="xsd:integer"/> <xsd:attribute name="Год_оценка" type="xsd:integer"/> <xsd:attribute name="ЕИ" type="my:requiredString"/> <xsd:attribute name="СТ" type="my:requiredString"/> <xsd:element name="Бюджетная_заявка"> <xsd:complexType> <xsd:sequence> <xsd:element ref="my:Продукция_нефтеперерабатывающей_промышленности" minOccurs="0"/> <xsd:element ref="my:Продукция_угольной_промышленности" minOccurs="0"/> </xsd:sequence> <xsd:attribute ref="my:Год"/> <xsd:attribute ref="my:Наименование_госзаказчика"/> <xsd:attribute ref="my:Год_отчет"/> <xsd:attribute ref="my:Год_оценка"/> <xsd:anyAttribute processContents="lax" namespace="http://www.w3.org/XML/1998/namespace" /> _________________________________________________________ error on <xsd:anyAttribute . . . . . . . . . . . . . . Reproduce code: --------------- <?php $dom = new DOMDocument(); //$dom->load('sampledata.xml'); $dom->load('qqqq.xml'); $p = $dom->schemaValidate('myschema.xsd'); if ($p) echo "OK";else echo "ERR"; echo "\n"; ?> Expected result: ---------------- OK Actual result: -------------- Warning: compilation error in c:\ELMARK\XmlXsl.php on line 11 Warning: Schemas: attribute anyattr 9 has no type nor reference in c:\ELMARK\XmlXsl.php on line 11 Warning: Invalid Schema in c:\ELMARK\XmlXsl.php on line 11 ERR ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32760&edit=1