Commit Graph

361 Commits

Author SHA1 Message Date
Christian Stocker
064fb5c3cb renamed xslt_dump_* to xslt_result_dump_* to avoid confusion
# will adjust NEWS file later
2002-08-23 15:26:19 +00:00
Christian Stocker
9278d9bf1a fix memleak in xslt->dump_mem() 2002-08-23 15:19:16 +00:00
Christian Stocker
8e52350a49 - moved xslt_dump_ to better place
- removed unused variables
2002-08-22 16:04:28 +00:00
Christian Stocker
1a486b6676 @- Added XsltObject->dump_file($result,$filename[,$compression]) for dumping
@  xslt-result directly into a file. (chregu)
2002-08-22 15:54:23 +00:00
Christian Stocker
1f57dec2bf @- Added XsltObject->dump_mem($result) for returning xslt-result directly
@  into a string (morus.walter@web.de, chregu)

- XsltObject->dump_file() will follow
- bumped up needed libxslt version to 1.0.18
2002-08-22 15:02:41 +00:00
Christian Stocker
2ce44cd99c return version number of linked libxml2, not of the one, which it was
compiled against
2002-08-22 14:32:43 +00:00
foobar
7796bc12dd kill compiler warning (unused variable) 2002-08-22 00:43:18 +00:00
Derick Rethans
ccf51590b3 - Proper format for CREDITS files 2002-08-21 05:41:49 +00:00
Uwe Steinmann
6a79e354c1 - gave overdue credits to christian 2002-08-21 05:39:28 +00:00
Christian Stocker
9698d5da45 w3c adjustments :)
- has_attributes returns empty string if attribute is not there
- parent_node returns null, if no parent
2002-08-19 14:01:04 +00:00
Christian Stocker
6cbb350607 More W3C conformance stuff (they returned all false before..)
- DomNode->attributes() returns NULL, if not found.
- DomNode->first_child() returns NULL, if not found
- DomNode->last_child() returns NULL, if not found.
- DomNode->namespace_uri() returns NULL, if not found.
2002-08-17 11:47:21 +00:00
Christian Stocker
9c20c7c9ba More on the way to W3C coformance:
@- Changed DomNode->next_sibling and DomNode->previous_sibling to return NULL
@  instead of false (W3C specs). (chregu)
@- Changed DomNode->insert_before() and DomNode->append_child() to conform to
@  W3C specs (moving not copying nodes, accepting NULL as 2nd param). (chregu)
2002-08-16 08:42:41 +00:00
Christian Stocker
993d235c07 include libxml/xinclude.h to make some compilers happy 2002-08-15 18:02:25 +00:00
Christian Stocker
2126f799b9 proto fixes 2002-08-15 13:26:32 +00:00
Christian Stocker
c0f4035116 @ - Added DomNode->set_namespace(uri[,prefix]) (chregu)
- Added third optional parameter (prefix) to DomDocument->create_element_ns()
- generate prefix from random number, if not provided.
2002-08-15 12:43:44 +00:00
Christian Stocker
5c935cb372 - let DomNode->replace_child always behave correctly (acc. to W3C specs)
if the newchild had the same parent as the old child, nothing happened,
which seemed strange behaviout to me...
2002-08-14 17:38:20 +00:00
Christian Stocker
ce71fe0288 DomNode->replace_node moves instead of copies node. 2002-08-14 16:53:56 +00:00
Christian Stocker
c0a79401fd - fix for bug #17771 (insert_before misbeaviour (DOM L2 spec.))
@ - DomNode->insert_before behaves now according to W3C spec
@   ie. new_child is moved, not copied. (chregu)
2002-08-14 16:12:18 +00:00
Christian Stocker
63874f9017 @ - Added some namespace support with DomNode->add_namespace(uri, prefix)
@   and DomDocument->create_element_ns(uri, nodename) (chregu)
2002-08-14 14:23:44 +00:00
Christian Stocker
780c1605c8 bump up api version number 2002-08-14 09:20:19 +00:00
Christian Stocker
280cb97fef fix for bug #18196
@ - DomElement->node_name() takes optional boolean argument for retrieving
@ -  full qualified name (ie namespace prefix) (chregu)
2002-08-14 09:07:34 +00:00
Christian Stocker
323765cc17 fix for bug #18395 (DOMXML crash on removing previously created attributes) 2002-08-14 08:27:36 +00:00
Christian Stocker
43bdd6ed73 @ - DomNode->child_nodes() returns empty array instead of false, if no
@ - child nodes are found (chregu)
2002-08-14 07:29:46 +00:00
Christian Stocker
c0f12111ba @ - Added $DomDocument->xinclude() for substitution of XIncludes in
a DomDocument (chregu)
2002-08-12 13:11:50 +00:00
Joseph Tate
3001ecc948 #Stupid. Sorry. 2002-08-07 17:03:42 +00:00
Joseph Tate
17d94ed821 #Don't use C++ Comments bug #18783 2002-08-07 16:52:00 +00:00
Christian Stocker
825b5a42e2 - nodename is not always set, check if it really is.
- make force_ref for aliases as well
2002-07-29 14:04:44 +00:00
Christian Stocker
2ba020d012 even more items on the TODO list 2002-07-17 08:59:05 +00:00
Christian Stocker
bb069a1ccb nodename is not always set, check if it really is. 2002-07-17 08:57:29 +00:00
foobar
efd065ff78 Fixed some unused variable warnings 2002-07-13 05:53:06 +00:00
Christian Stocker
e5bcd202ce @ - Added domxml_node_namespace_uri() (Rui Lopes). 2002-07-07 17:19:29 +00:00
Christian Stocker
e1483035b6 outcomment everything related to domxml_elem_set_attribute_node(). This
function is not implemented and shouldn't show up at all for the time
being
2002-07-01 14:48:38 +00:00
Derick Rethans
f57306cdd9 Unify error messages 2002-06-26 07:54:00 +00:00
Christian Stocker
d68707a2c9 should compile on windows again 2002-06-25 09:46:15 +00:00
Christian Stocker
15416d6797 include libxml/parserInternals.h 2002-06-25 09:19:20 +00:00
Christian Stocker
b6440188b1 added some points to the todo list 2002-06-24 18:02:48 +00:00
Uwe Steinmann
662962f25c - take version of libxslt and libxml from runtime variables to make
sure the reported versions correspond to the actually installed
	versions of libxml and libxslt
