|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-10-10 08:43 UTC] richard at organicdata dot co dot za
Description: ------------ I'm using the Zend Server 5.5 Community Edition stack on Centos 5 I'm not sure where exactly this should be posted but I believe it is a bug in the DOMDocument::schemaValidate method. I am trying to use DOMDocument::schemaValidate to validate a word docx document using the ECMA-376 3rd edition Part 4 transitional schema http://www.ecma-international.org/publi ... ma-376.htm I have Word docx document validation working 100% with these schema files using XMLspy 2007 and XMspy 2011 and I thought it would be a simple matter to achieve the same via PHP. After making a few extremely minor schema amendments to fix few things about the schema that PHP doesn't appear to like (eg. I needed to set a local location for xml.xsd to ensure that xml:space was properly interpreted), I have reached a point where DOMDocument::schemaValidate simply does nothing - it doesn't succeed, it doesn't fail and it doesn't throw error. For a simple illustration please see the following code - no php errors are thrown and neither of the 2 print statements are executed - essentially the application appears to "hang" I have also included libxml_use_internal_errors(true) related code and no errors are provided back. Finally I have searched the web thoroughly to see whether anyone has experienced the same / similar problem however I am unable to find anything tangible. Test script: --------------- $xsdFile = "wml.xsd"; $tst = new DOMDocument('1.0','UTF-8'); // create a new DOM document $tst->preserveWhiteSpace = true; $tst->load(G_DEBUGDATA_PATH . "docx_document.xml"); if (!$tst->schemaValidate($xsdFile)) { print "Failed"; } else { // schema validated successfully print "succeeded"; } Expected result: ---------------- Either success or failure - and some form of error message provided Actual result: -------------- nothing at all PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 08:00:01 2025 UTC |
hi i'm out of ideas - I htmlencoded the example xml file and submitted and I get this message ERROR: Please do not SPAM our bug system. please can someone help me with ideas as to how to submit the xml file requested thanks!