Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3362 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18721 invoked from network); 11 Jul 2003 11:45:50 -0000 Received: from unknown (HELO phoebe.host4u.net) (209.150.128.26) by pb1.pair.com with SMTP; 11 Jul 2003 11:45:50 -0000 Received: from ctd01 (dsta-aa203.pivot.net [66.186.171.203]) by phoebe.host4u.net (8.11.6/8.11.6) with SMTP id h6BBjhg14970; Fri, 11 Jul 2003 06:45:43 -0500 Message-ID: <015401c347a2$d8b59a00$06dea8c0@cyberware.local> To: "John Huntjens" , References: Date: Fri, 11 Jul 2003 07:52:03 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: Re: [PHP-DEV] [PATCH] ext. dom php_dom.c From: rrichards@ctindustries.net ("Rob Richards") From: John Huntjens > When running the test script, in the entitys get not expanded. > But the standard > http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-D > OMConfiguration > says about this: DOMConfiguration has not been implemented at the moment as it is level 3 spec, so opted to just extend the specs, at least for now, as it is much more usable for the user. Concentration has been to at least get things up to level 2 working while some level 3 functionality has been added. Grab the latest code from cvs (added yesterday). New properties were added to the domDocument. (They are all booleans). validateOnParse - default FALSE (will load and validate against DTD) resolveExternals - default FALSE (will load the DTD without performaing validation) preserveWhiteSpace - default TRUE substituteEntities - default FALSE Your code would look like the following: $dom = new domDocument(); $dom->resolveExternals = TRUE; $dom->substituteEntities = TRUE; $dom->load('test.xml'); print $dom->savexml(); Note: these properties have not yet been worked into the save methods yet, only the load methods. Also, use of libxml globals i.e. xmlSubstituteEntitiesDefault(1); - very bad thing especially with multiple extensions using libxml. Rob