1--TEST--
2DomDocument::schemaValidateSource() - 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(__DIR__."/book-attr.xml");
13
14$xsd = file_get_contents(__DIR__."/book.xsd");
15
16$doc->schemaValidateSource($xsd, LIBXML_SCHEMA_CREATE);
17
18foreach ($doc->getElementsByTagName('book') as $book) {
19    var_dump($book->getAttribute('is-hardback'));
20}
21
22?>
23--EXPECT--
24string(5) "false"
25string(4) "true"
26