#44436 [Opn->Bgs]: XML schema validation failing for SMIL language
| From: | rrichards@php.net | Date: | Fri, 14 Mar 2008 15:08:40 +0000 |
| Subject: | #44436 [Opn->Bgs]: XML schema validation failing for SMIL language | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123318@lists.php.net to get a copy of this message | ||
ID: 44436
Updated by: rrichards@php.net
Reported By: denis at edistar dot com
-Status: Open
+Status: Bogus
Bug Type: DOM XML related
Operating System: Linux
PHP Version: 5.2.5
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
This is a libxml2 issue not PHP
Previous Comments:
------------------------------------------------------------------------
[2008-03-14 13:52:10] denis at edistar dot com
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 this bug report at http://bugs.php.net/?id=44436&edit=1