Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16241 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77321 invoked by uid 1010); 13 May 2005 20:13:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 62013 invoked from network); 13 May 2005 19:49:32 -0000 Received: from unknown (HELO omniti.com) (127.0.0.1) by localhost with SMTP; 13 May 2005 19:49:32 -0000 X-Host-Fingerprint: 66.80.117.3 longsword.omniti.com Linux 2.5 (sometimes 2.4) (4) Received: from ([66.80.117.3:41586] helo=mail.omniti.com) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 72/50-36148-CC405824 for ; Fri, 13 May 2005 15:49:32 -0400 DomainKey-Status: good X-DomainKeys: Ecelerity dk_sign implementing draft-delany-domainkeys-base-01 DomainKey-Signature: q=dns; a=rsa-sha1; c=nofws; s=test; d=omniti.com; h=Received:Mime-Version:To:Message-Id:Content-Type:Cc:Subject:From:Date:X-Mailer; b=BjujZDp6AILKUrYs7WpHr5wVNMyMnAmzE6UZABqO+nLjzCf9WWDUG2ufuwXQTxIj BkA19o/E0JWbo0jaENYTRoNeIM/fa9PH2EdY2vIb/y9T80UxJpYiowiA2/xt8RmF Received: from ([201.134.187.252:54935] helo=[172.16.0.9]) by mail.omniti.com (ecelerity HEAD r(4355M)) with SMTP id 69/7F-25344-AD405824 for ; Fri, 13 May 2005 15:49:49 -0400 Mime-Version: 1.0 (Apple Message framework v728) To: PHPdev List Message-ID: <4FFCA3A4-8367-432F-A665-391F804F6C8A@omniti.com> Content-Type: multipart/alternative; boundary=Apple-Mail-1-267602180 Cc: George Schlossnagle Date: Fri, 13 May 2005 15:49:15 -0400 X-Mailer: Apple Mail (2.728) Subject: annoying DOM limitation From: george@omniti.com (George Schlossnagle) --Apple-Mail-1-267602180 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed While hacking on a PHPDoc -> WSDL generator, I ran into an annoying limitation in the dom extension: you can't add a namespace to a dom document unless you have an element in that namespace. Why might you want to do this? Well, a common thing is to have your xml-schema types to be specified as attribute values, i.e. for this to work I need xsd to be an alias for http://www.w3.org/2001/ XMLSchema. To work around this, I added a DomElement::addNS($uri, $alias) method to Dom. Adding the namespace 'manually' as an attribute on an element does not work. I know this isn't part of the Dom spec, but it's incredibly useful. Does anyone (Rob, Chegru) mind me adding it to HEAD? George George Schlossnagle -- Vice President of Engineering -- OmniTI Computer Consulting -- http://www.omniti.com --Apple-Mail-1-267602180--