Commit Graph

274 Commits

Author SHA1 Message Date
Zeev Suraski
7d04465b74 Fix prototypes 2004-05-31 12:27:49 +00:00
Zeev Suraski
e54165e406 No meaning for unsigned 2004-05-30 17:34:11 +00:00
Rob Richards
edae935c26 namespace/tagname validation fixes (Adam Trachtenberg)
added new test
2004-05-27 11:15:45 +00:00
Andrey Hristov
44de5a0e8e fixing the tests so to work with the new var_dump() (dumping private and
protected member variables)
2004-05-20 21:13:14 +00:00
Rob Richards
9e3956b313 constructors throw DOMException
add DOM_PHP_ERR DomException code
validate tagnames in constructors
use C style comments
update TODO
2004-05-16 10:30:16 +00:00
Ilia Alshanetsky
e81addb5ca C++ comments. 2004-04-29 12:59:26 +00:00
Rob Richards
7b1f927ef5 register_namespace changed to registerNamespace for consistency 2004-04-06 18:26:19 +00:00
Rob Richards
010c340f29 use new style constructors
fix return for nodelist item
2004-03-31 17:18:59 +00:00
Marcus Boerger
904dac52e2 DOM_RET_OBJ for return_value needs to be followed by return 2004-03-29 21:05:16 +00:00
Marcus Boerger
585af2418b Remove debug code 2004-03-29 20:54:46 +00:00
Marcus Boerger
4dc6fe7f62 Fix tests 2004-03-29 20:54:13 +00:00
Ilia Alshanetsky
0d0fffe98b Fixed compiler warnings. 2004-03-29 19:57:51 +00:00
Marcus Boerger
43d3d8a0a4 Fix class names 2004-03-29 19:31:29 +00:00
Stanislav Malyshev
5b0f6b1f34 Update for new read_property API 2004-03-21 18:28:38 +00:00
Marcus Boerger
979ef59b7c Rename hasMore() to valid() as discussed. (Part IV) 2004-03-08 21:15:39 +00:00
Rob Richards
4ce377064a Fix bug #27467: domDocument::load() called from class method crashes
the methods can be called statically only from within classes which
  are not extending DomDocument
2004-03-03 20:59:02 +00:00
Rob Richards
76ee5707f7 Fix bug #27436 dom_import_simplexml innaccurate
extensions register callbacks to export nodes
prevents segfault passing invalid objects to import functions
2004-03-01 12:09:24 +00:00
Rob Richards
081e773f86 add optional third parameter to support namespace in constructor 2004-02-22 13:05:49 +00:00
Rob Richards
7deeb0f96a always return domnodelist unless error 2004-02-18 22:42:30 +00:00
Rob Richards
4051591cfe correct implementation of prefix write property 2004-02-18 20:37:30 +00:00
Rob Richards
43eb077107 add dtor to cleanup iterator related data 2004-02-17 19:57:48 +00:00
Rob Richards
ec2ea131fb implement clone functionality to fix segfault
DomNode->clone() creates new doc proxy if document is cloned
remove printf from xpath
fix remaining invalid object state issues
2004-02-17 11:13:47 +00:00
Rob Richards
602c786aa9 issue warning if object is in invalid state when dealing with properties 2004-02-16 13:06:33 +00:00
Rob Richards
2a32e4328a switch to zend_parse_method_parameters for consistancy
insure object parameters are correct class types
convert zvals to correct type if needed for property writes
fix a few segfaults found while testing
2004-02-15 18:57:10 +00:00
Rob Richards
c3a57206cc allow certain methods to be called statically again:
domdocument (all load methods)
   domimplementation (all methods)
