php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32760 Error on schemaValidate();
Submitted: 2005-04-19 14:00 UTC Modified: 2005-04-19 14:13 UTC
From: vld3 at rambler dot ru Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 5CVS-2005-04-19 (dev) OS: win/xp
Private report: No CVE-ID: None
 [2005-04-19 14:00 UTC] 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 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-19 14:13 UTC] chregu@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 05:01:28 2024 UTC