Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3361 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98974 invoked from network); 11 Jul 2003 11:20:16 -0000 Received: from unknown (HELO smtpzilla3.xs4all.nl) (194.109.127.139) by pb1.pair.com with SMTP; 11 Jul 2003 11:20:16 -0000 Received: from server.ceres.loc (ceressoft.xs4all.nl [80.126.85.128]) by smtpzilla3.xs4all.nl (8.12.9/8.12.9) with ESMTP id h6BBKFCj073155 for ; Fri, 11 Jul 2003 13:20:16 +0200 (CEST) Received: from pcjohn ([192.168.0.129]) by server.ceres.loc (8.11.6/8.11.6) with SMTP id h6BBKFf19124 for ; Fri, 11 Jul 2003 13:20:15 +0200 To: Date: Fri, 11 Jul 2003 13:20:14 +0200 Message-ID: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: [PATCH] ext. dom php_dom.c From: john@ceressoft.nl ("John Huntjens") Hello list, Version 5.0.0b1 Extension dom File: php_dom.c Test script: $dom = new domDocument(); $dom->load('test.xml'); print $dom->savexml(); test.xml: ]> &sysmenu; test2.xml: test 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: "entities" true [required] Keep EntityReference and Entity nodes in the document. Issue normalizationFeature-9: How does that interact with expand-entity-references? ALH suggests consolidating the two to a single feature called "entity-references" that is used both for load and save. Resolution: Consolidate both features into a single feature called 'entities'. (Telcon 27 Jan 2002). false [required] (default) Remove all EntityReference and Entity nodes from the document, putting the entity expansions directly in their place. Text nodes are into "normal" form. Only EntityReference nodes to non-defined entities are kept in the document. Proposal: change line 542 of php_dom.c from: xmlInitParser(); into: xmlInitParser(); /* http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-D OMConfiguration section entitys: "entities" false [required] (default) Remove all EntityReference and Entity nodes from the document, putting the entity expansions directly in their place. Text nodes are into "normal" form. Only EntityReference nodes to non-defined entities are kept in the document. */ xmlSubstituteEntitiesDefault(1);