switch to zend_parse_method_parameters for consistancy
insure object parameters are correct class types
convert zvals to correct type if needed for property writes
fix a few segfaults found while testing
2004-02-15 17:07:34 +00:00
Rob Richards
c1418894dd switch to zend_parse_method_parameters for consistancy
insure object parameters are correct class types
convert zvals to correct type if needed for property writes
2004-02-15 14:05:17 +00:00
Rob Richards
a2e1844de9 start of dom update
switch to zend_parse_method_parameters for consistancy
insure object parameters are correct class types
convert zvals to correct type if needed for property writes
2004-02-15 10:54:37 +00:00
Zeev Suraski
30171a7590 zend_default_classes.h -> zend_exceptions.h 2004-02-12 10:43:27 +00:00
Ilia Alshanetsky
91f46b7880 Fixed compile warnings. 2004-02-04 14:15:16 +00:00
Zeev Suraski
8424be849f - Update with new destructor code 2004-02-04 11:14:47 +00:00
Rob Richards
b5e7a6dae0 update test 2004-01-22 22:12:21 +00:00
Rob Richards
7e619b7f5f update constructors so they cant be called statically 2004-01-22 21:16:05 +00:00
Rob Richards
a4815f7c8e Warn when empty string supplied to load methods (by Pierre-Alain)
Fix refcount on xpath iterators
xpath_query should return nodelist even when empty
2004-01-20 11:35:32 +00:00
Marcus Boerger
920358a0cc Fix warning (and possible problem) 2004-01-20 07:27:47 +00:00
Christian Stocker
6b70f9d1b3 Fix leaks in dom_xpath_query (create retval only if requiered) by Pierre-Alain 2004-01-19 21:08:29 +00:00
Christian Stocker
00af01bb94 fixes segfault, if file doesn't exist (by Pierre-Alain) 2004-01-19 20:54:40 +00:00
Christian Stocker
743a830102 - fix for bug #26947 Crash by using DomDocument::getElementById() 2004-01-18 12:56:23 +00:00
foobar
f4983c0d3f - Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5 2004-01-17 13:00:38 +00:00
Rob Richards
38f8ed0e0a fix getElementsByTagName and getElementsByTagNameNS - allow * 2004-01-13 14:13:21 +00:00
Rob Richards
394bf2ba5b XPath query returns nodelist object rather than array 2004-01-10 11:50:25 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Rob Richards
6e65e1d821 Fix bug #26815 (foreach (DOM) childnodes causes error using Xinclude)
update xinclude test
2004-01-07 15:33:25 +00:00
Rob Richards
66c68da22b Fixed bug #26743 (getElementsByTagName doesn't work properly) 2003-12-29 16:44:47 +00:00
Rob Richards
c7e945888b fix libxml mem leak 2003-12-27 12:39:10 +00:00
Rob Richards
84b90f639d Fixed bug #26723 (domNode::appendChild() changes child node namespace)
apply fix to insertBefore and replaceChild
2003-12-27 10:29:52 +00:00
Ilia Alshanetsky
39df1011f1 Compiler warning fixes. 2003-12-23 17:08:44 +00:00
Wez Furlong
3b450ec431 Add dependencies for these extensions 2003-12-22 13:16:43 +00:00
Ilia Alshanetsky
72da689340 Compiler warning fixes. 2003-12-21 18:22:14 +00:00
Rob Richards
d1b8a0f2a9 no longer need to cleanup temp var 2003-12-17 18:59:05 +00:00
Ilia Alshanetsky
bf36e351ba Removed duplicate php_libxml_(init|shutdown) they are already done by
ext/libxml.
2003-12-16 17:14:06 +00:00
Rob Richards
6dfd1c190c use error handling from libxml ext 2003-12-12 13:54:52 +00:00
Dmitry Stogov
70c9d3332a Dir seaparator "\" was removed. 2003-12-11 13:36:42 +00:00
Rob Richards
4756b5e05f fix possible mem leak when element has children 2003-12-09 21:56:42 +00:00
Wez Furlong
a35a82ddcd allow assignment to $node->nodeValue to work for more
objects and in situations where the rvalue is not a string.
(Fixes a segfault in that case)
2003-12-09 20:19:44 +00:00
Rob Richards
3084e72ef1 fix getElementsByTagname iteration 2003-12-08 17:08:10 +00:00
Rob Richards
c821c5b189 export libxml2 and iconv symbols
extensions no longer link against either of those
2003-12-08 12:56:47 +00:00
foobar
2e8b1c01fe revert, not needed 2003-12-07 15:41:50 +00:00
Marcus Boerger
9c8678eb7b Fix enabling shared builds. 2003-12-07 00:21:47 +00:00
Wez Furlong
08218f5082 Tweak xml related build.
Still some warnings for ext/xsl, but I'll leave that to someone else for now.
2003-12-05 21:16:47 +00:00
Christian Stocker
a016546e4c fix test 2003-12-05 14:52:51 +00:00
Rob Richards
198c09f775 fix notations - forgot to create iterator 2003-12-03 21:27:01 +00:00
Wez Furlong
05b9b20ed8 Add new (optional!) win32 build infrastructure.
Will follow up to internals@ shortly.
2003-12-02 23:17:04 +00:00
Rob Richards
6fa6d3c470 check node type for ->attributes and ->childNodes 2003-12-02 15:17:02 +00:00
Christian Stocker
80d552496c Fix Bug, if parser input is not a filename (By Adam) 2003-12-01 08:18:35 +00:00
Rob Richards
2a5092c03a remove call to xmlMemoryDump 2003-11-30 12:30:29 +00:00
Christian Stocker
fbc8f35778 fixed typos 2003-11-30 11:13:00 +00:00
Christian Stocker
8b315dddd4 output of uncaught exception changed 2003-11-30 10:58:18 +00:00
Rob Richards
8293923841 guess this file should be added too :) 2003-11-29 20:41:41 +00:00
Rob Richards
6ac34646ac implement namednodemap and nodelist
fix xsl/dom integration under windows
update tests and examples
2003-11-29 20:40:18 +00:00
Christian Stocker
2ff82ae2ed move some definitions to xml_common.h 2003-11-29 13:00:54 +00:00
Christian Stocker
29a46b2ff6 changing dom_object_get_data to php_dom_object_get_data and PHP_DOM_EXPORT it
(by Rob Richards)
2003-11-28 21:55:59 +00:00
foobar
32b5a41941 - Fixed bug #26072 (--disable-libxml does not work). 2003-11-12 23:42:38 +00:00
Moriyoshi Koizumi
06d541a63a SKIP tests if compress.zlib wrapper is not available. 2003-10-31 16:12:27 +00:00
Christian Stocker
038a7c4831 make test work with libxml2 2.6.x and lower
(I used lowercase html again in the EXPECT part, as this is now the default
behaviour for newer libxml2 releases)
2003-10-30 10:06:00 +00:00
Ilia Alshanetsky
e0a943dcdb Fixed test. 2003-10-29 05:04:40 +00:00
Shane Caraveo
4e283ed686 fix win32 build 2003-10-28 04:21:29 +00:00
Christian Stocker
9e5bc9509e use php_error_docref 2003-10-27 19:52:50 +00:00
Christian Stocker
901153b441 extending of domDocument class test 2003-10-27 17:51:55 +00:00
Christian Stocker
e735e44f52 added html test 2003-10-27 17:36:44 +00:00
Christian Stocker
0d59b3dda6 xinclude test 2003-10-27 15:32:44 +00:00
Christian Stocker
3cd8d4a865 xinclude support readded to ext/dom 2003-10-27 15:32:22 +00:00
Christian Stocker
df7799762a streams test 2003-10-27 15:13:12 +00:00
Christian Stocker
e311179b72 exception/try/catch test 2003-10-27 12:52:37 +00:00
Christian Stocker
a8063d776c interop test 2003-10-27 11:24:30 +00:00
Christian Stocker
eb2104d17c remove unneeded variables 2003-10-27 00:03:28 +00:00
Christian Stocker
e5bd8fdd0d - Make distinction in error-reporting between Warnings and Errors from libxml2
- Use internal error_handlers during html-parsing as well
2003-10-27 00:01:39 +00:00
Rob Richards
207dc90924 add interop with simplexml - dom_import_simplexml
fix cloneNode with elements
2003-10-26 15:57:02 +00:00
Moriyoshi Koizumi
48fbe0af2a Add a test case for getElementsByTagName() / getElementsByTagNameNS() 2003-10-21 02:43:24 +00:00
Rob Richards
44164170f3 implement namespace nodes
fix getElementsByTagName
fixes to attribute namespaces
remove safemode stuff as its handled in streams
2003-10-20 15:50:34 +00:00
Shane Caraveo
052f9378b2 add global init/shutdown functions for libxml. this is required as
shutdown is not safe to call multiple times, and to make streams work
correctly some init stuff has to happen in a specific order
2003-10-19 23:17:56 +00:00
Shane Caraveo
31b7b3a2b2 add the valid xml test 2003-10-09 05:47:38 +00:00
Shane Caraveo
d0cf1ec40d add a DTD example 2003-10-09 05:46:03 +00:00
Rob Richards
6c9bbe70bf some namespace fixes
fix compiler warning
2003-10-06 21:28:01 +00:00
Shane Caraveo
e12aafca6b fix crash building nodeName 2003-10-05 21:53:08 +00:00
Shane Caraveo
4fbf5a0733 fix crash accessing tagName without namespace 2003-10-05 21:49:47 +00:00
Shane Caraveo
87bd7d57c6 Add schema and relaxNG validation support
domdocument->schemaValidate(string filename)
domdocument->schemaValidateSource(string xml)
domdocument->relaxNGValidate(string filename)
domdocument->relaxNGValidateSource(string xml)

