Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45663 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38439 invoked from network); 5 Oct 2009 16:11:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Oct 2009 16:11:21 -0000 Authentication-Results: pb1.pair.com header.from=israelekpo@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=israelekpo@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.214 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: israelekpo@gmail.com X-Host-Fingerprint: 209.85.219.214 mail-ew0-f214.google.com Received: from [209.85.219.214] ([209.85.219.214:60310] helo=mail-ew0-f214.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 11/1A-21466-7AA1ACA4 for ; Mon, 05 Oct 2009 12:11:20 -0400 Received: by ewy10 with SMTP id 10so2706794ewy.33 for ; Mon, 05 Oct 2009 09:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=ylkajH1OLaPkO/1Jc7msEUJq19JfaljSkZlHsGL97/Y=; b=Wbp/fAqnwcRJJUvwNn9qe7NyoML6MbwKDSE+OO7urBLMR+RCHoGKRQjMkswm1xJ8Do 4Yrq2Ns3E366vOVwAv6WxWt6TtSvm0GX21C+jHTIB+A4ejb84lAqYwJVjuecxjAuyHRV kTUxtoSIYG6R55PPv4nKxSYkPiEu+rc8iGAy4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=rFhoTXSTGGgThAHTFZwjbZwTCyLIk4xCmCd/TQL3+J/Tp0ZIgI40i8MGckDtAm55NP VflAxoYYtvKXJfJgoW+vTesdoFo74TgHeJX5c+1/EKOA+uxx3wqPSFIS1PIQnmYCwwVb LxvPZd5v3AxxKnAHfuYRxEUWySMSSynAT4QBQ= MIME-Version: 1.0 Received: by 10.216.1.11 with SMTP id 11mr42464wec.147.1254759077176; Mon, 05 Oct 2009 09:11:17 -0700 (PDT) Date: Mon, 5 Oct 2009 12:11:17 -0400 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=0016364d215f12e7f50475325de7 Subject: Bug #49325 Error in domdocument->schemaValidate From: israelekpo@gmail.com (Israel Ekpo) --0016364d215f12e7f50475325de7 Content-Type: text/plain; charset=UTF-8 This was actually not a bug with the PHP code. The error was in the instance XML document. I just closed the bug. The contents of the element node did not conform to what is specified in the XSD. After adjusting the contents of the instance XML document to conform to the specifications of the XSD document, it worked as expected. The original file is here : http://israelekpo.com/php_bugs/NFe/4309080311661100019855001000000001070 0000127.xml The corrected version is here : http://israelekpo.com/php_bugs/NFe/4309080311661100019855001000000001070 0000127.correct.xml PHP Code to verify success : http://israelekpo.com/php_bugs/NFe/bug_49325.phps load('43090803116611000198550010000000010700000127.correct.xml'); $tempDom = new DOMDocument(); $tempDom->loadXML(utf8_encode($xml->saveXML())); if ($tempDom->schemaValidate('nfe_v1.10.xsd')) { echo "ok"; } else { echo "erro"; } ?> Expected result: ---------------- ok Actual result: -------------- ok -- "Good Enough" is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once. --0016364d215f12e7f50475325de7--