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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
21 - 13 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 20:01:31 2024 UTC