also fix domelement->setAttributeNS
2003-10-05 20:45:27 +00:00
Shane Caraveo
a05dbd3a28 remove a debug printf 2003-10-05 16:37:50 +00:00
Rob Richards
8f489130bf fix segfault if xpath expression string is invalid 2003-10-05 13:14:21 +00:00
Rob Richards
c21e78ddf2 implement isDefaultNameSpace and baseURI
nodeName and tagName return qualified names
fix removeAttributeNode - takes domAttr as parameter
better uri and file handling for document load method
fix possible segfault when document is freed
set get_property_ptr_ptr handler to NULL
2003-10-05 11:52:22 +00:00
Zeev Suraski
c6c240a455 Sync with new API 2003-10-05 08:08:49 +00:00
Ilia Alshanetsky
763b39cc1d Fixed compile warnings. 2003-10-03 01:07:35 +00:00
Rob Richards
b437ac77bc add property_get_ptr handler
fix possible segfault in xpath
add wide character support for characterdata
2003-09-29 11:43:26 +00:00
Rob Richards
f9640d5fad fix preserveWhiteSpace on document load 2003-09-24 12:56:37 +00:00
Rob Richards
cb4db32030 set consistent pathing for libxml
set document url when loaded from memory to set base href
2003-09-22 19:11:35 +00:00
Rob Richards
7c33d55961 validate encoding against valid handlers 2003-09-15 12:29:52 +00:00
Rob Richards
315bf401ba move some document properties internally
add xpath namespace support (by Shane)
2003-09-08 18:28:35 +00:00
Sebastian Bergmann
afdecc374d ZTS fix. 2003-09-03 18:13:11 +00:00
Rob Richards
fd5758781c changes to php_dom.h for last commit
replaced removed closing tags - doh
2003-09-03 10:48:02 +00:00
Rob Richards
5630dd0be2 add document HTML load/save methods
add document standalone validate method
cleanup some prototype declarations
domexception inherits from default exception
2003-09-03 10:11:53 +00:00
Rob Richards
b196c0551e implement stricterrorcheck
fix clonenode
cleanup error routines
forgot these files
2003-08-24 10:24:22 +00:00
Rob Richards
09481c642b implement stricterrorcheck
fix clonenode
cleanup error routines
2003-08-24 10:23:43 +00:00
Wez Furlong
21329c5e0c allow building without libxml2 under win32 2003-08-22 15:04:29 +00:00
Rob Richards
d7e6bdaa0f fix infinite loop in normalize 2003-08-20 18:58:03 +00:00
Wez Furlong
9ada9e5767 fix build 2003-08-19 01:30:27 +00:00
Zeev Suraski
391c027da6 Get rid of PZVAL_UNLOCK() - fix untested 2003-08-18 23:13:25 +00:00
Ilia Alshanetsky
93bcd55eaf emalloc -> safe_emalloc 2003-08-12 00:58:52 +00:00
Marcus Boerger
d2ea062ef0 Fix warnings 2003-08-10 20:39:58 +00:00
Rob Richards
7ba3cb8c1e remove xml debug code 2003-07-27 20:21:36 +00:00
Rob Richards
43bc2f0b6d reworking xml namespace support
add node lookupNamespaceURI and lookupPrefix
add attr isId
2003-07-27 17:57:06 +00:00
Rob Richards
618d6c904d doctype and namespace fix
memory leak fix
2003-07-25 17:25:50 +00:00
Rob Richards
e8a87e5430 initial xpath implementation
make dom_object generic
2003-07-24 13:18:40 +00:00
Zeev Suraski
6c24e1577c API update 2003-07-22 13:50:00 +00:00
Rob Richards
d85845a64b fix for Bug #24715 segfault in dom_document_create_element
removed xmlmemorydump debug code
2003-07-19 14:59:29 +00:00
Rob Richards
1344b5d9b9 fix invalid node pointers 2003-07-18 12:41:35 +00:00
Rob Richards
e4d73c22ad fix setting new encoding 2003-07-14 21:51:28 +00:00
Rob Richards
d75618e780 implement read only exceptions
implement notation nodes
changes for spec conformance
2003-07-12 17:29:20 +00:00
Rob Richards
a04b2c8724 fix loading off of interface 2003-07-12 17:23:05 +00:00
Rob Richards
d1c41150c6 fix compile issue - TSRMLS_FETCH is only temporary until errors handled 2003-07-11 14:19:05 +00:00
Rob Richards
16fb3e91c0 remove global error handling - use of libxml globals is a bad thing
add domDocument properties for parsing options:
validateOnParse, resolveExternals, preserveWhiteSpace, substituteEntities
implement custom parsing to avoid use of globals
implement local errors while parsing
errors displayed until error objects implemented
2003-07-10 11:17:25 +00:00
Rob Richards
7de2784bd3 fix getElementsByTagName 2003-07-08 17:00:49 +00:00
Rob Richards
4cd06845f9 implement node proxies: next phase of interop 2003-07-07 19:37:32 +00:00
Rob Richards
ee9ca6ee9d fix load() and loadxml() when used with uninstantiated object 2003-07-01 19:28:30 +00:00
foobar
f3ac60d4a4 - Cleanup, simplifying, etc. 2003-06-30 17:23:52 +00:00
Rob Richards
85488c4a0d fix import/export for win32 when enabled by default 2003-06-26 10:40:26 +00:00
Sterling Hughes
936c9d5736 re-enable dom by default 2003-06-25 22:42:54 +00:00
foobar
0a6f6bab52 This should not be enabled by default, ext/xml is.. 2003-06-25 22:40:05 +00:00
Sterling Hughes
75abafdfc3 these should be enabled by default. At least this much was agreed upon when
the decision to debundle libxml2 was made.
2003-06-25 20:53:52 +00:00
Sterling Hughes
edd1db3f0f autodetect zlib if dom is enabled 2003-06-25 18:06:06 +00:00
Sterling Hughes
1aa6e3fee3 dom5 = dom 2003-06-25 15:31:59 +00:00
Sterling Hughes
fa36b5bfa4 can now be --with-dom, as the old domxml is now in pecl 2003-06-25 00:17:41 +00:00
Marcus Boerger
b5434aac36 Fix module pointer name to enable building again 2003-06-22 12:50:28 +00:00
Rob Richards
c69d395931 cleanup common code 2003-06-20 14:08:56 +00:00
Marcus Boerger
46b4ab47be Fit the error handler into the naming scheme and get rid of trailing new lines 2003-06-16 00:18:28 +00:00
Marcus Boerger
e208b0e77e Add an error handler (thx to timm for the idea) 2003-06-15 23:57:48 +00:00
Rob Richards
2a02045596 remove code no longer needed
fix format Output property
2003-06-15 19:58:42 +00:00
Rob Richards
c1b5700333 link libxml2 dynamically for consistancy 2003-06-15 14:50:11 +00:00
Rob Richards
d1bfc58aee use xmlInitParser instead of xmlInitThreads
reentrant safe as well no need for xml_parser_inited
2003-06-14 18:15:50 +00:00
Rob Richards
6414becb62 fix xml_parser_inited on win32
add common structs for better interoprability
2003-06-14 15:27:15 +00:00
Marcus Boerger
74476dc1da Improve/fix preventing both enabled 2003-06-14 13:35:09 +00:00