Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67053 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47757 invoked from network); 11 Apr 2013 17:51:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Apr 2013 17:51:31 -0000 Authentication-Results: pb1.pair.com header.from=chrisw@aquacool.ltd.uk; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=chrisw@aquacool.ltd.uk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain aquacool.ltd.uk designates 77.107.181.84 as permitted sender) X-PHP-List-Original-Sender: chrisw@aquacool.ltd.uk X-Host-Fingerprint: 77.107.181.84 stockport.aquacool.ltd.uk Received: from [77.107.181.84] ([77.107.181.84:26246] helo=stockport.aquacool.ltd.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/D1-36029-F18F6615 for ; Thu, 11 Apr 2013 13:51:30 -0400 Received: from DC01.aquacool.local ([fe80::9298:e041:a36d:d691]) by DC01.aquacool.local ([fe80::9298:e041:a36d:d691%11]) with mapi id 14.01.0438.000; Thu, 11 Apr 2013 18:51:24 +0100 To: PHP Internals Thread-Topic: [PATCH] Add schema default/fixed value support in DOM Thread-Index: Ac423S1LCj96qpZyTTexEPmtr7S3rQ== Date: Thu, 11 Apr 2013 17:51:23 +0000 Message-ID: <075AE850888292488D400D9632DFE6E102405BCC@DC01.aquacool.local> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.63.150] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [PATCH] Add schema default/fixed value support in DOM From: chrisw@aquacool.ltd.uk (Chris Wright) Good morning/afternoon/evening list I have created a patch to the libxml/DOM extensions to expose the functiona= lity for creating default/fixed values from the XSD schema when validating a document. I have= created a PR on GitHub which can be viewed here: https://github.com/php/php-src/pull/325 The patch adds a second argument to DOMDocument::schemaValidate() and DOMDocument::schemaValidateSource(), and integer designed to be a bitmask o= f flags. It also adds a new constant, LIBXML_SCHEMA_CREATE. The default behaviour is backwar= ds compatible (i.e. it doesn't do anything unless you pass the flag). The patch has been built and tested successfully with the current 5.5 branc= h sources, and should backport nicely to 5.4. The patch requires libxml 2.6.14 to work, an= d this has been accounted for. Let me know what you think. Best Regards Chris Wright (DaveRandom)