1--TEST--
2DomDocument::schemaValidate() - Add missing attribute default values from schema
3--CREDITS--
4Chris Wright <info@daverandom.com>
5--SKIPIF--
6<?php require_once('skipif.inc'); ?>
7--FILE--
8<?php
9
10$doc = new DOMDocument;
11
12$doc->load(dirname(__FILE__)."/book-attr.xml");
13
14$doc->schemaValidate(dirname(__FILE__)."/book.xsd", LIBXML_SCHEMA_CREATE);
15
16foreach ($doc->getElementsByTagName('book') as $book) {
17    var_dump($book->getAttribute('is-hardback'));
18}
19
20?>
21--EXPECT--
22string(5) "false"
23string(4) "true"
24