2002-06-20 05:48:45 +00:00
Christian Stocker
6ff3e9dc3d - Make domxml_xslt_process() working again. 2002-06-19 15:12:14 +00:00
Markus Fischer
7cefd2fe09 - Fix ZTS build. 2002-06-18 01:51:59 +00:00
Christian Stocker
f9325a6a29 - renamed domxml_parser_reference to domxml_parser_entitiy_reference
- renamed domxml_cdata_block to domxml_parser_cdata_section
  (more consistent with the domxml_create_XXX methods)
- added domxml_parser_processing_instruction(target,data)
- added domxml_parser_namespace_decl(href,prefix)
2002-06-14 12:37:28 +00:00
Christian Stocker
f185f06f27 - oops, that didn't even compile
- added domxml_parser_reference(reference)
2002-06-14 12:20:13 +00:00
Christian Stocker
7edd730be5 @ - Added preliminary SAX-Input support. It's now possible to build a DomDocument
@   with SAX-Events (added domxml_parser_start_document(), domxml_parser_end_document(),
@   domxml_parser_start_element(tagname[,attributes]), domxml_parser_end_element(tagname),
@   domxml_parser_characters(characters), domxml_parser_cdata_block(cdata),
@   domxml_parser_comment(comment), domxml_parser_get_document(). (chregu)
# More Sax Events to be implemented. Sax Output (from file or DOM-Tree) is
#  not that easy to implement, but possible...
2002-06-14 12:12:04 +00:00
Christian Stocker
ff9a003f26 - Added DOMXML_LOAD_DONT_KEEP_BLANKS as possible mode, if one wants really nicely
formatted XML-Documents (but this can have sideeffects, if you depend on whitespaces..)
- bumped up domxml-api-version number.
2002-06-13 10:47:19 +00:00
Christian Stocker
1177e74fea @ - Added better error-messages (3rd parameter) and validating of DTDs (2nd parameter) to
@   domxml_open_mem(string xml[, int mode[, array errors]]) and domxml_open_file(string filename[, int mode[, array errors]]).
@ - Added domxml_doc_validate([array errors]) for validating existing DomDocuments with a DTD.
2002-06-13 09:05:56 +00:00
Christian Stocker
3ba753f3d8 Fixed domxml_get_element_by_id() 2002-06-12 11:13:11 +00:00
Markus Fischer
9ec38259ed - Those have been implemented already. 2002-06-11 21:29:32 +00:00
Joseph Tate
5bb233a931 #Undeprecated attribute access methods 2002-06-10 14:48:28 +00:00
Joseph Tate
7a58bc690a Added aliases to make attr_node access functions more consistent.
Old access functions are now deprecated.
CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: 	php_domxml.c
CVS: ----------------------------------------------------------------------
2002-06-07 14:56:08 +00:00
Derick Rethans
3fb8db4ca8 - Fix a problem in domxml_dump_mem(_file) with xmlKeepBlanksDefault not
being set. (patch by Rob Richards <rrichards@digarc.com>)
2002-06-05 15:24:49 +00:00
Joseph Tate
68845d9811 #Whitespace fix: Sorry 2002-06-04 14:30:12 +00:00
Joseph Tate
316f8f0764 Bug fix to #17560 submitted by Rob Richards 2002-06-04 14:20:54 +00:00
Stefan Roehrich
506282af5c WS change to make very old compilers/preprocessors (e.g. HP/UX 9)
happy (thanks to Andreas Ley for recognizing this).
2002-06-01 20:14:58 +00:00
Brad LaFountain
fa60d31d27 Changed PHP_EXPORTS to DOMXML_EXPORTS as Edin Kadribasic suggested 2002-05-31 13:38:58 +00:00
Brad LaFountain
5313321e08 initalize variable in domxml_doc_document_element() 2002-05-31 06:14:29 +00:00
Brad LaFountain
2eb29ca917 defined PHP_EXPORTS for exporting php_domobject_new() 2002-05-31 06:01:50 +00:00
Brad LaFountain
e6fa086537 added the ability to use new keywork with domxmls objects "new DomDocument()"
instead of xmldoc. This also allows you to create nodes without having
  a whole document "new DomElement("foo")".

moved DOMXML_API_VERSION to php_domxml.h
exposed php_domobject_new for other extensions to use
removed some un-needed code
2002-05-31 05:58:40 +00:00
foobar
3b9401a3ed DO NOT use C++ comments! 2002-05-19 00:02:07 +00:00
Christian Stocker
ccd962e155 - delete attributes as well in php_free_xml_node
- more consistent naming in phpinfo()
2002-05-18 20:19:43 +00:00
Christian Stocker
b692311fdd added "domxml API version" in phpinfo() output. 2002-05-18 17:07:59 +00:00
Christian Stocker
def8bc92fc mem leak fix for domxml_dump_node 2002-05-18 14:38:22 +00:00
Christian Stocker
987ab91efb fixes memleak in html_dump_mem 2002-05-18 14:23:31 +00:00
Christian Stocker
81c8b8e7a4 rename the object name for comment nodes to domcoment 2002-05-18 14:21:46 +00:00
Christian Stocker
034d684089 WS fixes 2002-05-18 10:05:21 +00:00
Christian Stocker
f275fe0b0b This should fix a big bad memory leak in freeing the nodes at script end. 2002-05-18 09:35:28 +00:00
Christian Stocker
78acc6d865 - replaced domxml_doc_document_element implementation do use libxml2 method
- renamed domxml_add_root to domxml_doc_add_root (and added alias for BC)
- aliased $doc->get_root to domxml_document_element
@ - added domxml_doc_set_root to change the root node (Lukas Schroeder)
2002-05-16 21:59:26 +00:00
Christian Stocker
20226f71fc libxml2 >= 2.4.14 is needed (since quite some time ...) 2002-05-15 12:41:55 +00:00
Christian Stocker
827a769c28 @- added fifth optional parameter to domxml_xslt_process. If set,
it will output profiling information to the file stated (chregu)
- introduced version numbering for this extension
2002-05-10 14:59:14 +00:00
Christian Stocker
d5c7421a7c removed the function for domxml_node_add_child and made an alias to
domxml_node_append_child for BC
2002-05-03 13:53:46 +00:00
Christian Stocker
e7f7fb1781 WS fixes 2002-05-03 09:51:06 +00:00
Christian Stocker
9c37ea1888 one parameter too much 2002-05-03 09:46:27 +00:00
Christian Stocker
67c5b2e4fd added encoding support for domxml_dump_mem() 2002-05-03 09:45:09 +00:00
Uwe Steinmann
3858221c2f - added function domxml_parser_set_keep_blanks() 2002-04-30 05:18:12 +00:00
foobar
0a1f795271 Fix ZTS build. 2002-04-24 05:49:57 +00:00
Uwe Steinmann
fc851f342a - replace_child() will not add a child twice
- domxml_open_mem() drops old optional parameter to switch between reading
  from a string or a file.
- new optional parameter for domxml_open_mem() which set the mode how the
  document shall be parsed
2002-04-23 13:24:25 +00:00
Uwe Steinmann
1e9000e315 - added new function DomDocument->ids (subject to change) 2002-04-23 06:26:46 +00:00
Uwe Steinmann
d4c273c3a7 - get_element_by_id() doesn't use xpath anymore but searches in
xmlDoc->ids as provided by libxml.
- New function DomDocument->ids() returns a list of ids (subject to change)
- replace_node() doesn't make a copy of the new node if it has no parents
2002-04-23 06:05:38 +00:00
Uwe Steinmann
de2ef69032 - DomNode->replace_node() now returns the node that was replace and
not the new node
- fixes Bug #15949
2002-04-15 15:39:10 +00:00
Uwe Steinmann
c7e391637c - added DomNode->replace_child() 2002-04-15 14:45:38 +00:00
Christian Stocker
67292ee205 @- old $node->append_child() is now $node->append_sibling(), since
@  new append_child() now behaves like excepted (= W3C standard) (chregu, uwe)
2002-04-13 10:23:46 +00:00
Uwe Steinmann
ce00085cdd - added method DomNode->remove_child() 2002-04-12 13:23:07 +00:00
Uwe Steinmann
53de1218fd - fixed stupid compile error 2002-04-12 11:47:48 +00:00
Uwe Steinmann
9b0564beb5 - insert_before(): copy node before doing the insert
- append_child(): actually do an append child and not and add sibling
- what is called xmlDtd in libxml is actually the class DocumentType
  in DOM. The domxml extension used a class DomDtd which is not defined
	in the DOM standard. Instead of using DomDtd DomDocumentType is now
	used. DomDtd has been renamed to Dtd but has not meaning anymore.
- added more functions
2002-04-12 11:32:23 +00:00
Jan Lehnardt
49d6f53007 - add quotes. Cought by: Roman Neuhauser <neuhauser@mail.cz> 2002-04-11 17:20:47 +00:00
Joseph Tate
5ae6b3e17a Added test suite for domxml extension.
#eventually I'll separate all the tests into separate files, but until
#then, I'll commit it so that everyone can use it.
2002-04-05 20:55:37 +00:00
Joseph Tate
7954c7bafe Added unlink_node alias for consistency 2002-04-05 18:18:23 +00:00
Christian Stocker
672586726e oops. that was an error not detected in shared library mode ... 2002-04-05 15:47:08 +00:00
Christian Stocker
e448122bd5 added domxml_parser(), domxml_parser_add_chunk() and domxml_parser_end().
It provides access to the PushParser interface of libxml2.
2002-04-05 15:27:52 +00:00
Christian Stocker
afeda57153 - fixed a lot of memory leaks (by Lukas Schroeder)
- get_attribute() returns False instead of empty string, if attribute not found
2002-04-04 12:16:48 +00:00
Joseph Tate
113f08bc4b Fixing compile warning under Win32 2002-03-27 21:45:45 +00:00
Derick Rethans
b5252e28dd - Fix proto (again) 2002-03-15 19:04:22 +00:00
Derick Rethans
108448f37a - proto fixes 2002-03-15 18:22:57 +00:00
Christian Stocker
7542aa7499 Return attribute name in node_name(), if it's a XML_ATTRIBUTE_NODE 2002-03-13 08:08:22 +00:00
Christian Stocker
da773a0cfc Return #document in node_name(), if it's a XML_DOCUMENT_NODE 2002-03-13 07:31:16 +00:00
Sascha Schumann
5cba3a99c2 extension converted automatically to PHP_NEW_EXTENSION. Manually confirmed 2002-03-12 16:44:00 +00:00
Christian Stocker
b6d4004fd9 forgot SEPARATE_ZVAL, produced segfaults.
segfaulted only in 4_2_0 (not in HEAD and 4_0_7, strange...)
2002-03-12 11:15:03 +00:00
Markus Fischer
f499aa1f33 - Remove *FETCH() statements.
- Clean up WS and parenthesis indentation.
2002-03-12 09:12:42 +00:00
Christian Stocker
668ade05c6 nicer (optional) formated output in dump_mem and dump_mem_file 2002-03-12 08:24:50 +00:00
Christian Stocker
48da8216f9 @ implemented domxml_elem_get_elements_by_tagname
@ new function domxml_doc_get_elements_by_tagname
@ new function domxml_doc_get_element_by_id (chregu)
2002-03-11 22:37:32 +00:00
foobar
16d61c974c - Fixed bug: #15686 2002-03-09 21:30:12 +00:00
Christian Stocker
f8964007f8 @ implemented domxml_elem_get_attribute_node(attrname) (chregu) 2002-03-08 22:16:07 +00:00