php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32766 Error on schemaValidate();
Submitted: 2005-04-19 14:08 UTC Modified: 2005-04-27 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: vld3 at rambler dot ru Assigned:
Status: No Feedback Package: DOM XML related
PHP Version: 5CVS-2005-04-19 (dev) OS: win/xp
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-04-19 14:08 UTC] vld3 at rambler dot ru
Description:
------------
this is fragment 'myschema.xsd':
__________________________________________________________
<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:17 UTC] chregu@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

We need a selfrunning example, not just some fragment code..

And it's most likely not a PHP bug, but (assuming your XSD is correct) a libxml2 bug. Please try with the latest libxml2 library and with the standalone tool xmllint from the libxml2 distribution. If both do the correct thing, it's maybe a PHP bug, if libxml2 reports the same error, it's nothing we can do and you have to complain to the libxml2 authors.
 [2005-04-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Aug 23 14:01:27 2019 UTC