2003-06-06 01:06:52 +08:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2004-01-08 16:18:22 +08:00
|
|
|
| PHP Version 5 |
|
2003-06-06 01:06:52 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2011-01-01 10:17:06 +08:00
|
|
|
| Copyright (c) 1997-2011 The PHP Group |
|
2003-06-06 01:06:52 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 20:51:34 +08:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
2003-06-06 01:06:52 +08:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-11 04:04:29 +08:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 20:51:34 +08:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
2003-06-06 01:06:52 +08:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Authors: Christian Stocker <chregu@php.net> |
|
|
|
|
| Rob Richards <rrichards@php.net> |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "php.h"
|
2003-08-22 23:04:29 +08:00
|
|
|
#if HAVE_LIBXML && HAVE_DOM
|
2003-06-06 01:06:52 +08:00
|
|
|
#include "php_dom.h"
|
|
|
|
|
|
|
|
/*
|
2004-05-31 20:50:28 +08:00
|
|
|
* class DOMNotation extends DOMNode
|
2003-06-06 01:06:52 +08:00
|
|
|
*
|
|
|
|
* URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5431D1B9
|
|
|
|
* Since:
|
|
|
|
*/
|
|
|
|
|
2007-09-28 02:00:48 +08:00
|
|
|
const zend_function_entry php_dom_notation_class_functions[] = {
|
2003-06-06 01:06:52 +08:00
|
|
|
{NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* {{{ attribute protos, not implemented yet */
|
|
|
|
|
2004-11-19 03:54:30 +08:00
|
|
|
/* {{{ publicId string
|
2003-06-06 01:06:52 +08:00
|
|
|
readonly=yes
|
|
|
|
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-54F2B4D0
|
|
|
|
Since:
|
|
|
|
*/
|
|
|
|
int dom_notation_public_id_read(dom_object *obj, zval **retval TSRMLS_DC)
|
|
|
|
{
|
2006-03-04 04:15:10 +08:00
|
|
|
xmlEntityPtr nodep;
|
2003-06-06 01:06:52 +08:00
|
|
|
|
2006-03-04 04:15:10 +08:00
|
|
|
nodep = (xmlEntityPtr) dom_object_get_node(obj);
|
2004-02-16 21:06:33 +08:00
|
|
|
|
|
|
|
if (nodep == NULL) {
|
|
|
|
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
|
|
|
|
return FAILURE;
|
|
|
|
}
|
|
|
|
|
2003-06-06 01:06:52 +08:00
|
|
|
ALLOC_ZVAL(*retval);
|
2006-03-04 04:15:10 +08:00
|
|
|
if (nodep->ExternalID) {
|
|
|
|
ZVAL_STRING(*retval, (char *) (nodep->ExternalID), 1);
|
2003-06-06 01:06:52 +08:00
|
|
|
} else {
|
|
|
|
ZVAL_EMPTY_STRING(*retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
return SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* }}} */
|
|
|
|
|
2004-11-19 03:54:30 +08:00
|
|
|
/* {{{ systemId string
|
2003-06-06 01:06:52 +08:00
|
|
|
readonly=yes
|
|
|
|
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-E8AAB1D0
|
|
|
|
Since:
|
|
|
|
*/
|
|
|
|
int dom_notation_system_id_read(dom_object *obj, zval **retval TSRMLS_DC)
|
|
|
|
{
|
2006-03-04 04:15:10 +08:00
|
|
|
xmlEntityPtr nodep;
|
2003-06-06 01:06:52 +08:00
|
|
|
|
2006-03-04 04:15:10 +08:00
|
|
|
nodep = (xmlEntityPtr) dom_object_get_node(obj);
|
2004-02-16 21:06:33 +08:00
|
|
|
|
|
|
|
if (nodep == NULL) {
|
|
|
|
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
|
|
|
|
return FAILURE;
|
|
|
|
}
|
|
|
|
|
2003-06-06 01:06:52 +08:00
|
|
|
ALLOC_ZVAL(*retval);
|
|
|
|
if (nodep->SystemID) {
|
2006-03-04 04:15:10 +08:00
|
|
|
ZVAL_STRING(*retval, (char *) (nodep->SystemID), 1);
|
2003-06-06 01:06:52 +08:00
|
|
|
} else {
|
|
|
|
ZVAL_EMPTY_STRING(*retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
return SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* }}} */
|
|
|
|
|
2008-08-14 16:39:05 +08:00
|
|
|
/* }}} */
|
|
|
|
|
2003-08-22 23:04:29 +08:00
|
|
|
#endif
|
2008-08-14 16:39:05 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* tab-width: 4
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* End:
|
|
|
|
* vim600: noet sw=4 ts=4 fdm=marker
|
|
|
|
* vim<600: noet sw=4 ts=4
|
|
|
|
*/
|