1--TEST-- 2DomDocument::schemaValidateSource() - Don't 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$xsd = file_get_contents(dirname(__FILE__)."/book.xsd"); 15 16$doc->schemaValidateSource($xsd); 17 18foreach ($doc->getElementsByTagName('book') as $book) { 19 var_dump($book->getAttribute('is-hardback')); 20} 21 22?> 23--EXPECT-- 24string(0) "" 25string(4) "true" 26