#44436 [NEW]: XML schema validation failing for SMIL language
| From: | denis at edistar dot com | Date: | Fri, 14 Mar 2008 13:52:11 +0000 |
| Subject: | #44436 [NEW]: XML schema validation failing for SMIL language | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-123317@lists.php.net to get a copy of this message | ||
From: denis at edistar dot com
Operating system: Linux
PHP version: 5.2.5
PHP Bug Type: DOM XML related
Bug description: XML schema validation failing for SMIL language
Description:
------------
I'm trying to validate a SMIL document using DOMDocument and the official
w3c schema.
The validation fails throwing several warnings.
Reproduce code:
---------------
<?
$smil = "<smil xmlns=\"http://www.w3.org/2001/SMIL20/Language\">
<head>
<layout>
<region id=\"schermo\" width=\"100%\" height=\"100%\"
left=\"0\"
top=\"0\" />
</layout>
</head>
<body>
<par>
<img src=\"cid:star1.jpg\" region=\"schermo\" />
</par>
<par>
<text src=\"cid:testo\" region=\"schermo\" />
</par>
</body>
</smil>";
$docSmil = new DOMDocument();
if (! $docSmil->loadXML($smil, LIBXML_NOCDATA)) {
throw new Exception("The SMIL file is not a valid xml document");
}
if (!
$docSmil->schemaValidate('http://www.w3.org/2001/SMIL20/smil20.xsd'))
{
throw new Exception("IThe SMIL file is not a valid SMIL
document");
}
echo "OK\n";
?>
Expected result:
----------------
OK
Actual result:
--------------
Warning: DOMDocument::schemaValidate(): Element
'{http://www.w3.org/2001/XMLSchema}element',
attribute 'type': References
from this schema to components in the namespace
'http://www.w3.org/2001/SMIL20/Language'
are not allowed, since not
indicated by an import statement. in /tmp/test.php on line 25
Warning: DOMDocument::schemaValidate(): Element
'{http://www.w3.org/2001/XMLSchema}element',
attribute 'type': References
from this schema to components in the namespace
'http://www.w3.org/2001/SMIL20/Language'
are not allowed, since not
indicated by an import statement. in /tmp/test.php on line 25
Warning: DOMDocument::schemaValidate(): Element
'{http://www.w3.org/2001/XMLSchema}element',
attribute 'type': References
from this schema to components in the namespace
'http://www.w3.org/2001/SMIL20/Language'
are not allowed, since not
indicated by an import statement. in /tmp/test.php on line 25
Warning: DOMDocument::schemaValidate(): Element
'{http://www.w3.org/2001/XMLSchema}element',
attribute 'type': References
from this schema to components in the namespace
'http://www.w3.org/2001/SMIL20/Language'
are not allowed, since not
indicated by an import statement. in /tmp/test.php on line 25
Warning: DOMDocument::schemaValidate(): Element
'{http://www.w3.org/2001/XMLSchema}element',
attribute 'type': References
from this schema to components in the namespace
'http://www.w3.org/2001/SMIL20/Language'
are not allowed, since not
indicated by an import statement. in /tmp/test.php on line 25
Warning: DOMDocument::schemaValidate(): Invalid Schema in /tmp/test.php on
line 25
Fatal error: Uncaught exception 'Exception' with message 'IThe SMIL file
is not a valid SMIL document' in /tmp/test.php:26
Stack trace:
#0 {main}
thrown in /tmp/test.php on line 26
--
Edit bug report at http://bugs.php.net/?id=44436&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44436&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44436&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44436&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44436&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44436&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44436&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44436&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44436&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44436&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44436&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44436&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44436&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44436&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44436&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44436&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44436&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44436&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44436&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44436&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44436&r=mysqlcfg