Added support for adding fixed/default values during XSD validation in the DOM extension.
This patch adds a second (optional) $flags argument to DOMDocument::schemaValidate() and DOMDocument::schemaValidateSource(), which is a bitmask of libxml schema validation context options. It also defines an additional PHP constant, LIBXML_SCHEMA_CREATE, corresponding to libxml's XML_SCHEMA_VAL_VC_I_CREATE, which is currently the only valid flag that can be passed. When passed, the schema validation procedure will add default values from the schema when they are unspecified in the document.
The default value for the optional $flags parameter is 0, which results in the current behaviour - hence merging this feature does not cause a BC-break.
See http://stackoverflow.com/q/15948847/889949 for more information.
This is pretty nice. I hope I get the time at the weekend to compile PHP 5.5 and test this. I'd say you can squash the four commits into one to polish this a bit.
Add schema default/fixed value support
Added support for adding fixed/default values during XSD validation
and added/updated associated tests
@hakre Squashed for your compiling pleasure. Also note that this should backport nicely to 5.4 and even 5.3 if you really want. The only stipulation is that you compile against libxml >=2.6.14.