mirror of
https://github.com/php/php-src.git
synced 2024-12-11 10:54:47 +08:00
24 lines
468 B
PHP
24 lines
468 B
PHP
--TEST--
|
|
DomDocument::schemaValidate() - Don't add missing attribute default values from schema
|
|
--CREDITS--
|
|
Chris Wright <info@daverandom.com>
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$doc = new DOMDocument;
|
|
|
|
$doc->load(__DIR__."/book-attr.xml");
|
|
|
|
$doc->schemaValidate(__DIR__."/book.xsd");
|
|
|
|
foreach ($doc->getElementsByTagName('book') as $book) {
|
|
var_dump($book->getAttribute('is-hardback'));
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(0) ""
|
|
string(4) "true"
|