Annotation of win32/gnome/gdome2-x.x.x/libgdome/gdome.c, revision 1.2

1.1       paf         1: /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
                      2: /* gdome.c
                      3:  *
                      4:  * Copyright (C) 1999 Raph Levien <raph@acm.org>
                      5:  * Copyright (C) 2000 Mathieu Lacage <mathieu@gnu.org>
                      6:  * CopyRight (C) 2001 Paolo Casarini <paolo@casarini.org>
                      7:  *
                      8:  * This file is generated automatically.  To make changes, edit
                      9:  * test/apigen/core.xml
                     10:  *
                     11:  * This library is free software; you can redistribute it and/or
                     12:  * modify it under the terms of the GNU Lesser General Public
                     13:  * License as published by the Free Software Foundation; either
                     14:  * version 2.1 of the License, or (at your option) any later version.
                     15:  * 
                     16:  * This library is distributed in the hope that it will be useful,
                     17:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
                     18:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
                     19:  * Lesser General Public License for more details.
                     20:  * 
                     21:  * You should have received a copy of the GNU Lesser General Public
                     22:  * License along with this library; if not, write to the Free Software
                     23:  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                     24:  */
                     25: 
                     26: #include <libxml/parser.h>
                     27: #include <libxml/hash.h>
                     28: #include "gdome.h"
                     29: #include "gdome-xml-str.h"
                     30: #include "gdome-xml-domimpl.h"
                     31: #include "gdome-xml-nnodem.h"
                     32: #include "gdome-xml-nodel.h"
                     33: #include "gdome-xml-domimpl.h"
                     34: #include "gdome-xml-node.h"
                     35: #include "gdome-xml-cdata.h"
                     36: #include "gdome-xml-text.h"
                     37: #include "gdome-xml-cdatas.h"
                     38: #include "gdome-xml-comment.h"
                     39: #include "gdome-xml-document.h"
                     40: #include "gdome-xml-documentf.h"
                     41: #include "gdome-xml-documentt.h"
                     42: #include "gdome-xml-attribute.h"
                     43: #include "gdome-xml-element.h"
                     44: #include "gdome-xml-entity.h"
                     45: #include "gdome-xml-entityref.h"
                     46: #include "gdome-xml-pi.h"
                     47: #include "gdome-xml-xmldtdutil.h"
                     48: #include "gdome-xml-notation.h"
                     49: #include "gdome-xml-xpns.h"
                     50: 
                     51: 
                     52: /******************************************************************************
                     53:           GdomeDOMString interface API
                     54:  ******************************************************************************/
                     55: /**
                     56:  * gdome_str_mkref:
                     57:  * @str:  a %NULL terminated string
                     58:  *
                     59:  * Creates a #GdomeDOMString from a statically allocated string.
                     60:  * Returns: the new DOMString object.
                     61:  */
                     62: GdomeDOMString *
                     63: gdome_str_mkref (const gchar *str)
                     64: {
                     65:  return gdome_xml_str_mkref (str);
                     66: }
                     67: /**
                     68:  * gdome_str_mkref_own:
                     69:  * @str:  a %NULL terminated string
                     70:  *
                     71:  * Creates a #GdomeDOMString from a dynamically allocated gchar buffer.
                     72:  * Returns: the new DOMString object.
                     73:  */
                     74: GdomeDOMString *
                     75: gdome_str_mkref_own (gchar *str)
                     76: {
                     77:  return gdome_xml_str_mkref_own (str);
                     78: }
                     79: /**
                     80:  * gdome_str_mkref_xml:
                     81:  * @str:  a %NULL terminated string
                     82:  *
                     83:  * Creates a #GdomeDOMString from a xmlChar buffer already allocated by libxml.
                     84:  * DEPRECATED
                     85:  * Returns: the new DOMString object.
                     86:  */
                     87: GdomeDOMString *
                     88: gdome_str_mkref_xml (const xmlChar *str)
                     89: {
                     90:  return gdome_xml_str_mkref_xml (str);
                     91: }
                     92: /**
                     93:  * gdome_str_mkref_dup:
                     94:  * @str:  a %NULL terminated string
                     95:  *
                     96:  * Creates a #GdomeDOMString from a static or dynamically allocated gchar
                     97:  * buffer, but a copy of the initializing string is done before construction.
                     98:  * Returns: the new DOMString object.
                     99:  */
                    100: GdomeDOMString *
                    101: gdome_str_mkref_dup (const gchar *str)
                    102: {
                    103:  return gdome_xml_str_mkref_dup (str);
                    104: }
                    105: /**
                    106:  * gdome_str_ref:
                    107:  * @self:  DOMString Object ref
                    108:  *
                    109:  * Increase the reference count of the specified #GdomeDOMString.
                    110:  */
                    111: void
                    112: gdome_str_ref (GdomeDOMString *self)
                    113: {
                    114:  gdome_xml_str_ref (self);
                    115: }
                    116: /**
                    117:  * gdome_str_unref:
                    118:  * @self:  DOMString Object ref
                    119:  *
                    120:  * Decrease the reference count of the specified #GdomeDOMString. Free the
                    121:  * structure if the object will have zero reference.
                    122:  */
                    123: void
                    124: gdome_str_unref (GdomeDOMString *self)
                    125: {
                    126:  gdome_xml_str_unref (self);
                    127: }
                    128: /**
                    129:  * gdome_str_equal:
                    130:  * @self:  DOMString Object ref
                    131:  * @str:  DOMString to be compared
                    132:  *
                    133:  * Returns: %TRUE if the strings are equal, %FALSE otherwise.
                    134:  */
                    135: GdomeBoolean
                    136: gdome_str_equal (GdomeDOMString *self, GdomeDOMString *str)
                    137: {
                    138:  return gdome_xml_str_equal (self, str);
                    139: }
                    140: /**
                    141:  * gdome_str_equalIgnoreCase:
                    142:  * @self:  DOMString Object ref
                    143:  * @str:  DOMString to be compared
                    144:  *
                    145:  * Returns: %TRUE if the strings are equal ignoring case, %FALSE otherwise.
                    146:  */
                    147: GdomeBoolean
                    148: gdome_str_equalIgnoreCase (GdomeDOMString *self, GdomeDOMString *str)
                    149: {
                    150:  return gdome_xml_str_equalIgnoreCase (self, str);
                    151: }
                    152: /**
                    153:  * gdome_str_charAt:
                    154:  * @self:  DOMString Object ref
                    155:  * @index:  the index of the character wanted
                    156:  *
                    157:  * Returns: the @index -th character in the specified string
                    158:  */
                    159: gchar
                    160: gdome_str_charAt (GdomeDOMString *self, int index)
                    161: {
                    162:  return gdome_xml_str_charAt (self, index);
                    163: }
                    164: /**
                    165:  * gdome_str_concat:
                    166:  * @self:  DOMString Object ref
                    167:  * @str:  DOMString to be appended
                    168:  *
                    169:  * Returns: a new #GdomeDOMString that is the concatenation of this string
                    170:  * with @str. If @str is %NULL a new reference to this string is returned.
                    171:  */
                    172: GdomeDOMString *
                    173: gdome_str_concat (GdomeDOMString *self, GdomeDOMString *str)
                    174: {
                    175:  return gdome_xml_str_concat (self, str);
                    176: }
                    177: /**
                    178:  * gdome_str_isEmpty:
                    179:  * @self:  DOMString Object ref
                    180:  *
                    181:  * Returns: %TRUE if this string is empty, %FALSE otherwise.
                    182:  */
                    183: GdomeBoolean
                    184: gdome_str_isEmpty (GdomeDOMString *self)
                    185: {
                    186:  return gdome_xml_str_isEmpty (self);
                    187: }
                    188: /**
                    189:  * gdome_str_endsWith:
                    190:  * @self:  DOMString Object ref
                    191:  * @suffix:  DOMString to check
                    192:  *
                    193:  * Returns: %TRUE if this string ends with @str.
                    194:  */
                    195: GdomeBoolean
                    196: gdome_str_endsWith (GdomeDOMString *self, GdomeDOMString *suffix)
                    197: {
                    198:  return gdome_xml_str_endsWith (self, suffix);
                    199: }
                    200: /**
                    201:  * gdome_str_startsWith:
                    202:  * @self:  DOMString Object ref
                    203:  * @prefix:  DOMString to check
                    204:  *
                    205:  * Returns: %TRUE if this string starts with @str.
                    206:  */
                    207: GdomeBoolean
                    208: gdome_str_startsWith (GdomeDOMString *self, GdomeDOMString *prefix)
                    209: {
                    210:  return gdome_xml_str_startsWith (self, prefix);
                    211: }
                    212: /**
                    213:  * gdome_str_length:
                    214:  * @self:  DOMString Object ref
                    215:  *
                    216:  * Returns: the length of this string.
                    217:  */
                    218: int
                    219: gdome_str_length (GdomeDOMString *self)
                    220: {
                    221:  return gdome_xml_str_length (self);
                    222: }
                    223: 
                    224: /******************************************************************************
                    225:           GdomeDOMImplementation interface API
                    226:  ******************************************************************************/
                    227: /**
                    228:  * gdome_di_mkref:
                    229:  *
                    230:  * Constructor of the DOMImplementation interface.
                    231:  * Returns: the reference to the DOMImplementation structure.
                    232:  */
                    233: GdomeDOMImplementation *
                    234: gdome_di_mkref (void)
                    235: {
                    236:  return gdome_xml_di_mkref ();
                    237: }
                    238: /**
                    239:  * gdome_di_ref:
                    240:  * @self:  DOMImplementation Object ref
                    241:  * @exc:  Exception Object ref
                    242:  *
                    243:  * Increase the reference count of the DOMImplementation structure.
                    244:  */
                    245: void
                    246: gdome_di_ref (GdomeDOMImplementation *self, GdomeException *exc)
                    247: {
                    248:  if (self == NULL) {
                    249:    *exc = GDOME_NULL_POINTER_ERR;
                    250:    return;
                    251:  }
                    252:  *exc = 0;
                    253:  ((Gdome_xml_DOMImplementation *)self)->vtab->ref (self, exc);
                    254: }
                    255: /**
                    256:  * gdome_di_unref:
                    257:  * @self:  DOMImplementation Object ref
                    258:  * @exc:  Exception Object ref
                    259:  *
                    260:  * Decrease the reference count of the DOMImplementation. Free the structure
                    261:  * if DOMImplementation will have zero reference.
                    262:  */
                    263: void
                    264: gdome_di_unref (GdomeDOMImplementation *self, GdomeException *exc)
                    265: {
                    266:  if (self == NULL) {
                    267:    *exc = GDOME_NULL_POINTER_ERR;
                    268:    return;
                    269:  }
                    270:  *exc = 0;
                    271:  ((Gdome_xml_DOMImplementation *)self)->vtab->unref (self, exc);
                    272: }
                    273: /**
                    274:  * gdome_di_query_interface:
                    275:  * @self:  DOMImplementation Object ref
                    276:  * @interface:  interface needed
                    277:  * @exc:  Exception Object ref
                    278:  *
                    279:  * Returns: a reference to this object that implements the @interface needed,
                    280:  *          or %NULL if the @interface is not supported by this Object.
                    281:  */
                    282: gpointer
                    283: gdome_di_query_interface (GdomeDOMImplementation *self, const char *interface, GdomeException *exc)
                    284: {
                    285:  if (self == NULL) {
                    286:    *exc = GDOME_NULL_POINTER_ERR;
                    287:    return NULL;
                    288:  }
                    289:  *exc = 0;
                    290:  return ((Gdome_xml_DOMImplementation *)self)->vtab->query_interface (self, interface, exc);
                    291: }
                    292: /**
                    293:  * gdome_di_createDocument:
                    294:  * @self:  DOMImplementation Object ref
                    295:  * @namespaceURI:  The namespace URI of the document element to create
                    296:  * @qualifiedName:  The qualified name of the document element to be created
                    297:  * @doctype:  The type of document to be created or NULL
                    298:  * @exc:  Exception Object ref
                    299:  *
                    300:  * Creates an XML Document object of the specified type with its document
                    301:  * element.
                    302:  *
                    303:  * %GDOME_NAMESPACE_ERR: Raised if the @qualifiedName is malformed, if the
                    304:  * @qualifiedName has a prefix and the @namespaceURI is %NULL, or if the
                    305:  * @qualifiedName has a prefix that is "xml" and the @namespaceURI is different
                    306:  * from "http://www.w3.org/XML/1998/namespace"
                    307:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @doctype has already been used with a
                    308:  * different document.
                    309:  * Returns: a new Document node.
                    310:  */
                    311: GdomeDocument *
                    312: gdome_di_createDocument (GdomeDOMImplementation *self, GdomeDOMString *namespaceURI, GdomeDOMString *qualifiedName, GdomeDocumentType *doctype, GdomeException *exc)
                    313: {
                    314:  if (self == NULL) {
                    315:    *exc = GDOME_NULL_POINTER_ERR;
                    316:    return NULL;
                    317:  }
                    318:  *exc = 0;
                    319:  return ((Gdome_xml_DOMImplementation *)self)->vtab->createDocument (self, namespaceURI, qualifiedName, doctype, exc);
                    320: }
                    321: /**
                    322:  * gdome_di_createDocumentType:
                    323:  * @self:  The DOMImplementation Object ref
                    324:  * @qualifiedName:  The qualified name of the document type to be created
                    325:  * @publicID:  The external subset public identifier
                    326:  * @systemID:  The external subset system identifier
                    327:  * @exc:  The Exception Object ref
                    328:  *
                    329:  * Creates an empty DocumentType node. Entity declarations and notations are
                    330:  * not made available. Entity reference expansions and default attribute
                    331:  * additions do not occur. It is expected that a future version of the DOM will
                    332:  * provide a way for populating a DocumentType.
                    333:  *
                    334:  * %GDOME_NAMESPACE_ERR: Raised if the qualifiedName is malformed.
                    335:  * Returns: A new DocumentType node.
                    336:  */
                    337: GdomeDocumentType *
                    338: gdome_di_createDocumentType (GdomeDOMImplementation *self, GdomeDOMString *qualifiedName, GdomeDOMString *publicId, GdomeDOMString *systemId, GdomeException *exc)
                    339: {
                    340:  if (self == NULL) {
                    341:    *exc = GDOME_NULL_POINTER_ERR;
                    342:    return NULL;
                    343:  }
                    344:  *exc = 0;
                    345:  return ((Gdome_xml_DOMImplementation *)self)->vtab->createDocumentType (self, qualifiedName, publicId, systemId, exc);
                    346: }
                    347: /**
                    348:  * gdome_di_hasFeature:
                    349:  * @self:  The DOMImplementation Object ref
                    350:  * @feature:  The name of the feature to test (case-insensitive).
                    351:  * @version:  This is the version number of the feature to test. In Level 2,
                    352:  *            version 1, this is the string "2.0". If the version is not
                    353:  *            specified, supporting any version of the feature will cause the
                    354:  *            method to return %TRUE.
                    355:  * @exc:  Exception Object ref
                    356:  *
                    357:  * Tests whether the DOM implementation implements a specific feature.
                    358:  * Returns: %TRUE if the feature is supported, %FALSE otherwise.
                    359:  */
                    360: GdomeBoolean
                    361: gdome_di_hasFeature (GdomeDOMImplementation *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                    362: {
                    363:  if (self == NULL) {
                    364:    *exc = GDOME_NULL_POINTER_ERR;
                    365:    return FALSE;
                    366:  }
                    367:  *exc = 0;
                    368:  return ((Gdome_xml_DOMImplementation *)self)->vtab->hasFeature (self, feature, version, exc);
                    369: }
                    370: /**
                    371:  * gdome_di_freeDoc:
                    372:  * @self:  DOMImplementation Object ref
                    373:  * @doc:  The Document Object ref to be freed
                    374:  * @exc:  Exception Object ref
                    375:  *
                    376:  * DEPRECATED!
                    377:  * Free all objects and structures associated to the Document specified.
                    378:  */
                    379: void
                    380: gdome_di_freeDoc (GdomeDOMImplementation *self, GdomeDocument *doc, GdomeException *exc)
                    381: {
                    382:  if (self == NULL) {
                    383:    *exc = GDOME_NULL_POINTER_ERR;
                    384:    return;
                    385:  }
                    386:  *exc = 0;
                    387:  ((Gdome_xml_DOMImplementation *)self)->vtab->freeDoc (self, doc, exc);
                    388: }
                    389: /**
                    390:  * gdome_di_createDocFromURI:
                    391:  * @self:  DOMImplementation Object ref
                    392:  * @uri:  the uri of XML file to load
                    393:  * @mode:  specifies if the document is to be parsed, validated or recovered
                    394:  *         and if the entity substitution has to be done.
                    395:  * @exc:  Exception Object ref
                    396:  *
                    397:  * Loads a XML Document from a URI and build a DOM tree. If @mode is
                    398:  * %GDOME_LOAD_PARSING the document must be well formed, if @mode is
                    399:  * %GDOME_LOAD_VALIDATING the document must valid and if @mode is
                    400:  * %GDOME_LOAD_RECOVERING a tree is built anyway.
                    401:  * If the %GDOME_LOAD_SUBSTITUTE_ENTITIES flag is added, entity substitution is
                    402:  * performed (es. @mode = %GDOME_LOAD_PARSING | %GDOME_LOAD_SUBSTITUTE_ENTITIES
                    403:  * ).
                    404:  * If the %GDOME_LOAD_COMPLETE_ATTR flag is set, the tree is populated
                    405:  * with default attributes from the DTD.
                    406:  * Returns: The Document Object of the created tree or %NULL if an error occur.
                    407:  */
                    408: GdomeDocument *
                    409: gdome_di_createDocFromURI (GdomeDOMImplementation *self, const char *uri, unsigned int mode, GdomeException *exc)
                    410: {
                    411:  if (self == NULL) {
                    412:    *exc = GDOME_NULL_POINTER_ERR;
                    413:    return NULL;
                    414:  }
                    415:  *exc = 0;
                    416:  return ((Gdome_xml_DOMImplementation *)self)->vtab->createDocFromURI (self, uri, mode, exc);
                    417: }
                    418: /**
                    419:  * gdome_di_createDocFromMemory:
                    420:  * @self:  DOMImplementation Object ref
                    421:  * @buffer:  a pointer to char array that holds the XML document
                    422:  * @mode:  specifies if the document is to be parsed, validated or recovered
                    423:  *         and if the entity substitution has to be done.
                    424:  * @exc:  Exception Object ref
                    425:  *
                    426:  * Loads a XML Document from a memory buffer and build a DOM tree. If @mode is
                    427:  * %GDOME_LOAD_PARSING the document must be well formed, if @mode is
                    428:  * %GDOME_LOAD_VALIDATING the document must valid and if @mode is
                    429:  * %GDOME_LOAD_RECOVERING a tree is built anyway.
                    430:  * If the %GDOME_LOAD_SUBSTITUTE_ENTITIES flag is added, entity substitution is
                    431:  * performed (es. @mode = %GDOME_LOAD_PARSING | %GDOME_LOAD_SUBSTITUTE_ENTITIES
                    432:  * ).
                    433:  * If the %GDOME_LOAD_COMPLETE_ATTR flag is set, the tree is populated
                    434:  * with default attributes from the DTD.
                    435:  * Returns: The Document Object of the created tree or %NULL if an error occur.
                    436:  */
                    437: GdomeDocument *
                    438: gdome_di_createDocFromMemory (GdomeDOMImplementation *self, char *buffer, unsigned int mode, GdomeException *exc)
                    439: {
                    440:  if (self == NULL) {
                    441:    *exc = GDOME_NULL_POINTER_ERR;
                    442:    return NULL;
                    443:  }
                    444:  *exc = 0;
                    445:  return ((Gdome_xml_DOMImplementation *)self)->vtab->createDocFromMemory (self, buffer, mode, exc);
                    446: }
                    447: /**
                    448:  * gdome_di_createDocFromURIWithEntitiesTable:
                    449:  * @self:  DOMImplementation Object ref
                    450:  * @uri:  the uri of XML file to load
                    451:  * @entityTable:  array of #GdomeEntitiesTableEntry that define name, value,
                    452:  *                publicID ans systemID of entities used but not declared
                    453:  *                in DTD. The array must be NULL terminated.
                    454:  * @mode:  specifies if the document is to be parsed, validated or recovered
                    455:  *         and if the entity substitution has to be done.
                    456:  * @exc:  Exception Object ref
                    457:  *
                    458:  * Loads a XML Document using also entity declaration specified in @entityTable
                    459:  * from a URI and build a DOM tree. If @mode is %GDOME_LOAD_PARSING the
                    460:  * document must be well formed, if @mode is %GDOME_LOAD_VALIDATING the
                    461:  * document must valid and if @mode is %GDOME_LOAD_RECOVERING a tree is built
                    462:  * anyway.
                    463:  * If the %GDOME_LOAD_SUBSTITUTE_ENTITIES flag is added, entity substitution is
                    464:  * performed (es. @mode = %GDOME_LOAD_PARSING | %GDOME_LOAD_SUBSTITUTE_ENTITIES
                    465:  * ).
                    466:  * If the %GDOME_LOAD_COMPLETE_ATTR flag is set, the tree is populated
                    467:  * with default attributes from the DTD.
                    468:  * Returns: The Document Object of the created tree or %NULL if an error occur.
                    469:  */
                    470: GdomeDocument *
                    471: gdome_di_createDocFromURIWithEntitiesTable (GdomeDOMImplementation *self, const char *uri, const GdomeEntitiesTableEntry entityTable[], unsigned int mode, GdomeException *exc)
                    472: {
                    473:  if (self == NULL) {
                    474:    *exc = GDOME_NULL_POINTER_ERR;
                    475:    return NULL;
                    476:  }
                    477:  *exc = 0;
                    478:  return ((Gdome_xml_DOMImplementation *)self)->vtab->createDocFromURIWithEntitiesTable (self, uri, entityTable, mode, exc);
                    479: }
                    480: /**
                    481:  * gdome_di_createDocFromMemoryWithEntitiesTable:
                    482:  * @self:  DOMImplementation Object ref
                    483:  * @buffer:  a pointer to char array that holds the XML document
                    484:  * @entityTable:  array of #GdomeEntitiesTableEntry that define name, value,
                    485:  *                publicID ans systemID of entities used but not declared
                    486:  *                in DTD. The array must be NULL terminated.
                    487:  * @mode:  specifies if the document is to be parsed, validated or recovered
                    488:  *         and if the entity substitution has to be done.
                    489:  * @exc:  Exception Object ref
                    490:  *
                    491:  * Loads a XML Document using also entity declaration specified in @entityTable
                    492:  * from a memory buffer and build a DOM tree. If @mode is %GDOME_LOAD_PARSING
                    493:  * the document must be well formed, if @mode is %GDOME_LOAD_VALIDATING the
                    494:  * document must valid and if @mode is %GDOME_LOAD_RECOVERING a tree is built
                    495:  * anyway.
                    496:  * If the %GDOME_LOAD_SUBSTITUTE_ENTITIES flag is added, entity substitution is
                    497:  * performed (es. @mode = %GDOME_LOAD_PARSING | %GDOME_LOAD_SUBSTITUTE_ENTITIES
                    498:  * ).
                    499:  * If the %GDOME_LOAD_COMPLETE_ATTR flag is set, the tree is populated
                    500:  * with default attributes from the DTD.
                    501:  * Returns: The Document Object of the created tree or %NULL if an error occur.
                    502:  */
                    503: GdomeDocument *
                    504: gdome_di_createDocFromMemoryWithEntitiesTable (GdomeDOMImplementation *self, char *buffer, const GdomeEntitiesTableEntry entityTable[], unsigned int mode, GdomeException *exc)
                    505: {
                    506:  if (self == NULL) {
                    507:    *exc = GDOME_NULL_POINTER_ERR;
                    508:    return NULL;
                    509:  }
                    510:  *exc = 0;
                    511:  return ((Gdome_xml_DOMImplementation *)self)->vtab->createDocFromMemoryWithEntitiesTable (self, buffer, entityTable, mode, exc);
                    512: }
                    513: /**
                    514:  * gdome_di_saveDocToFile:
                    515:  * @self:  DOMImplementation Object ref
                    516:  * @doc:  the Document of which the tree is wanted to be saved
                    517:  * @filename:  the XML filename to save
                    518:  * @mode:  the indentation mode wanted
                    519:  * @exc:  Exception Object ref
                    520:  *
                    521:  * Save the DOM tree of the Document specified to file.
                    522:  * Returns: %FALSE in case of failure, %TRUE otherwise.
                    523:  */
                    524: GdomeBoolean
                    525: gdome_di_saveDocToFile (GdomeDOMImplementation *self, GdomeDocument *doc, const char *filename, GdomeSavingCode mode, GdomeException *exc)
                    526: {
                    527:  if (self == NULL) {
                    528:    *exc = GDOME_NULL_POINTER_ERR;
                    529:    return FALSE;
                    530:  }
                    531:  *exc = 0;
                    532:  return ((Gdome_xml_DOMImplementation *)self)->vtab->saveDocToFile (self, doc, filename, mode, exc);
                    533: }
                    534: /**
                    535:  * gdome_di_saveDocToFileEnc:
                    536:  * @self:  DOMImplementation Object ref
                    537:  * @doc:  the Document of which the tree is wanted to be saved
                    538:  * @filename:  the XML filename to save
                    539:  * @encoding:  character encoding to use when generating XML text
                    540:  * @mode:  the indentation mode wanted
                    541:  * @exc:  Exception Object ref
                    542:  *
                    543:  * Save the DOM tree of the Document specified to file with the specified
                    544:  * Character encoding.
                    545:  * Returns: %FALSE in case of failure, %TRUE otherwise.
                    546:  */
                    547: GdomeBoolean
                    548: gdome_di_saveDocToFileEnc (GdomeDOMImplementation *self, GdomeDocument *doc, const char *filename, const char *encoding, GdomeSavingCode mode, GdomeException *exc)
                    549: {
                    550:  if (self == NULL) {
                    551:    *exc = GDOME_NULL_POINTER_ERR;
                    552:    return FALSE;
                    553:  }
                    554:  *exc = 0;
                    555:  return ((Gdome_xml_DOMImplementation *)self)->vtab->saveDocToFileEnc (self, doc, filename, encoding, mode, exc);
                    556: }
                    557: /**
                    558:  * gdome_di_saveDocToMemory:
                    559:  * @self:  DOMImplementation Object ref
                    560:  * @doc:  the Document of which the tree is wanted to be saved
                    561:  * @mem:  the memory pointer where the saved document is returned
                    562:  * @mode:  the indentation mode wanted
                    563:  * @exc:  Exception Object ref
                    564:  *
                    565:  * Save the DOM tree of the Document specified to a new allocated memory and
                    566:  * return it in the @mem pointer.
                    567:  * Returns: %FALSE in case of failure, %TRUE otherwise.
                    568:  */
                    569: GdomeBoolean
                    570: gdome_di_saveDocToMemory (GdomeDOMImplementation *self, GdomeDocument *doc, char **mem, GdomeSavingCode mode, GdomeException *exc)
                    571: {
                    572:  if (self == NULL) {
                    573:    *exc = GDOME_NULL_POINTER_ERR;
                    574:    return FALSE;
                    575:  }
                    576:  *exc = 0;
                    577:  return ((Gdome_xml_DOMImplementation *)self)->vtab->saveDocToMemory (self, doc, mem, mode, exc);
                    578: }
                    579: /**
                    580:  * gdome_di_saveDocToMemoryEnc:
                    581:  * @self:  DOMImplementation Object ref
                    582:  * @doc:  the Document of which the tree is wanted to be saved
                    583:  * @mem:  the memory pointer where the saved document is returned
                    584:  * @encoding:  character encoding to use when generating XML text
                    585:  * @mode:  the indentation mode wanted
                    586:  * @exc:  Exception Object ref
                    587:  *
                    588:  * Save the DOM tree of the Document specified using the specified character
                    589:  * encoding standard to a new allocated memory and return it in the @mem
                    590:  * pointer.
                    591:  * Returns: %FALSE in case of failure, %TRUE otherwise.
                    592:  */
                    593: GdomeBoolean
                    594: gdome_di_saveDocToMemoryEnc (GdomeDOMImplementation *self, GdomeDocument *doc, char **mem, const char *encoding, GdomeSavingCode mode, GdomeException *exc)
                    595: {
                    596:  if (self == NULL) {
                    597:    *exc = GDOME_NULL_POINTER_ERR;
                    598:    return FALSE;
                    599:  }
                    600:  *exc = 0;
                    601:  return ((Gdome_xml_DOMImplementation *)self)->vtab->saveDocToMemoryEnc (self, doc, mem, encoding, mode, exc);
                    602: }
                    603: /**
                    604:  * gdome_di_enableEvent:
                    605:  * @self:  DOMImplementation Object ref
                    606:  * @doc:  the Document on which we want to enable events
                    607:  * @name:  the name of the event type to enable
                    608:  * @exc:  Exception Object ref
                    609:  *
                    610:  * Enables the propagation of the event type specified.
                    611:  */
                    612: void
                    613: gdome_di_enableEvent (GdomeDOMImplementation *self, GdomeDocument *doc, const char *name, GdomeException *exc)
                    614: {
                    615:  if (self == NULL) {
                    616:    *exc = GDOME_NULL_POINTER_ERR;
                    617:    return;
                    618:  }
                    619:  *exc = 0;
                    620:  ((Gdome_xml_DOMImplementation *)self)->vtab->enableEvent (self, doc, name, exc);
                    621: }
                    622: /**
                    623:  * gdome_di_disableEvent:
                    624:  * @self:  DOMImplementation Object ref
                    625:  * @doc:  the Document on which we want to disable events
                    626:  * @name:  the name of the event type to disable
                    627:  * @exc:  Exception Object ref
                    628:  *
                    629:  * Disables the propagation of the event type specified.
                    630:  */
                    631: void
                    632: gdome_di_disableEvent (GdomeDOMImplementation *self, GdomeDocument *doc, const char *name, GdomeException *exc)
                    633: {
                    634:  if (self == NULL) {
                    635:    *exc = GDOME_NULL_POINTER_ERR;
                    636:    return;
                    637:  }
                    638:  *exc = 0;
                    639:  ((Gdome_xml_DOMImplementation *)self)->vtab->disableEvent (self, doc, name, exc);
                    640: }
                    641: /**
                    642:  * gdome_di_eventIsEnabled:
                    643:  * @self:  DOMImplementation Object ref
                    644:  * @doc:  the Document on which we want to make the check
                    645:  * @name:  the name of the event type to check
                    646:  * @exc:  Exception Object ref
                    647:  *
                    648:  * Checks if the specified event type is enabled.
                    649:  * Returns: %TRUE if the event type specified is enabled, %FALSE otherwise.
                    650:  */
                    651: GdomeBoolean
                    652: gdome_di_eventIsEnabled (GdomeDOMImplementation *self, GdomeDocument *doc, const char *name, GdomeException *exc)
                    653: {
                    654:  if (self == NULL) {
                    655:    *exc = GDOME_NULL_POINTER_ERR;
                    656:    return FALSE;
                    657:  }
                    658:  *exc = 0;
                    659:  return ((Gdome_xml_DOMImplementation *)self)->vtab->eventIsEnabled (self, doc, name, exc);
                    660: }
                    661: 
                    662: /******************************************************************************
1.2     ! paf       663:           xmlNode interface API
1.1       paf       664:  ******************************************************************************/
                    665: /**
                    666:  * gdome_n_attributes:
                    667:  * @self:  Node Object ref
                    668:  * @exc:  Exception Object ref
                    669:  *
                    670:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                    671:  * Element) or %NULL otherwise.
                    672:  */
                    673: GdomeNamedNodeMap *
1.2     ! paf       674: gdome_n_attributes (xmlNode *self, GdomeException *exc)
1.1       paf       675: {
                    676:  if (self == NULL) {
                    677:    *exc = GDOME_NULL_POINTER_ERR;
                    678:    return NULL;
                    679:  }
                    680:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    681:    *exc = GDOME_INVALID_STATE_ERR;
                    682:    return NULL;
                    683:  }
                    684:  *exc = 0;
                    685:  return ((Gdome_xml_Node *)self)->vtab->attributes (self, exc);
                    686: }
                    687: /**
                    688:  * gdome_n_childNodes:
                    689:  * @self:  Node Object ref
                    690:  * @exc:  Exception Object ref
                    691:  *
                    692:  * Returns: a NodeList that contains all children of this node. If there are no
                    693:  * children, this is a NodeList containing no nodes.  Note that attributes are
                    694:  * not considered to be children of element nodes - use gdome_n_attributes to
                    695:  * obtain the attributes.
                    696:  */
                    697: GdomeNodeList *
1.2     ! paf       698: gdome_n_childNodes (xmlNode *self, GdomeException *exc)
1.1       paf       699: {
                    700:  if (self == NULL) {
                    701:    *exc = GDOME_NULL_POINTER_ERR;
                    702:    return NULL;
                    703:  }
                    704:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    705:    *exc = GDOME_INVALID_STATE_ERR;
                    706:    return NULL;
                    707:  }
                    708:  *exc = 0;
                    709:  return ((Gdome_xml_Node *)self)->vtab->childNodes (self, exc);
                    710: }
                    711: /**
                    712:  * gdome_n_firstChild:
                    713:  * @self:  Node Object ref
                    714:  * @exc:  Exception Object ref
                    715:  * 
                    716:  * Returns: the first child of this node. If there is no such node,
                    717:  * this returns %NULL.
                    718:  */
1.2     ! paf       719: xmlNode *
        !           720: gdome_n_firstChild (xmlNode *self, GdomeException *exc)
1.1       paf       721: {
                    722:  if (self == NULL) {
                    723:    *exc = GDOME_NULL_POINTER_ERR;
                    724:    return NULL;
                    725:  }
                    726:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    727:    *exc = GDOME_INVALID_STATE_ERR;
                    728:    return NULL;
                    729:  }
                    730:  *exc = 0;
                    731:  return ((Gdome_xml_Node *)self)->vtab->firstChild (self, exc);
                    732: }
                    733: /**
                    734:  * gdome_n_lastChild:
                    735:  * @self:  Node Object ref
                    736:  * @exc:  Exception Object ref
                    737:  *
                    738:  * Returns: the last child of this node. If there is no such node,
                    739:  * this returns %NULL.
                    740:  */
1.2     ! paf       741: xmlNode *
        !           742: gdome_n_lastChild (xmlNode *self, GdomeException *exc)
1.1       paf       743: {
                    744:  if (self == NULL) {
                    745:    *exc = GDOME_NULL_POINTER_ERR;
                    746:    return NULL;
                    747:  }
                    748:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    749:    *exc = GDOME_INVALID_STATE_ERR;
                    750:    return NULL;
                    751:  }
                    752:  *exc = 0;
                    753:  return ((Gdome_xml_Node *)self)->vtab->lastChild (self, exc);
                    754: }
                    755: /**
                    756:  * gdome_n_localName:
                    757:  * @self:  Node Objects ref
                    758:  * @exc:  Exception Object ref
                    759:  *
                    760:  * Returns: the local part of the qualified name of this node.
                    761:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                    762:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                    763:  * always %NULL.
                    764:  */
                    765: GdomeDOMString *
1.2     ! paf       766: gdome_n_localName (xmlNode *self, GdomeException *exc)
1.1       paf       767: {
                    768:  if (self == NULL) {
                    769:    *exc = GDOME_NULL_POINTER_ERR;
                    770:    return NULL;
                    771:  }
                    772:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    773:    *exc = GDOME_INVALID_STATE_ERR;
                    774:    return NULL;
                    775:  }
                    776:  *exc = 0;
                    777:  return ((Gdome_xml_Node *)self)->vtab->localName (self, exc);
                    778: }
                    779: /**
                    780:  * gdome_n_namespaceURI:
                    781:  * @self:  Node Objects ref
                    782:  * @exc:  Exception Object ref
                    783:  *
                    784:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                    785:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                    786:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                    787:  * always %NULL.
                    788:  */
                    789: GdomeDOMString *
1.2     ! paf       790: gdome_n_namespaceURI (xmlNode *self, GdomeException *exc)
1.1       paf       791: {
                    792:  if (self == NULL) {
                    793:    *exc = GDOME_NULL_POINTER_ERR;
                    794:    return NULL;
                    795:  }
                    796:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    797:    *exc = GDOME_INVALID_STATE_ERR;
                    798:    return NULL;
                    799:  }
                    800:  *exc = 0;
                    801:  return ((Gdome_xml_Node *)self)->vtab->namespaceURI (self, exc);
                    802: }
                    803: /**
                    804:  * gdome_n_nextSibling:
                    805:  * @self:  Node Object ref
                    806:  * @exc:  Exception Object ref
                    807:  *
                    808:  * Returns: the node immediately following this node. If there is no such
                    809:  * node, this returns %NULL.
                    810:  */
1.2     ! paf       811: xmlNode *
        !           812: gdome_n_nextSibling (xmlNode *self, GdomeException *exc)
1.1       paf       813: {
                    814:  if (self == NULL) {
                    815:    *exc = GDOME_NULL_POINTER_ERR;
                    816:    return NULL;
                    817:  }
                    818:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    819:    *exc = GDOME_INVALID_STATE_ERR;
                    820:    return NULL;
                    821:  }
                    822:  *exc = 0;
                    823:  return ((Gdome_xml_Node *)self)->vtab->nextSibling (self, exc);
                    824: }
                    825: /**
                    826:  * gdome_n_nodeName:
                    827:  * @self:  Node Object ref
                    828:  * @exc:  Exception Object ref
                    829:  *
                    830:  * Returns: the name of this node, depending on its type.
                    831:  */
                    832: GdomeDOMString *
1.2     ! paf       833: gdome_n_nodeName (xmlNode *self, GdomeException *exc)
1.1       paf       834: {
                    835:  if (self == NULL) {
                    836:    *exc = GDOME_NULL_POINTER_ERR;
                    837:    return NULL;
                    838:  }
                    839:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    840:    *exc = GDOME_INVALID_STATE_ERR;
                    841:    return NULL;
                    842:  }
                    843:  *exc = 0;
                    844:  return ((Gdome_xml_Node *)self)->vtab->nodeName (self, exc);
                    845: }
                    846: /**
                    847:  * gdome_n_nodeType:
                    848:  * @self:  Node Object ref
                    849:  * @exc:  Exception Object ref
                    850:  *
                    851:  * Returns: an integer bigger than %0 representing the type of the underlying
                    852:  * object or %0 on error.
                    853:  */
                    854: unsigned short
1.2     ! paf       855: gdome_n_nodeType (xmlNode *self, GdomeException *exc)
1.1       paf       856: {
                    857:  if (self == NULL) {
                    858:    *exc = GDOME_NULL_POINTER_ERR;
                    859:    return 0;
                    860:  }
                    861:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    862:    *exc = GDOME_INVALID_STATE_ERR;
                    863:    return 0;
                    864:  }
                    865:  *exc = 0;
                    866:  return ((Gdome_xml_Node *)self)->vtab->nodeType (self, exc);
                    867: }
                    868: /**
                    869:  * gdome_n_nodeValue:
                    870:  * @self:  Node Object ref
                    871:  * @exc:  Exception Object ref
                    872:  *
                    873:  * Returns: the value of this node, depending on its type.
                    874:  */
                    875: GdomeDOMString *
1.2     ! paf       876: gdome_n_nodeValue (xmlNode *self, GdomeException *exc)
1.1       paf       877: {
                    878:  if (self == NULL) {
                    879:    *exc = GDOME_NULL_POINTER_ERR;
                    880:    return NULL;
                    881:  }
                    882:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    883:    *exc = GDOME_INVALID_STATE_ERR;
                    884:    return NULL;
                    885:  }
                    886:  *exc = 0;
                    887:  return ((Gdome_xml_Node *)self)->vtab->nodeValue (self, exc);
                    888: }
                    889: /**
                    890:  * gdome_n_set_nodeValue:
                    891:  * @self:  Node Object ref
                    892:  * @nodeValue:  The new value for this node.
                    893:  * @exc:  Exception Object ref
                    894:  *
                    895:  * Sets The value of this node, depending on its type.
                    896:  *
                    897:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                    898:  */
                    899: void
1.2     ! paf       900: gdome_n_set_nodeValue (xmlNode *self, GdomeDOMString *nodeValue, GdomeException *exc)
1.1       paf       901: {
                    902:  if (self == NULL) {
                    903:    *exc = GDOME_NULL_POINTER_ERR;
                    904:    return;
                    905:  }
                    906:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    907:    *exc = GDOME_INVALID_STATE_ERR;
                    908:    return;
                    909:  }
                    910:  *exc = 0;
                    911:  ((Gdome_xml_Node *)self)->vtab->set_nodeValue (self, nodeValue, exc);
                    912: }
                    913: /**
                    914:  * gdome_n_ownerDocument:
                    915:  * @self:  Node Objects ref
                    916:  * @exc:  Exception Object ref
                    917:  *
                    918:  * Returns: the documment object associated with this node. This is also the
                    919:  * Document object used to create new nodes. When this node is a Document or a
                    920:  * DocumentType which is not used with any Document yet, this is %NULL.
                    921:  */
                    922: GdomeDocument *
1.2     ! paf       923: gdome_n_ownerDocument (xmlNode *self, GdomeException *exc)
1.1       paf       924: {
                    925:  if (self == NULL) {
                    926:    *exc = GDOME_NULL_POINTER_ERR;
                    927:    return NULL;
                    928:  }
                    929:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    930:    *exc = GDOME_INVALID_STATE_ERR;
                    931:    return NULL;
                    932:  }
                    933:  *exc = 0;
                    934:  return ((Gdome_xml_Node *)self)->vtab->ownerDocument (self, exc);
                    935: }
                    936: /**
                    937:  * gdome_n_parentNode:
                    938:  * @self: Node Object ref
                    939:  * @exc: Exception Object ref
                    940:  *
                    941:  * Returns: the parent of this node. All nodes, except Attr,
                    942:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                    943:  * if a node has just been created and not yet added to the tree, or if it has
                    944:  * been removed from the tree, this is %NULL.
                    945:  */
1.2     ! paf       946: xmlNode *
        !           947: gdome_n_parentNode (xmlNode *self, GdomeException *exc)
1.1       paf       948: {
                    949:  if (self == NULL) {
                    950:    *exc = GDOME_NULL_POINTER_ERR;
                    951:    return NULL;
                    952:  }
                    953:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    954:    *exc = GDOME_INVALID_STATE_ERR;
                    955:    return NULL;
                    956:  }
                    957:  *exc = 0;
                    958:  return ((Gdome_xml_Node *)self)->vtab->parentNode (self, exc);
                    959: }
                    960: /**
                    961:  * gdome_n_prefix:
                    962:  * @self:  Node Objects ref
                    963:  * @exc:  Exception Object ref
                    964:  *
                    965:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                    966:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                    967:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                    968:  * always %NULL.
                    969:  */
                    970: GdomeDOMString *
1.2     ! paf       971: gdome_n_prefix (xmlNode *self, GdomeException *exc)
1.1       paf       972: {
                    973:  if (self == NULL) {
                    974:    *exc = GDOME_NULL_POINTER_ERR;
                    975:    return NULL;
                    976:  }
                    977:  if (((Gdome_xml_Node *)self)->n == NULL) {
                    978:    *exc = GDOME_INVALID_STATE_ERR;
                    979:    return NULL;
                    980:  }
                    981:  *exc = 0;
                    982:  return ((Gdome_xml_Node *)self)->vtab->prefix (self, exc);
                    983: }
                    984: /**
                    985:  * gdome_n_set_prefix:
                    986:  * @self:  Node Object ref
                    987:  * @prefix:  The new prefix for this node.
                    988:  * @exc:  Exception Object ref
                    989:  *
                    990:  * Sets a new nemaspace prefix for this node.
                    991:  *
                    992:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                    993:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                    994:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                    995:  * if the specified prefix is "xml" and the namespaceURI of this node is
                    996:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                    997:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                    998:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                    999:  * an attribute and the qualifiedName of this node is "xmlns".
                   1000:  */
                   1001: void
1.2     ! paf      1002: gdome_n_set_prefix (xmlNode *self, GdomeDOMString *prefix, GdomeException *exc)
1.1       paf      1003: {
                   1004:  if (self == NULL) {
                   1005:    *exc = GDOME_NULL_POINTER_ERR;
                   1006:    return;
                   1007:  }
                   1008:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1009:    *exc = GDOME_INVALID_STATE_ERR;
                   1010:    return;
                   1011:  }
                   1012:  *exc = 0;
                   1013:  ((Gdome_xml_Node *)self)->vtab->set_prefix (self, prefix, exc);
                   1014: }
                   1015: /**
                   1016:  * gdome_n_previousSibling:
                   1017:  * @self:  Node Object ref
                   1018:  * @exc:  Exception Object ref
                   1019:  *
                   1020:  * Returns: the node immediately preceding this node. If there is no such
                   1021:  * node, this returns %NULL.
                   1022:  */
1.2     ! paf      1023: xmlNode *
        !          1024: gdome_n_previousSibling (xmlNode *self, GdomeException *exc)
1.1       paf      1025: {
                   1026:  if (self == NULL) {
                   1027:    *exc = GDOME_NULL_POINTER_ERR;
                   1028:    return NULL;
                   1029:  }
                   1030:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1031:    *exc = GDOME_INVALID_STATE_ERR;
                   1032:    return NULL;
                   1033:  }
                   1034:  *exc = 0;
                   1035:  return ((Gdome_xml_Node *)self)->vtab->previousSibling (self, exc);
                   1036: }
                   1037: /**
                   1038:  * gdome_n_ref:
                   1039:  * @self:  Node Object ref
                   1040:  * @exc:  Exception Object ref
                   1041:  *
                   1042:  * Increase the reference count of the specified Node.
                   1043:  */
                   1044: void
1.2     ! paf      1045: gdome_n_ref (xmlNode *self, GdomeException *exc)
1.1       paf      1046: {
                   1047:  if (self == NULL) {
                   1048:    *exc = GDOME_NULL_POINTER_ERR;
                   1049:    return;
                   1050:  }
                   1051:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1052:    *exc = GDOME_INVALID_STATE_ERR;
                   1053:    return;
                   1054:  }
                   1055:  *exc = 0;
                   1056:  ((Gdome_xml_Node *)self)->vtab->ref (self, exc);
                   1057: }
                   1058: /**
                   1059:  * gdome_n_unref:
                   1060:  * @self:  Node Object ref
                   1061:  * @exc:  Exception Object ref
                   1062:  *
                   1063:  * Decrease the reference count of the specified Node. Free the Node structure
                   1064:  * if the Node will have zero reference.
                   1065:  */
                   1066: void
1.2     ! paf      1067: gdome_n_unref (xmlNode *self, GdomeException *exc)
1.1       paf      1068: {
                   1069:  if (self == NULL) {
                   1070:    *exc = GDOME_NULL_POINTER_ERR;
                   1071:    return;
                   1072:  }
                   1073:  *exc = 0;
                   1074:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1075:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   1076:      ((Gdome_xml_Node *)self)->refcnt--;
                   1077: 
                   1078:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   1079: #ifdef DEBUG_REFCNT
                   1080:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   1081: #endif
                   1082:      g_free (self);
                   1083:    }
                   1084:    return;
                   1085:  }
                   1086:  ((Gdome_xml_Node *)self)->vtab->unref (self, exc);
                   1087: }
                   1088: /**
                   1089:  * gdome_n_query_interface:
                   1090:  * @self:  Node Object ref
                   1091:  * @interface:  interface needed
                   1092:  * @exc:  Exception Object ref
                   1093:  *
                   1094:  * Returns: a reference to this object that implements the @interface needed,
                   1095:  *          or %NULL if the @interface is not supported by this Object.
                   1096:  */
                   1097: gpointer
1.2     ! paf      1098: gdome_n_query_interface (xmlNode *self, const char *interface, GdomeException *exc)
1.1       paf      1099: {
                   1100:  if (self == NULL) {
                   1101:    *exc = GDOME_NULL_POINTER_ERR;
                   1102:    return NULL;
                   1103:  }
                   1104:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1105:    *exc = GDOME_INVALID_STATE_ERR;
                   1106:    return NULL;
                   1107:  }
                   1108:  *exc = 0;
                   1109:  return ((Gdome_xml_Node *)self)->vtab->query_interface (self, interface, exc);
                   1110: }
                   1111: /**
                   1112:  * gdome_n_appendChild:
                   1113:  * @self:  Node Object ref
                   1114:  * @newChild:  The node to add
                   1115:  * @exc:  Exception Object ref
                   1116:  *
                   1117:  * Adds the node @newChild to the end of the list of children of this node.
                   1118:  * If the @newChild is already in the tree, it is first removed. If it is a
                   1119:  * DocumentFragment node, the entire contents of the document fragment are
                   1120:  * moved into the child list of this node
                   1121:  *
                   1122:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   1123:  * allow children of the type of the @newChild node, or if the node to append is
                   1124:  * one of this node's ancestors or this node itself.
                   1125:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   1126:  * document than the one that created this node.
                   1127:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   1128:  * Returns: the node added.
                   1129:  */
1.2     ! paf      1130: xmlNode *
        !          1131: gdome_n_appendChild (xmlNode *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      1132: {
                   1133:  if (self == NULL) {
                   1134:    *exc = GDOME_NULL_POINTER_ERR;
                   1135:    return NULL;
                   1136:  }
                   1137:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1138:    *exc = GDOME_INVALID_STATE_ERR;
                   1139:    return NULL;
                   1140:  }
                   1141:  *exc = 0;
                   1142:  return ((Gdome_xml_Node *)self)->vtab->appendChild (self, newChild, exc);
                   1143: }
                   1144: /**
                   1145:  * gdome_n_cloneNode:
                   1146:  * @self:  Node Object ref
                   1147:  * @deep:  If true, recursively clone the subtree under the specified node;
                   1148:  *         if false, clone only the node itself (and its attributes, if it is
                   1149:  *         an Element).
                   1150:  * @exc:  Exception Object ref
                   1151:  *
                   1152:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   1153:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   1154:  * %NULL).
                   1155:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   1156:  * nodes are not supported.
                   1157:  *
                   1158:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   1159:  * supported.
                   1160:  * Returns: the duplicate node.
                   1161:  */
1.2     ! paf      1162: xmlNode *
        !          1163: gdome_n_cloneNode (xmlNode *self, GdomeBoolean deep, GdomeException *exc)
1.1       paf      1164: {
                   1165:  if (self == NULL) {
                   1166:    *exc = GDOME_NULL_POINTER_ERR;
                   1167:    return NULL;
                   1168:  }
                   1169:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1170:    *exc = GDOME_INVALID_STATE_ERR;
                   1171:    return NULL;
                   1172:  }
                   1173:  *exc = 0;
                   1174:  return ((Gdome_xml_Node *)self)->vtab->cloneNode (self, deep, exc);
                   1175: }
                   1176: /**
                   1177:  * gdome_n_hasAttributes:
                   1178:  * @self:  Node Object ref
                   1179:  * @exc:  Exception Object ref
                   1180:  *
                   1181:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   1182:  */
                   1183: GdomeBoolean
1.2     ! paf      1184: gdome_n_hasAttributes (xmlNode *self, GdomeException *exc)
1.1       paf      1185: {
                   1186:  if (self == NULL) {
                   1187:    *exc = GDOME_NULL_POINTER_ERR;
                   1188:    return FALSE;
                   1189:  }
                   1190:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1191:    *exc = GDOME_INVALID_STATE_ERR;
                   1192:    return FALSE;
                   1193:  }
                   1194:  *exc = 0;
                   1195:  return ((Gdome_xml_Node *)self)->vtab->hasAttributes (self, exc);
                   1196: }
                   1197: /**
                   1198:  * gdome_n_hasChildNodes:
                   1199:  * @self:  Node Object ref
                   1200:  * @exc:  Exception Object ref
                   1201:  *
                   1202:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   1203:  */
                   1204: GdomeBoolean
1.2     ! paf      1205: gdome_n_hasChildNodes (xmlNode *self, GdomeException *exc)
1.1       paf      1206: {
                   1207:  if (self == NULL) {
                   1208:    *exc = GDOME_NULL_POINTER_ERR;
                   1209:    return FALSE;
                   1210:  }
                   1211:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1212:    *exc = GDOME_INVALID_STATE_ERR;
                   1213:    return FALSE;
                   1214:  }
                   1215:  *exc = 0;
                   1216:  return ((Gdome_xml_Node *)self)->vtab->hasChildNodes (self, exc);
                   1217: }
                   1218: /**
                   1219:  * gdome_n_insertBefore:
                   1220:  * @self:  Node Object ref
                   1221:  * @newChild:  The new node to put in the child list
                   1222:  * @refChild:  the reference node, i.e., the node before which the new node
                   1223:  *             must be inserted.
                   1224:  * @exc:  Exception Object ref
                   1225:  *
                   1226:  * Inserts the node @newChild before the existing child node @refChild. If
                   1227:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   1228:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   1229:  * in the same order, before @refChild. If the @newChild is already in the
                   1230:  * tree, it is first removed.
                   1231:  *
                   1232:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   1233:  * allow children of the type of the @newChild node, or if the node to insert is
                   1234:  * one of this node's ancestors or this node itself.
                   1235:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   1236:  * document than the one that created this node.
                   1237:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   1238:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   1239:  * Returns: the node being inserted.
                   1240:  */
1.2     ! paf      1241: xmlNode *
        !          1242: gdome_n_insertBefore (xmlNode *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      1243: {
                   1244:  if (self == NULL) {
                   1245:    *exc = GDOME_NULL_POINTER_ERR;
                   1246:    return NULL;
                   1247:  }
                   1248:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1249:    *exc = GDOME_INVALID_STATE_ERR;
                   1250:    return NULL;
                   1251:  }
                   1252:  *exc = 0;
                   1253:  return ((Gdome_xml_Node *)self)->vtab->insertBefore (self, newChild, refChild, exc);
                   1254: }
                   1255: /**
                   1256:  * gdome_n_isSupported:
                   1257:  * @self:  Node Object ref
                   1258:  * @feature:  The name of the feature to test.
                   1259:  * @version:  This is the version number of the feature to test. In Level 2,
                   1260:  *            version 1, this is the string "2.0". If the version is not
                   1261:  *            specified, supporting any version of the feature will cause the
                   1262:  *            method to return %TRUE.
                   1263:  * @exc:  Exception Object ref
                   1264:  *
                   1265:  * Tests whether the DOM implementation implements a specific feature and that
                   1266:  * feature is supported by this node.
                   1267:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   1268:  * otherwise.
                   1269:  */
                   1270: GdomeBoolean
1.2     ! paf      1271: gdome_n_isSupported (xmlNode *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
1.1       paf      1272: {
                   1273:  if (self == NULL) {
                   1274:    *exc = GDOME_NULL_POINTER_ERR;
                   1275:    return FALSE;
                   1276:  }
                   1277:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1278:    *exc = GDOME_INVALID_STATE_ERR;
                   1279:    return FALSE;
                   1280:  }
                   1281:  *exc = 0;
                   1282:  return ((Gdome_xml_Node *)self)->vtab->isSupported (self, feature, version, exc);
                   1283: }
                   1284: /**
                   1285:  * gdome_n_normalize:
                   1286:  * @self:  Node Object ref
                   1287:  * @exc:  Exception Object ref
                   1288:  *
                   1289:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   1290:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   1291:  * elements, comments, processing instructions, CDATA sections, and entity
                   1292:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   1293:  * nodes nor empty Text nodes.
                   1294:  */
                   1295: void
1.2     ! paf      1296: gdome_n_normalize (xmlNode *self, GdomeException *exc)
1.1       paf      1297: {
                   1298:  if (self == NULL) {
                   1299:    *exc = GDOME_NULL_POINTER_ERR;
                   1300:    return;
                   1301:  }
                   1302:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1303:    *exc = GDOME_INVALID_STATE_ERR;
                   1304:    return;
                   1305:  }
                   1306:  *exc = 0;
                   1307:  ((Gdome_xml_Node *)self)->vtab->normalize (self, exc);
                   1308: }
                   1309: /**
                   1310:  * gdome_n_removeChild:
                   1311:  * @self:  Node Object ref
                   1312:  * @oldChild:  The node being removed
                   1313:  * @exc:  Exception Object ref
                   1314:  *
                   1315:  * Removes the child node indicated by @oldChild from the list of children, and
                   1316:  * returns it.
                   1317:  *
                   1318:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   1319:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   1320:  * Returns: the node removed.
                   1321:  */
1.2     ! paf      1322: xmlNode *
        !          1323: gdome_n_removeChild (xmlNode *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      1324: {
                   1325:  if (self == NULL) {
                   1326:    *exc = GDOME_NULL_POINTER_ERR;
                   1327:    return NULL;
                   1328:  }
                   1329:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1330:    *exc = GDOME_INVALID_STATE_ERR;
                   1331:    return NULL;
                   1332:  }
                   1333:  *exc = 0;
                   1334:  return ((Gdome_xml_Node *)self)->vtab->removeChild (self, oldChild, exc);
                   1335: }
                   1336: /**
                   1337:  * gdome_n_replaceChild:
                   1338:  * @self:  Node Object ref
                   1339:  * @newChild:  The new node to put in the child list
                   1340:  * @oldChild:  The node being replaced in the list
                   1341:  * @exc:  Exception Object ref
                   1342:  *
                   1343:  * Replaces the child node @oldChild with @newChild in the list of children,
                   1344:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   1345:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   1346:  * inserted in the same order. If the @newChild is already in the tree, it is
                   1347:  * first removed.
                   1348:  *
                   1349:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   1350:  * not allow children of the type of the @newChild node, or if the node to put
                   1351:  * in is one of this node's ancestors or this node itself.
                   1352:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   1353:  * document than the one that created this node.
                   1354:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   1355:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   1356:  * Returns: the node replaced.
                   1357:  */
1.2     ! paf      1358: xmlNode *
        !          1359: gdome_n_replaceChild (xmlNode *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      1360: {
                   1361:  if (self == NULL) {
                   1362:    *exc = GDOME_NULL_POINTER_ERR;
                   1363:    return NULL;
                   1364:  }
                   1365:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1366:    *exc = GDOME_INVALID_STATE_ERR;
                   1367:    return NULL;
                   1368:  }
                   1369:  *exc = 0;
                   1370:  return ((Gdome_xml_Node *)self)->vtab->replaceChild (self, newChild, oldChild, exc);
                   1371: }
                   1372: /**
                   1373:  * gdome_n_addEventListener:
                   1374:  * @self:  Node Object ref
                   1375:  * @type:  the event type for which the user is registering
                   1376:  * @listener:  the listener parameter takes an interface implemented by the
                   1377:  *             user which contains the methods to be called when the event occurs.
                   1378:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   1379:  *               capture. After initiating capture, all events of the specified
                   1380:  *               type will be dispatched to the registered EventListener before
                   1381:  *               being dispatched to any EventTargets beneath them in the tree.
                   1382:  *               Events which are bubbling upward through the tree will not
                   1383:  *               trigger an EventListener designated to use capture.
                   1384:  * @exc:  Exception Object ref
                   1385:  *
                   1386:  * This method allows the registration of event listeners on the event target.
                   1387:  * If an EventListener is added to an EventTarget while it is processing an
                   1388:  * event, it will not be triggered by the current actions but may be triggered
                   1389:  * during a later stage of event flow, such as the bubbling phase.
                   1390:  * If multiple identical EventListeners are registered on the same EventTarget
                   1391:  * with the same parameters the duplicate instances are discarded. They do not
                   1392:  * cause the EventListener to be called twice and since they are discarded
                   1393:  * they do not need to be removed with the removeEventListener method.
                   1394:  */
                   1395: void
1.2     ! paf      1396: gdome_n_addEventListener (xmlNode *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
1.1       paf      1397: {
                   1398:  if (self == NULL) {
                   1399:    *exc = GDOME_NULL_POINTER_ERR;
                   1400:    return;
                   1401:  }
                   1402:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1403:    *exc = GDOME_INVALID_STATE_ERR;
                   1404:    return;
                   1405:  }
                   1406:  *exc = 0;
                   1407:  ((Gdome_xml_Node *)self)->vtab->addEventListener (self, type, listener, useCapture, exc);
                   1408: }
                   1409: /**
                   1410:  * gdome_n_removeEventListener:
                   1411:  * @self:  Node Object ref
                   1412:  * @type:  Specifies the event type of the EventListener being removed.
                   1413:  * @listener:  The EventListener parameter indicates the EventListener to be
                   1414:  *             removed.
                   1415:  * @useCapture:  Specifies whether the EventListener being removed was
                   1416:  *               registered as a capturing listener or not. If a listener was
                   1417:  *               registered twice, one with capture and one without, each must
                   1418:  *               be removed separately. Removal of a capturing listener does
                   1419:  *               not affect a non-capturing version of the same listener, and
                   1420:  *               vice versa.
                   1421:  * @exc:  Exception Object ref
                   1422:  *
                   1423:  * This method allows the removal of event listeners from the event target. If
                   1424:  * an EventListener is removed from an EventTarget while it is processing an
                   1425:  * event, it will not be triggered by the current actions. EventListeners can
                   1426:  * never be invoked after being removed. Calling removeEventListener with
                   1427:  * arguments which do not identify any currently registered EventListener on
                   1428:  * the EventTarget has no effect.
                   1429:  */
                   1430: void
1.2     ! paf      1431: gdome_n_removeEventListener (xmlNode *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
1.1       paf      1432: {
                   1433:  if (self == NULL) {
                   1434:    *exc = GDOME_NULL_POINTER_ERR;
                   1435:    return;
                   1436:  }
                   1437:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1438:    *exc = GDOME_INVALID_STATE_ERR;
                   1439:    return;
                   1440:  }
                   1441:  *exc = 0;
                   1442:  ((Gdome_xml_Node *)self)->vtab->removeEventListener (self, type, listener, useCapture, exc);
                   1443: }
                   1444: /**
                   1445:  * gdome_n_dispatchEvent:
                   1446:  * @self:  Node Object ref
                   1447:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   1448:  *        used in processing the event.
                   1449:  * @exc:  Exception Object ref
                   1450:  *
                   1451:  * This method allows the dispatch of events into the implementations event
                   1452:  * model. Events dispatched in this manner will have the same capturing and
                   1453:  * bubbling behavior as events dispatched directly by the implementation. The
                   1454:  * target of the event is the EventTarget on which dispatchEvent is called.
                   1455:  *
                   1456:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   1457:  * specified by initializing the event before dispatchEvent was called.
                   1458:  * Specification of the Event's type as %NULL or an empty string will also
                   1459:  * trigger this exception.
                   1460:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   1461:  *          is %TRUE.
                   1462:  */
                   1463: GdomeBoolean
1.2     ! paf      1464: gdome_n_dispatchEvent (xmlNode *self, GdomeEvent *evt, GdomeException *exc)
1.1       paf      1465: {
                   1466:  if (self == NULL) {
                   1467:    *exc = GDOME_NULL_POINTER_ERR;
                   1468:    return FALSE;
                   1469:  }
                   1470:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1471:    *exc = GDOME_INVALID_STATE_ERR;
                   1472:    return FALSE;
                   1473:  }
                   1474:  *exc = 0;
                   1475:  return ((Gdome_xml_Node *)self)->vtab->dispatchEvent (self, evt, exc);
                   1476: }
                   1477: /**
                   1478:  * gdome_n_subTreeDispatchEvent:
                   1479:  * @self:  Node Object ref
                   1480:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   1481:  *        used in processing the event.
                   1482:  * @exc:  Exception Object ref
                   1483:  *
                   1484:  * This method allows the dispatch of events into the implementations event
                   1485:  * model. Events dispatched in this manner will have the same capturing and
                   1486:  * bubbling behavior as events dispatched directly by the implementation. The
                   1487:  * target of the event is any nodes in the subtree of the EventTarget on which
                   1488:  * dispatchEvent is called.
                   1489:  *
                   1490:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   1491:  * specified by initializing the event before dispatchEvent was called.
                   1492:  * Specification of the Event's type as %NULL or an empty string will also
                   1493:  * trigger this exception.
                   1494:  */
                   1495: void
1.2     ! paf      1496: gdome_n_subTreeDispatchEvent (xmlNode *self, GdomeEvent *evt, GdomeException *exc)
1.1       paf      1497: {
                   1498:  if (self == NULL) {
                   1499:    *exc = GDOME_NULL_POINTER_ERR;
                   1500:    return;
                   1501:  }
                   1502:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1503:    *exc = GDOME_INVALID_STATE_ERR;
                   1504:    return;
                   1505:  }
                   1506:  *exc = 0;
                   1507:  ((Gdome_xml_Node *)self)->vtab->subTreeDispatchEvent (self, evt, exc);
                   1508: }
                   1509: /**
                   1510:  * gdome_n_canAppend:
                   1511:  * @self:  Node Object ref
                   1512:  * @newChild:  The Node Object ref of the node to test
                   1513:  * @exc:  Exception Object ref
                   1514:  *
                   1515:  * Tests if a @newChild can be added in the child list of this node.
                   1516:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   1517:  */
                   1518: GdomeBoolean
1.2     ! paf      1519: gdome_n_canAppend (xmlNode *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      1520: {
                   1521:  if (self == NULL) {
                   1522:    *exc = GDOME_NULL_POINTER_ERR;
                   1523:    return FALSE;
                   1524:  }
                   1525:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1526:    *exc = GDOME_INVALID_STATE_ERR;
                   1527:    return FALSE;
                   1528:  }
                   1529:  *exc = 0;
                   1530:  return ((Gdome_xml_Node *)self)->vtab->canAppend (self, newChild, exc);
                   1531: }
                   1532: 
                   1533: /******************************************************************************
                   1534:           GdomeDocumentFragment interface API
                   1535:  ******************************************************************************/
                   1536: /**
                   1537:  * gdome_df_attributes:
                   1538:  * @self:  Node Object ref
                   1539:  * @exc:  Exception Object ref
                   1540:  *
                   1541:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   1542:  * Element) or %NULL otherwise.
                   1543:  */
                   1544: GdomeNamedNodeMap *
                   1545: gdome_df_attributes (GdomeDocumentFragment *self, GdomeException *exc)
                   1546: {
                   1547:  if (self == NULL) {
                   1548:    *exc = GDOME_NULL_POINTER_ERR;
                   1549:    return NULL;
                   1550:  }
                   1551:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1552:    *exc = GDOME_INVALID_STATE_ERR;
                   1553:    return NULL;
                   1554:  }
                   1555:  *exc = 0;
1.2     ! paf      1556:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      1557: }
                   1558: /**
                   1559:  * gdome_df_childNodes:
                   1560:  * @self:  Node Object ref
                   1561:  * @exc:  Exception Object ref
                   1562:  *
                   1563:  * Returns: a NodeList that contains all children of this node. If there are no
                   1564:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   1565:  * not considered to be children of element nodes - use gdome_n_attributes to
                   1566:  * obtain the attributes.
                   1567:  */
                   1568: GdomeNodeList *
                   1569: gdome_df_childNodes (GdomeDocumentFragment *self, GdomeException *exc)
                   1570: {
                   1571:  if (self == NULL) {
                   1572:    *exc = GDOME_NULL_POINTER_ERR;
                   1573:    return NULL;
                   1574:  }
                   1575:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1576:    *exc = GDOME_INVALID_STATE_ERR;
                   1577:    return NULL;
                   1578:  }
                   1579:  *exc = 0;
1.2     ! paf      1580:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      1581: }
                   1582: /**
                   1583:  * gdome_df_firstChild:
                   1584:  * @self:  Node Object ref
                   1585:  * @exc:  Exception Object ref
                   1586:  * 
                   1587:  * Returns: the first child of this node. If there is no such node,
                   1588:  * this returns %NULL.
                   1589:  */
1.2     ! paf      1590: xmlNode *
1.1       paf      1591: gdome_df_firstChild (GdomeDocumentFragment *self, GdomeException *exc)
                   1592: {
                   1593:  if (self == NULL) {
                   1594:    *exc = GDOME_NULL_POINTER_ERR;
                   1595:    return NULL;
                   1596:  }
                   1597:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1598:    *exc = GDOME_INVALID_STATE_ERR;
                   1599:    return NULL;
                   1600:  }
                   1601:  *exc = 0;
1.2     ! paf      1602:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      1603: }
                   1604: /**
                   1605:  * gdome_df_lastChild:
                   1606:  * @self:  Node Object ref
                   1607:  * @exc:  Exception Object ref
                   1608:  *
                   1609:  * Returns: the last child of this node. If there is no such node,
                   1610:  * this returns %NULL.
                   1611:  */
1.2     ! paf      1612: xmlNode *
1.1       paf      1613: gdome_df_lastChild (GdomeDocumentFragment *self, GdomeException *exc)
                   1614: {
                   1615:  if (self == NULL) {
                   1616:    *exc = GDOME_NULL_POINTER_ERR;
                   1617:    return NULL;
                   1618:  }
                   1619:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1620:    *exc = GDOME_INVALID_STATE_ERR;
                   1621:    return NULL;
                   1622:  }
                   1623:  *exc = 0;
1.2     ! paf      1624:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      1625: }
                   1626: /**
                   1627:  * gdome_df_localName:
                   1628:  * @self:  Node Objects ref
                   1629:  * @exc:  Exception Object ref
                   1630:  *
                   1631:  * Returns: the local part of the qualified name of this node.
                   1632:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   1633:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   1634:  * always %NULL.
                   1635:  */
                   1636: GdomeDOMString *
                   1637: gdome_df_localName (GdomeDocumentFragment *self, GdomeException *exc)
                   1638: {
                   1639:  if (self == NULL) {
                   1640:    *exc = GDOME_NULL_POINTER_ERR;
                   1641:    return NULL;
                   1642:  }
                   1643:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1644:    *exc = GDOME_INVALID_STATE_ERR;
                   1645:    return NULL;
                   1646:  }
                   1647:  *exc = 0;
1.2     ! paf      1648:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      1649: }
                   1650: /**
                   1651:  * gdome_df_namespaceURI:
                   1652:  * @self:  Node Objects ref
                   1653:  * @exc:  Exception Object ref
                   1654:  *
                   1655:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   1656:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   1657:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   1658:  * always %NULL.
                   1659:  */
                   1660: GdomeDOMString *
                   1661: gdome_df_namespaceURI (GdomeDocumentFragment *self, GdomeException *exc)
                   1662: {
                   1663:  if (self == NULL) {
                   1664:    *exc = GDOME_NULL_POINTER_ERR;
                   1665:    return NULL;
                   1666:  }
                   1667:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1668:    *exc = GDOME_INVALID_STATE_ERR;
                   1669:    return NULL;
                   1670:  }
                   1671:  *exc = 0;
1.2     ! paf      1672:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      1673: }
                   1674: /**
                   1675:  * gdome_df_nextSibling:
                   1676:  * @self:  Node Object ref
                   1677:  * @exc:  Exception Object ref
                   1678:  *
                   1679:  * Returns: the node immediately following this node. If there is no such
                   1680:  * node, this returns %NULL.
                   1681:  */
1.2     ! paf      1682: xmlNode *
1.1       paf      1683: gdome_df_nextSibling (GdomeDocumentFragment *self, GdomeException *exc)
                   1684: {
                   1685:  if (self == NULL) {
                   1686:    *exc = GDOME_NULL_POINTER_ERR;
                   1687:    return NULL;
                   1688:  }
                   1689:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1690:    *exc = GDOME_INVALID_STATE_ERR;
                   1691:    return NULL;
                   1692:  }
                   1693:  *exc = 0;
1.2     ! paf      1694:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      1695: }
                   1696: /**
                   1697:  * gdome_df_nodeName:
                   1698:  * @self:  Node Object ref
                   1699:  * @exc:  Exception Object ref
                   1700:  *
                   1701:  * Returns: the name of this node, depending on its type.
                   1702:  */
                   1703: GdomeDOMString *
                   1704: gdome_df_nodeName (GdomeDocumentFragment *self, GdomeException *exc)
                   1705: {
                   1706:  if (self == NULL) {
                   1707:    *exc = GDOME_NULL_POINTER_ERR;
                   1708:    return NULL;
                   1709:  }
                   1710:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1711:    *exc = GDOME_INVALID_STATE_ERR;
                   1712:    return NULL;
                   1713:  }
                   1714:  *exc = 0;
1.2     ! paf      1715:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      1716: }
                   1717: /**
                   1718:  * gdome_df_nodeType:
                   1719:  * @self:  Node Object ref
                   1720:  * @exc:  Exception Object ref
                   1721:  *
                   1722:  * Returns: an integer bigger than %0 representing the type of the underlying
                   1723:  * object or %0 on error.
                   1724:  */
                   1725: unsigned short
                   1726: gdome_df_nodeType (GdomeDocumentFragment *self, GdomeException *exc)
                   1727: {
                   1728:  if (self == NULL) {
                   1729:    *exc = GDOME_NULL_POINTER_ERR;
                   1730:    return 0;
                   1731:  }
                   1732:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1733:    *exc = GDOME_INVALID_STATE_ERR;
                   1734:    return 0;
                   1735:  }
                   1736:  *exc = 0;
1.2     ! paf      1737:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      1738: }
                   1739: /**
                   1740:  * gdome_df_nodeValue:
                   1741:  * @self:  Node Object ref
                   1742:  * @exc:  Exception Object ref
                   1743:  *
                   1744:  * Returns: the value of this node, depending on its type.
                   1745:  */
                   1746: GdomeDOMString *
                   1747: gdome_df_nodeValue (GdomeDocumentFragment *self, GdomeException *exc)
                   1748: {
                   1749:  if (self == NULL) {
                   1750:    *exc = GDOME_NULL_POINTER_ERR;
                   1751:    return NULL;
                   1752:  }
                   1753:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1754:    *exc = GDOME_INVALID_STATE_ERR;
                   1755:    return NULL;
                   1756:  }
                   1757:  *exc = 0;
1.2     ! paf      1758:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      1759: }
                   1760: /**
                   1761:  * gdome_df_set_nodeValue:
                   1762:  * @self:  Node Object ref
                   1763:  * @nodeValue:  The new value for this node.
                   1764:  * @exc:  Exception Object ref
                   1765:  *
                   1766:  * Sets The value of this node, depending on its type.
                   1767:  *
                   1768:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   1769:  */
                   1770: void
                   1771: gdome_df_set_nodeValue (GdomeDocumentFragment *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   1772: {
                   1773:  if (self == NULL) {
                   1774:    *exc = GDOME_NULL_POINTER_ERR;
                   1775:    return;
                   1776:  }
                   1777:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1778:    *exc = GDOME_INVALID_STATE_ERR;
                   1779:    return;
                   1780:  }
                   1781:  *exc = 0;
1.2     ! paf      1782:  ((Gdome_xml_DocumentFragment *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      1783: }
                   1784: /**
                   1785:  * gdome_df_ownerDocument:
                   1786:  * @self:  Node Objects ref
                   1787:  * @exc:  Exception Object ref
                   1788:  *
                   1789:  * Returns: the documment object associated with this node. This is also the
                   1790:  * Document object used to create new nodes. When this node is a Document or a
                   1791:  * DocumentType which is not used with any Document yet, this is %NULL.
                   1792:  */
                   1793: GdomeDocument *
                   1794: gdome_df_ownerDocument (GdomeDocumentFragment *self, GdomeException *exc)
                   1795: {
                   1796:  if (self == NULL) {
                   1797:    *exc = GDOME_NULL_POINTER_ERR;
                   1798:    return NULL;
                   1799:  }
                   1800:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1801:    *exc = GDOME_INVALID_STATE_ERR;
                   1802:    return NULL;
                   1803:  }
                   1804:  *exc = 0;
1.2     ! paf      1805:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      1806: }
                   1807: /**
                   1808:  * gdome_df_parentNode:
                   1809:  * @self: Node Object ref
                   1810:  * @exc: Exception Object ref
                   1811:  *
                   1812:  * Returns: the parent of this node. All nodes, except Attr,
                   1813:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   1814:  * if a node has just been created and not yet added to the tree, or if it has
                   1815:  * been removed from the tree, this is %NULL.
                   1816:  */
1.2     ! paf      1817: xmlNode *
1.1       paf      1818: gdome_df_parentNode (GdomeDocumentFragment *self, GdomeException *exc)
                   1819: {
                   1820:  if (self == NULL) {
                   1821:    *exc = GDOME_NULL_POINTER_ERR;
                   1822:    return NULL;
                   1823:  }
                   1824:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1825:    *exc = GDOME_INVALID_STATE_ERR;
                   1826:    return NULL;
                   1827:  }
                   1828:  *exc = 0;
1.2     ! paf      1829:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      1830: }
                   1831: /**
                   1832:  * gdome_df_prefix:
                   1833:  * @self:  Node Objects ref
                   1834:  * @exc:  Exception Object ref
                   1835:  *
                   1836:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   1837:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   1838:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   1839:  * always %NULL.
                   1840:  */
                   1841: GdomeDOMString *
                   1842: gdome_df_prefix (GdomeDocumentFragment *self, GdomeException *exc)
                   1843: {
                   1844:  if (self == NULL) {
                   1845:    *exc = GDOME_NULL_POINTER_ERR;
                   1846:    return NULL;
                   1847:  }
                   1848:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1849:    *exc = GDOME_INVALID_STATE_ERR;
                   1850:    return NULL;
                   1851:  }
                   1852:  *exc = 0;
1.2     ! paf      1853:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      1854: }
                   1855: /**
                   1856:  * gdome_df_set_prefix:
                   1857:  * @self:  Node Object ref
                   1858:  * @prefix:  The new prefix for this node.
                   1859:  * @exc:  Exception Object ref
                   1860:  *
                   1861:  * Sets a new nemaspace prefix for this node.
                   1862:  *
                   1863:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   1864:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   1865:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   1866:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   1867:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   1868:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   1869:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   1870:  * an attribute and the qualifiedName of this node is "xmlns".
                   1871:  */
                   1872: void
                   1873: gdome_df_set_prefix (GdomeDocumentFragment *self, GdomeDOMString *prefix, GdomeException *exc)
                   1874: {
                   1875:  if (self == NULL) {
                   1876:    *exc = GDOME_NULL_POINTER_ERR;
                   1877:    return;
                   1878:  }
                   1879:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1880:    *exc = GDOME_INVALID_STATE_ERR;
                   1881:    return;
                   1882:  }
                   1883:  *exc = 0;
1.2     ! paf      1884:  ((Gdome_xml_DocumentFragment *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      1885: }
                   1886: /**
                   1887:  * gdome_df_previousSibling:
                   1888:  * @self:  Node Object ref
                   1889:  * @exc:  Exception Object ref
                   1890:  *
                   1891:  * Returns: the node immediately preceding this node. If there is no such
                   1892:  * node, this returns %NULL.
                   1893:  */
1.2     ! paf      1894: xmlNode *
1.1       paf      1895: gdome_df_previousSibling (GdomeDocumentFragment *self, GdomeException *exc)
                   1896: {
                   1897:  if (self == NULL) {
                   1898:    *exc = GDOME_NULL_POINTER_ERR;
                   1899:    return NULL;
                   1900:  }
                   1901:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1902:    *exc = GDOME_INVALID_STATE_ERR;
                   1903:    return NULL;
                   1904:  }
                   1905:  *exc = 0;
1.2     ! paf      1906:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      1907: }
                   1908: /**
                   1909:  * gdome_df_ref:
                   1910:  * @self:  Node Object ref
                   1911:  * @exc:  Exception Object ref
                   1912:  *
                   1913:  * Increase the reference count of the specified Node.
                   1914:  */
                   1915: void
                   1916: gdome_df_ref (GdomeDocumentFragment *self, GdomeException *exc)
                   1917: {
                   1918:  if (self == NULL) {
                   1919:    *exc = GDOME_NULL_POINTER_ERR;
                   1920:    return;
                   1921:  }
                   1922:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1923:    *exc = GDOME_INVALID_STATE_ERR;
                   1924:    return;
                   1925:  }
                   1926:  *exc = 0;
1.2     ! paf      1927:  ((Gdome_xml_DocumentFragment *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      1928: }
                   1929: /**
                   1930:  * gdome_df_unref:
                   1931:  * @self:  Node Object ref
                   1932:  * @exc:  Exception Object ref
                   1933:  *
                   1934:  * Decrease the reference count of the specified Node. Free the Node structure
                   1935:  * if the Node will have zero reference.
                   1936:  */
                   1937: void
                   1938: gdome_df_unref (GdomeDocumentFragment *self, GdomeException *exc)
                   1939: {
                   1940:  if (self == NULL) {
                   1941:    *exc = GDOME_NULL_POINTER_ERR;
                   1942:    return;
                   1943:  }
                   1944:  *exc = 0;
                   1945:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1946:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   1947:      ((Gdome_xml_Node *)self)->refcnt--;
                   1948: 
                   1949:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   1950: #ifdef DEBUG_REFCNT
                   1951:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   1952: #endif
                   1953:      g_free (self);
                   1954:    }
                   1955:    return;
                   1956:  }
1.2     ! paf      1957:  ((Gdome_xml_DocumentFragment *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      1958: }
                   1959: /**
                   1960:  * gdome_df_query_interface:
                   1961:  * @self:  Node Object ref
                   1962:  * @interface:  interface needed
                   1963:  * @exc:  Exception Object ref
                   1964:  *
                   1965:  * Returns: a reference to this object that implements the @interface needed,
                   1966:  *          or %NULL if the @interface is not supported by this Object.
                   1967:  */
                   1968: gpointer
                   1969: gdome_df_query_interface (GdomeDocumentFragment *self, const char *interface, GdomeException *exc)
                   1970: {
                   1971:  if (self == NULL) {
                   1972:    *exc = GDOME_NULL_POINTER_ERR;
                   1973:    return NULL;
                   1974:  }
                   1975:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   1976:    *exc = GDOME_INVALID_STATE_ERR;
                   1977:    return NULL;
                   1978:  }
                   1979:  *exc = 0;
1.2     ! paf      1980:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      1981: }
                   1982: /**
                   1983:  * gdome_df_appendChild:
                   1984:  * @self:  Node Object ref
                   1985:  * @newChild:  The node to add
                   1986:  * @exc:  Exception Object ref
                   1987:  *
                   1988:  * Adds the node @newChild to the end of the list of children of this node.
                   1989:  * If the @newChild is already in the tree, it is first removed. If it is a
                   1990:  * DocumentFragment node, the entire contents of the document fragment are
                   1991:  * moved into the child list of this node
                   1992:  *
                   1993:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   1994:  * allow children of the type of the @newChild node, or if the node to append is
                   1995:  * one of this node's ancestors or this node itself.
                   1996:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   1997:  * document than the one that created this node.
                   1998:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   1999:  * Returns: the node added.
                   2000:  */
1.2     ! paf      2001: xmlNode *
        !          2002: gdome_df_appendChild (GdomeDocumentFragment *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      2003: {
                   2004:  if (self == NULL) {
                   2005:    *exc = GDOME_NULL_POINTER_ERR;
                   2006:    return NULL;
                   2007:  }
                   2008:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2009:    *exc = GDOME_INVALID_STATE_ERR;
                   2010:    return NULL;
                   2011:  }
                   2012:  *exc = 0;
1.2     ! paf      2013:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      2014: }
                   2015: /**
                   2016:  * gdome_df_cloneNode:
                   2017:  * @self:  Node Object ref
                   2018:  * @deep:  If true, recursively clone the subtree under the specified node;
                   2019:  *         if false, clone only the node itself (and its attributes, if it is
                   2020:  *         an Element).
                   2021:  * @exc:  Exception Object ref
                   2022:  *
                   2023:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   2024:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   2025:  * %NULL).
                   2026:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   2027:  * nodes are not supported.
                   2028:  *
                   2029:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   2030:  * supported.
                   2031:  * Returns: the duplicate node.
                   2032:  */
1.2     ! paf      2033: xmlNode *
1.1       paf      2034: gdome_df_cloneNode (GdomeDocumentFragment *self, GdomeBoolean deep, GdomeException *exc)
                   2035: {
                   2036:  if (self == NULL) {
                   2037:    *exc = GDOME_NULL_POINTER_ERR;
                   2038:    return NULL;
                   2039:  }
                   2040:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2041:    *exc = GDOME_INVALID_STATE_ERR;
                   2042:    return NULL;
                   2043:  }
                   2044:  *exc = 0;
1.2     ! paf      2045:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      2046: }
                   2047: /**
                   2048:  * gdome_df_hasAttributes:
                   2049:  * @self:  Node Object ref
                   2050:  * @exc:  Exception Object ref
                   2051:  *
                   2052:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   2053:  */
                   2054: GdomeBoolean
                   2055: gdome_df_hasAttributes (GdomeDocumentFragment *self, GdomeException *exc)
                   2056: {
                   2057:  if (self == NULL) {
                   2058:    *exc = GDOME_NULL_POINTER_ERR;
                   2059:    return FALSE;
                   2060:  }
                   2061:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2062:    *exc = GDOME_INVALID_STATE_ERR;
                   2063:    return FALSE;
                   2064:  }
                   2065:  *exc = 0;
1.2     ! paf      2066:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      2067: }
                   2068: /**
                   2069:  * gdome_df_hasChildNodes:
                   2070:  * @self:  Node Object ref
                   2071:  * @exc:  Exception Object ref
                   2072:  *
                   2073:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   2074:  */
                   2075: GdomeBoolean
                   2076: gdome_df_hasChildNodes (GdomeDocumentFragment *self, GdomeException *exc)
                   2077: {
                   2078:  if (self == NULL) {
                   2079:    *exc = GDOME_NULL_POINTER_ERR;
                   2080:    return FALSE;
                   2081:  }
                   2082:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2083:    *exc = GDOME_INVALID_STATE_ERR;
                   2084:    return FALSE;
                   2085:  }
                   2086:  *exc = 0;
1.2     ! paf      2087:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      2088: }
                   2089: /**
                   2090:  * gdome_df_insertBefore:
                   2091:  * @self:  Node Object ref
                   2092:  * @newChild:  The new node to put in the child list
                   2093:  * @refChild:  the reference node, i.e., the node before which the new node
                   2094:  *             must be inserted.
                   2095:  * @exc:  Exception Object ref
                   2096:  *
                   2097:  * Inserts the node @newChild before the existing child node @refChild. If
                   2098:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   2099:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   2100:  * in the same order, before @refChild. If the @newChild is already in the
                   2101:  * tree, it is first removed.
                   2102:  *
                   2103:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   2104:  * allow children of the type of the @newChild node, or if the node to insert is
                   2105:  * one of this node's ancestors or this node itself.
                   2106:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   2107:  * document than the one that created this node.
                   2108:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   2109:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   2110:  * Returns: the node being inserted.
                   2111:  */
1.2     ! paf      2112: xmlNode *
        !          2113: gdome_df_insertBefore (GdomeDocumentFragment *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      2114: {
                   2115:  if (self == NULL) {
                   2116:    *exc = GDOME_NULL_POINTER_ERR;
                   2117:    return NULL;
                   2118:  }
                   2119:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2120:    *exc = GDOME_INVALID_STATE_ERR;
                   2121:    return NULL;
                   2122:  }
                   2123:  *exc = 0;
1.2     ! paf      2124:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      2125: }
                   2126: /**
                   2127:  * gdome_df_isSupported:
                   2128:  * @self:  Node Object ref
                   2129:  * @feature:  The name of the feature to test.
                   2130:  * @version:  This is the version number of the feature to test. In Level 2,
                   2131:  *            version 1, this is the string "2.0". If the version is not
                   2132:  *            specified, supporting any version of the feature will cause the
                   2133:  *            method to return %TRUE.
                   2134:  * @exc:  Exception Object ref
                   2135:  *
                   2136:  * Tests whether the DOM implementation implements a specific feature and that
                   2137:  * feature is supported by this node.
                   2138:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   2139:  * otherwise.
                   2140:  */
                   2141: GdomeBoolean
                   2142: gdome_df_isSupported (GdomeDocumentFragment *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   2143: {
                   2144:  if (self == NULL) {
                   2145:    *exc = GDOME_NULL_POINTER_ERR;
                   2146:    return FALSE;
                   2147:  }
                   2148:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2149:    *exc = GDOME_INVALID_STATE_ERR;
                   2150:    return FALSE;
                   2151:  }
                   2152:  *exc = 0;
1.2     ! paf      2153:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      2154: }
                   2155: /**
                   2156:  * gdome_df_normalize:
                   2157:  * @self:  Node Object ref
                   2158:  * @exc:  Exception Object ref
                   2159:  *
                   2160:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   2161:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   2162:  * elements, comments, processing instructions, CDATA sections, and entity
                   2163:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   2164:  * nodes nor empty Text nodes.
                   2165:  */
                   2166: void
                   2167: gdome_df_normalize (GdomeDocumentFragment *self, GdomeException *exc)
                   2168: {
                   2169:  if (self == NULL) {
                   2170:    *exc = GDOME_NULL_POINTER_ERR;
                   2171:    return;
                   2172:  }
                   2173:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2174:    *exc = GDOME_INVALID_STATE_ERR;
                   2175:    return;
                   2176:  }
                   2177:  *exc = 0;
1.2     ! paf      2178:  ((Gdome_xml_DocumentFragment *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      2179: }
                   2180: /**
                   2181:  * gdome_df_removeChild:
                   2182:  * @self:  Node Object ref
                   2183:  * @oldChild:  The node being removed
                   2184:  * @exc:  Exception Object ref
                   2185:  *
                   2186:  * Removes the child node indicated by @oldChild from the list of children, and
                   2187:  * returns it.
                   2188:  *
                   2189:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   2190:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   2191:  * Returns: the node removed.
                   2192:  */
1.2     ! paf      2193: xmlNode *
        !          2194: gdome_df_removeChild (GdomeDocumentFragment *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      2195: {
                   2196:  if (self == NULL) {
                   2197:    *exc = GDOME_NULL_POINTER_ERR;
                   2198:    return NULL;
                   2199:  }
                   2200:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2201:    *exc = GDOME_INVALID_STATE_ERR;
                   2202:    return NULL;
                   2203:  }
                   2204:  *exc = 0;
1.2     ! paf      2205:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      2206: }
                   2207: /**
                   2208:  * gdome_df_replaceChild:
                   2209:  * @self:  Node Object ref
                   2210:  * @newChild:  The new node to put in the child list
                   2211:  * @oldChild:  The node being replaced in the list
                   2212:  * @exc:  Exception Object ref
                   2213:  *
                   2214:  * Replaces the child node @oldChild with @newChild in the list of children,
                   2215:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   2216:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   2217:  * inserted in the same order. If the @newChild is already in the tree, it is
                   2218:  * first removed.
                   2219:  *
                   2220:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   2221:  * not allow children of the type of the @newChild node, or if the node to put
                   2222:  * in is one of this node's ancestors or this node itself.
                   2223:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   2224:  * document than the one that created this node.
                   2225:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   2226:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   2227:  * Returns: the node replaced.
                   2228:  */
1.2     ! paf      2229: xmlNode *
        !          2230: gdome_df_replaceChild (GdomeDocumentFragment *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      2231: {
                   2232:  if (self == NULL) {
                   2233:    *exc = GDOME_NULL_POINTER_ERR;
                   2234:    return NULL;
                   2235:  }
                   2236:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2237:    *exc = GDOME_INVALID_STATE_ERR;
                   2238:    return NULL;
                   2239:  }
                   2240:  *exc = 0;
1.2     ! paf      2241:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      2242: }
                   2243: /**
                   2244:  * gdome_df_addEventListener:
                   2245:  * @self:  Node Object ref
                   2246:  * @type:  the event type for which the user is registering
                   2247:  * @listener:  the listener parameter takes an interface implemented by the
                   2248:  *             user which contains the methods to be called when the event occurs.
                   2249:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   2250:  *               capture. After initiating capture, all events of the specified
                   2251:  *               type will be dispatched to the registered EventListener before
                   2252:  *               being dispatched to any EventTargets beneath them in the tree.
                   2253:  *               Events which are bubbling upward through the tree will not
                   2254:  *               trigger an EventListener designated to use capture.
                   2255:  * @exc:  Exception Object ref
                   2256:  *
                   2257:  * This method allows the registration of event listeners on the event target.
                   2258:  * If an EventListener is added to an EventTarget while it is processing an
                   2259:  * event, it will not be triggered by the current actions but may be triggered
                   2260:  * during a later stage of event flow, such as the bubbling phase.
                   2261:  * If multiple identical EventListeners are registered on the same EventTarget
                   2262:  * with the same parameters the duplicate instances are discarded. They do not
                   2263:  * cause the EventListener to be called twice and since they are discarded
                   2264:  * they do not need to be removed with the removeEventListener method.
                   2265:  */
                   2266: void
                   2267: gdome_df_addEventListener (GdomeDocumentFragment *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   2268: {
                   2269:  if (self == NULL) {
                   2270:    *exc = GDOME_NULL_POINTER_ERR;
                   2271:    return;
                   2272:  }
                   2273:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2274:    *exc = GDOME_INVALID_STATE_ERR;
                   2275:    return;
                   2276:  }
                   2277:  *exc = 0;
1.2     ! paf      2278:  ((Gdome_xml_DocumentFragment *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      2279: }
                   2280: /**
                   2281:  * gdome_df_removeEventListener:
                   2282:  * @self:  Node Object ref
                   2283:  * @type:  Specifies the event type of the EventListener being removed.
                   2284:  * @listener:  The EventListener parameter indicates the EventListener to be
                   2285:  *             removed.
                   2286:  * @useCapture:  Specifies whether the EventListener being removed was
                   2287:  *               registered as a capturing listener or not. If a listener was
                   2288:  *               registered twice, one with capture and one without, each must
                   2289:  *               be removed separately. Removal of a capturing listener does
                   2290:  *               not affect a non-capturing version of the same listener, and
                   2291:  *               vice versa.
                   2292:  * @exc:  Exception Object ref
                   2293:  *
                   2294:  * This method allows the removal of event listeners from the event target. If
                   2295:  * an EventListener is removed from an EventTarget while it is processing an
                   2296:  * event, it will not be triggered by the current actions. EventListeners can
                   2297:  * never be invoked after being removed. Calling removeEventListener with
                   2298:  * arguments which do not identify any currently registered EventListener on
                   2299:  * the EventTarget has no effect.
                   2300:  */
                   2301: void
                   2302: gdome_df_removeEventListener (GdomeDocumentFragment *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   2303: {
                   2304:  if (self == NULL) {
                   2305:    *exc = GDOME_NULL_POINTER_ERR;
                   2306:    return;
                   2307:  }
                   2308:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2309:    *exc = GDOME_INVALID_STATE_ERR;
                   2310:    return;
                   2311:  }
                   2312:  *exc = 0;
1.2     ! paf      2313:  ((Gdome_xml_DocumentFragment *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      2314: }
                   2315: /**
                   2316:  * gdome_df_dispatchEvent:
                   2317:  * @self:  Node Object ref
                   2318:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   2319:  *        used in processing the event.
                   2320:  * @exc:  Exception Object ref
                   2321:  *
                   2322:  * This method allows the dispatch of events into the implementations event
                   2323:  * model. Events dispatched in this manner will have the same capturing and
                   2324:  * bubbling behavior as events dispatched directly by the implementation. The
                   2325:  * target of the event is the EventTarget on which dispatchEvent is called.
                   2326:  *
                   2327:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   2328:  * specified by initializing the event before dispatchEvent was called.
                   2329:  * Specification of the Event's type as %NULL or an empty string will also
                   2330:  * trigger this exception.
                   2331:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   2332:  *          is %TRUE.
                   2333:  */
                   2334: GdomeBoolean
                   2335: gdome_df_dispatchEvent (GdomeDocumentFragment *self, GdomeEvent *evt, GdomeException *exc)
                   2336: {
                   2337:  if (self == NULL) {
                   2338:    *exc = GDOME_NULL_POINTER_ERR;
                   2339:    return FALSE;
                   2340:  }
                   2341:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2342:    *exc = GDOME_INVALID_STATE_ERR;
                   2343:    return FALSE;
                   2344:  }
                   2345:  *exc = 0;
1.2     ! paf      2346:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      2347: }
                   2348: /**
                   2349:  * gdome_df_subTreeDispatchEvent:
                   2350:  * @self:  Node Object ref
                   2351:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   2352:  *        used in processing the event.
                   2353:  * @exc:  Exception Object ref
                   2354:  *
                   2355:  * This method allows the dispatch of events into the implementations event
                   2356:  * model. Events dispatched in this manner will have the same capturing and
                   2357:  * bubbling behavior as events dispatched directly by the implementation. The
                   2358:  * target of the event is any nodes in the subtree of the EventTarget on which
                   2359:  * dispatchEvent is called.
                   2360:  *
                   2361:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   2362:  * specified by initializing the event before dispatchEvent was called.
                   2363:  * Specification of the Event's type as %NULL or an empty string will also
                   2364:  * trigger this exception.
                   2365:  */
                   2366: void
                   2367: gdome_df_subTreeDispatchEvent (GdomeDocumentFragment *self, GdomeEvent *evt, GdomeException *exc)
                   2368: {
                   2369:  if (self == NULL) {
                   2370:    *exc = GDOME_NULL_POINTER_ERR;
                   2371:    return;
                   2372:  }
                   2373:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2374:    *exc = GDOME_INVALID_STATE_ERR;
                   2375:    return;
                   2376:  }
                   2377:  *exc = 0;
1.2     ! paf      2378:  ((Gdome_xml_DocumentFragment *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      2379: }
                   2380: /**
                   2381:  * gdome_df_canAppend:
                   2382:  * @self:  Node Object ref
                   2383:  * @newChild:  The Node Object ref of the node to test
                   2384:  * @exc:  Exception Object ref
                   2385:  *
                   2386:  * Tests if a @newChild can be added in the child list of this node.
                   2387:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   2388:  */
                   2389: GdomeBoolean
1.2     ! paf      2390: gdome_df_canAppend (GdomeDocumentFragment *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      2391: {
                   2392:  if (self == NULL) {
                   2393:    *exc = GDOME_NULL_POINTER_ERR;
                   2394:    return FALSE;
                   2395:  }
                   2396:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2397:    *exc = GDOME_INVALID_STATE_ERR;
                   2398:    return FALSE;
                   2399:  }
                   2400:  *exc = 0;
1.2     ! paf      2401:  return ((Gdome_xml_DocumentFragment *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      2402: }
                   2403: 
                   2404: /******************************************************************************
                   2405:           GdomeDocument interface API
                   2406:  ******************************************************************************/
                   2407: /**
                   2408:  * gdome_doc_doctype:
                   2409:  * @self:  Document Object ref
                   2410:  * @exc:  Exception Object ref
                   2411:  *
                   2412:  * Returns: The Document Type Declaration associated with this document. The
                   2413:  * DOM Level 2 does not support editing the Document Type Declaration. docType
                   2414:  * cannot be altered in any way, including through the use of methods inherited
                   2415:  * from the Node interface, such as insertNode or removeNode.
                   2416:  */
                   2417: GdomeDocumentType *
                   2418: gdome_doc_doctype (GdomeDocument *self, GdomeException *exc)
                   2419: {
                   2420:  if (self == NULL) {
                   2421:    *exc = GDOME_NULL_POINTER_ERR;
                   2422:    return NULL;
                   2423:  }
                   2424:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2425:    *exc = GDOME_INVALID_STATE_ERR;
                   2426:    return NULL;
                   2427:  }
                   2428:  *exc = 0;
                   2429:  return ((Gdome_xml_Document *)self)->vtab->doctype (self, exc);
                   2430: }
                   2431: /**
                   2432:  * gdome_doc_documentElement:
                   2433:  * @self:  Document Object ref
                   2434:  * @exc:  Exception Object ref
                   2435:  *
                   2436:  * Returns: the root Element of the Document.
                   2437:  */
                   2438: GdomeElement *
                   2439: gdome_doc_documentElement (GdomeDocument *self, GdomeException *exc)
                   2440: {
                   2441:  if (self == NULL) {
                   2442:    *exc = GDOME_NULL_POINTER_ERR;
                   2443:    return NULL;
                   2444:  }
                   2445:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2446:    *exc = GDOME_INVALID_STATE_ERR;
                   2447:    return NULL;
                   2448:  }
                   2449:  *exc = 0;
                   2450:  return ((Gdome_xml_Document *)self)->vtab->documentElement (self, exc);
                   2451: }
                   2452: /**
                   2453:  * gdome_doc_implementation:
                   2454:  * @self:  Document Object ref
                   2455:  * @exc:  Exception Object ref
                   2456:  *
                   2457:  * Returns: the DOMImplementation object that handles this document.
                   2458:  */
                   2459: GdomeDOMImplementation *
                   2460: gdome_doc_implementation (GdomeDocument *self, GdomeException *exc)
                   2461: {
                   2462:  if (self == NULL) {
                   2463:    *exc = GDOME_NULL_POINTER_ERR;
                   2464:    return NULL;
                   2465:  }
                   2466:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2467:    *exc = GDOME_INVALID_STATE_ERR;
                   2468:    return NULL;
                   2469:  }
                   2470:  *exc = 0;
                   2471:  return ((Gdome_xml_Document *)self)->vtab->implementation (self, exc);
                   2472: }
                   2473: /**
                   2474:  * gdome_doc_createAttribute:
                   2475:  * @self:  Document Object ref
                   2476:  * @name:  The name of the attribute
                   2477:  * @exc:  Exception Object ref
                   2478:  *
                   2479:  * Creates an Attr of the given @name. Note that the Attr instance can then be
                   2480:  * set on an Element using the setAttributeNode method. To create an attribute
                   2481:  * with a qualified name and namespace URI, use the
                   2482:  * gdome_doc_createAttributeNS() method.
                   2483:  * Returns: a new Attr object with the nodeName attribute set to @name, and
                   2484:  * localName, prefix, and namespaceURI set to %NULL. The value of the attribute
                   2485:  * is the empty string.
                   2486:  */
                   2487: GdomeAttr *
                   2488: gdome_doc_createAttribute (GdomeDocument *self, GdomeDOMString *name, GdomeException *exc)
                   2489: {
                   2490:  if (self == NULL) {
                   2491:    *exc = GDOME_NULL_POINTER_ERR;
                   2492:    return NULL;
                   2493:  }
                   2494:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2495:    *exc = GDOME_INVALID_STATE_ERR;
                   2496:    return NULL;
                   2497:  }
                   2498:  *exc = 0;
                   2499:  return ((Gdome_xml_Document *)self)->vtab->createAttribute (self, name, exc);
                   2500: }
                   2501: /**
                   2502:  * gdome_doc_createAttributeNS:
                   2503:  * @self:  Document Object ref
                   2504:  * @namespaceURI:  The namespace URI of the attribute to create
                   2505:  * @qualifiedName:  The qualified name of the attribute to create
                   2506:  * @exc:  Exception Object ref
                   2507:  *
                   2508:  * Creates an attribute of the given qualified name and namespace URI.
                   2509:  *
                   2510:  * %GDOME_NAMESPACE_ERR: Raised if the @qualifiedName is malformed, if the
                   2511:  * @qualifiedName has a prefix and the @namespaceURI is %NUKK, if the
                   2512:  * @qualifiedName has a prefix that is "xml" and the @namespaceURI is different
                   2513:  * from "http://www.w3.org/XML/1998/namespace", or if the @qualifiedName is
                   2514:  * "xmlns" and the @namespaceURI is different from "http://www.w3.org/2000/xmlns/".
                   2515:  * Returns: a new Attr object with the following attributes:
                   2516:  * %Node.nodeName = @qualifiedName,
                   2517:  * %Node.namespaceURI = @namespaceURI,
                   2518:  * %Node.prefix = prefix, extracted from @qualifiedName,
                   2519:  * %Node.localName = localName, extracted from @qualifiedName,
                   2520:  * %Attr.name = @qualifiedName,
                   2521:  * %Node.nodeValue = the empty string.
                   2522:  */
                   2523: GdomeAttr *
                   2524: gdome_doc_createAttributeNS (GdomeDocument *self, GdomeDOMString *namespaceURI, GdomeDOMString *qualifiedName, GdomeException *exc)
                   2525: {
                   2526:  if (self == NULL) {
                   2527:    *exc = GDOME_NULL_POINTER_ERR;
                   2528:    return NULL;
                   2529:  }
                   2530:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2531:    *exc = GDOME_INVALID_STATE_ERR;
                   2532:    return NULL;
                   2533:  }
                   2534:  *exc = 0;
                   2535:  return ((Gdome_xml_Document *)self)->vtab->createAttributeNS (self, namespaceURI, qualifiedName, exc);
                   2536: }
                   2537: /**
                   2538:  * gdome_doc_createCDATASection:
                   2539:  * @self:  Document Object ref
                   2540:  * @data:  The data for the CDATASection contents
                   2541:  * @exc:  Exception Object ref
                   2542:  *
                   2543:  * Creates a CDATASection node whose value is the specified string.
                   2544:  * Returns: the new CDATASection object.
                   2545:  */
                   2546: GdomeCDATASection *
                   2547: gdome_doc_createCDATASection (GdomeDocument *self, GdomeDOMString *data, GdomeException *exc)
                   2548: {
                   2549:  if (self == NULL) {
                   2550:    *exc = GDOME_NULL_POINTER_ERR;
                   2551:    return NULL;
                   2552:  }
                   2553:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2554:    *exc = GDOME_INVALID_STATE_ERR;
                   2555:    return NULL;
                   2556:  }
                   2557:  *exc = 0;
                   2558:  return ((Gdome_xml_Document *)self)->vtab->createCDATASection (self, data, exc);
                   2559: }
                   2560: /**
                   2561:  * gdome_doc_createComment:
                   2562:  * @self:  Document Object ref
                   2563:  * @data:  The data for the comment contents
                   2564:  * @exc:  Exception Object ref
                   2565:  *
                   2566:  * Creates a Comment node whose value is the specified string.
                   2567:  * Returns: the new Comment object.
                   2568:  */
                   2569: GdomeComment *
                   2570: gdome_doc_createComment (GdomeDocument *self, GdomeDOMString *data, GdomeException *exc)
                   2571: {
                   2572:  if (self == NULL) {
                   2573:    *exc = GDOME_NULL_POINTER_ERR;
                   2574:    return NULL;
                   2575:  }
                   2576:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2577:    *exc = GDOME_INVALID_STATE_ERR;
                   2578:    return NULL;
                   2579:  }
                   2580:  *exc = 0;
                   2581:  return ((Gdome_xml_Document *)self)->vtab->createComment (self, data, exc);
                   2582: }
                   2583: /**
                   2584:  * gdome_doc_createDocumentFragment:
                   2585:  * @self:  Document Object ref
                   2586:  * @exc:  Exception Object ref
                   2587:  *
                   2588:  * Creates an empty DocumentFragment object. 
                   2589:  * Returns: the new DocumentFragment object.
                   2590:  */
                   2591: GdomeDocumentFragment *
                   2592: gdome_doc_createDocumentFragment (GdomeDocument *self, GdomeException *exc)
                   2593: {
                   2594:  if (self == NULL) {
                   2595:    *exc = GDOME_NULL_POINTER_ERR;
                   2596:    return NULL;
                   2597:  }
                   2598:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2599:    *exc = GDOME_INVALID_STATE_ERR;
                   2600:    return NULL;
                   2601:  }
                   2602:  *exc = 0;
                   2603:  return ((Gdome_xml_Document *)self)->vtab->createDocumentFragment (self, exc);
                   2604: }
                   2605: /**
                   2606:  * gdome_doc_createElement:
                   2607:  * @self:  Document Object ref
                   2608:  * @tagName:  The name of the element type to instantiate.
                   2609:  * @exc:  Exception Object ref
                   2610:  *
                   2611:  * Creates an element of the type specified. Note that the instance returned
                   2612:  * implements the Element interface, so attributes can be specified directly on
                   2613:  * the returned object.
                   2614:  * To create an element with a qualified name and namespace URI, use the
                   2615:  * gdome_doc_createElementNS() function.
                   2616:  * Returns: a new Element object with the nodeName attribute set to tagName,
                   2617:  * and localName, prefix, and namespaceURI set to %NULL.
                   2618:  */
                   2619: GdomeElement *
                   2620: gdome_doc_createElement (GdomeDocument *self, GdomeDOMString *tagName, GdomeException *exc)
                   2621: {
                   2622:  if (self == NULL) {
                   2623:    *exc = GDOME_NULL_POINTER_ERR;
                   2624:    return NULL;
                   2625:  }
                   2626:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2627:    *exc = GDOME_INVALID_STATE_ERR;
                   2628:    return NULL;
                   2629:  }
                   2630:  *exc = 0;
                   2631:  return ((Gdome_xml_Document *)self)->vtab->createElement (self, tagName, exc);
                   2632: }
                   2633: /**
                   2634:  * gdome_doc_createElementNS:
                   2635:  * @self:  Document Object ref
                   2636:  * @namespaceURI:  The namespace URI of the element to create
                   2637:  * @qualifiedName:  The qualified name of the element to create
                   2638:  * @exc:  Exception Object ref
                   2639:  *
                   2640:  * Creates an element of the given qualified name and namespace URI.
                   2641:  *
                   2642:  * %GDOME_NAMESPACE_ERR: Raised if the @qualifiedName is malformed, if the
                   2643:  * @qualifiedName has a prefix and the @namespaceURI is %NULL, or if the
                   2644:  * @qualifiedName has a prefix that is "xml" and the @namespaceURI is different
                   2645:  * from "http://www.w3.org/XML/1998/namespace".
                   2646:  * Returns: a new Element object with the following attributes:
                   2647:  * %Node.nodeName = @qualifiedName,
                   2648:  * %Node.namespaceURI = @namespaceURI,
                   2649:  * %Node.prefix = prefix, extracted from @qualifiedName,
                   2650:  * %Node.localName = localName, extracted from @qualifiedName,
                   2651:  * %Element.tagName = @qualifiedName.
                   2652:  */
                   2653: GdomeElement *
                   2654: gdome_doc_createElementNS (GdomeDocument *self, GdomeDOMString *namespaceURI, GdomeDOMString *qualifiedName, GdomeException *exc)
                   2655: {
                   2656:  if (self == NULL) {
                   2657:    *exc = GDOME_NULL_POINTER_ERR;
                   2658:    return NULL;
                   2659:  }
                   2660:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2661:    *exc = GDOME_INVALID_STATE_ERR;
                   2662:    return NULL;
                   2663:  }
                   2664:  *exc = 0;
                   2665:  return ((Gdome_xml_Document *)self)->vtab->createElementNS (self, namespaceURI, qualifiedName, exc);
                   2666: }
                   2667: /**
                   2668:  * gdome_doc_createEntityReference:
                   2669:  * @self:  Document Object ref
                   2670:  * @name:  The name of the entity to reference
                   2671:  * @exc:  Exception Object ref
                   2672:  *
                   2673:  * Creates an EntityReference object. In addition, if the referenced entity is
                   2674:  * known, the child list of the EntityReference node is made the same as that
                   2675:  * of the corresponding Entity node.
                   2676:  * Returns: the new EntityReference object.
                   2677:  */
                   2678: GdomeEntityReference *
                   2679: gdome_doc_createEntityReference (GdomeDocument *self, GdomeDOMString *name, GdomeException *exc)
                   2680: {
                   2681:  if (self == NULL) {
                   2682:    *exc = GDOME_NULL_POINTER_ERR;
                   2683:    return NULL;
                   2684:  }
                   2685:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2686:    *exc = GDOME_INVALID_STATE_ERR;
                   2687:    return NULL;
                   2688:  }
                   2689:  *exc = 0;
                   2690:  return ((Gdome_xml_Document *)self)->vtab->createEntityReference (self, name, exc);
                   2691: }
                   2692: /**
                   2693:  * gdome_doc_createProcessingInstruction:
                   2694:  * @self:  Document Object ref
                   2695:  * @target:  The target part of the processing instruction
                   2696:  * @data:  The data for the node
                   2697:  * @exc:  Exception Object ref
                   2698:  *
                   2699:  * Creates a ProcessingInstruction node given the specified name and data
                   2700:  * strings.
                   2701:  * Returns: The new ProcessingInstruction object.
                   2702:  */
                   2703: GdomeProcessingInstruction *
                   2704: gdome_doc_createProcessingInstruction (GdomeDocument *self, GdomeDOMString *target, GdomeDOMString *data, GdomeException *exc)
                   2705: {
                   2706:  if (self == NULL) {
                   2707:    *exc = GDOME_NULL_POINTER_ERR;
                   2708:    return NULL;
                   2709:  }
                   2710:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2711:    *exc = GDOME_INVALID_STATE_ERR;
                   2712:    return NULL;
                   2713:  }
                   2714:  *exc = 0;
                   2715:  return ((Gdome_xml_Document *)self)->vtab->createProcessingInstruction (self, target, data, exc);
                   2716: }
                   2717: /**
                   2718:  * gdome_doc_createTextNode:
                   2719:  * @self:  Document Object ref
                   2720:  * @data:  The data for the node
                   2721:  * @exc:  Exception Object ref
                   2722:  *
                   2723:  * Creates a Text node given the specified string.
                   2724:  * Returns: The new TextNode object.
                   2725:  */
                   2726: GdomeText *
                   2727: gdome_doc_createTextNode (GdomeDocument *self, GdomeDOMString *data, GdomeException *exc)
                   2728: {
                   2729:  if (self == NULL) {
                   2730:    *exc = GDOME_NULL_POINTER_ERR;
                   2731:    return NULL;
                   2732:  }
                   2733:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2734:    *exc = GDOME_INVALID_STATE_ERR;
                   2735:    return NULL;
                   2736:  }
                   2737:  *exc = 0;
                   2738:  return ((Gdome_xml_Document *)self)->vtab->createTextNode (self, data, exc);
                   2739: }
                   2740: /**
                   2741:  * gdome_doc_getElementById:
                   2742:  * @self:  Document Object ref
                   2743:  * @elementId:  The unique id value for an element
                   2744:  * @exc:  Exception Object ref
                   2745:  *
                   2746:  * Returns: the Element whose %ID is given by @elementId. If no such element
                   2747:  * exists, returns %NULL. Behavior is not defined if more than one element has
                   2748:  * this %ID.
                   2749:  */
                   2750: GdomeElement *
                   2751: gdome_doc_getElementById (GdomeDocument *self, GdomeDOMString *elementId, GdomeException *exc)
                   2752: {
                   2753:  if (self == NULL) {
                   2754:    *exc = GDOME_NULL_POINTER_ERR;
                   2755:    return NULL;
                   2756:  }
                   2757:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2758:    *exc = GDOME_INVALID_STATE_ERR;
                   2759:    return NULL;
                   2760:  }
                   2761:  *exc = 0;
                   2762:  return ((Gdome_xml_Document *)self)->vtab->getElementById (self, elementId, exc);
                   2763: }
                   2764: /**
                   2765:  * gdome_doc_getElementsByTagName:
                   2766:  * @self:  Document Object ref
                   2767:  * @tagName:  The name of the tag to match on. The special value * matches
                   2768:  *            all tags.
                   2769:  * @exc:  Exception Object ref
                   2770:  *
                   2771:  * Returns: a NodeList of all the elements with a given tag name in the order
                   2772:  * in which they are encountered in a preorder traversal of the Document tree.
                   2773:  */
                   2774: GdomeNodeList *
                   2775: gdome_doc_getElementsByTagName (GdomeDocument *self, GdomeDOMString *tagname, GdomeException *exc)
                   2776: {
                   2777:  if (self == NULL) {
                   2778:    *exc = GDOME_NULL_POINTER_ERR;
                   2779:    return NULL;
                   2780:  }
                   2781:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2782:    *exc = GDOME_INVALID_STATE_ERR;
                   2783:    return NULL;
                   2784:  }
                   2785:  *exc = 0;
                   2786:  return ((Gdome_xml_Document *)self)->vtab->getElementsByTagName (self, tagname, exc);
                   2787: }
                   2788: /**
                   2789:  * gdome_doc_getElementsByTagNameNS:
                   2790:  * @self:  Document Objects ref
                   2791:  * @namespaceURI:  The namespace URI of the elements to match on. The special
                   2792:  *                 value * matches all namespaces.
                   2793:  * @localName:  The local name of the elements to match on. The special value
                   2794:  *              * matches all local names.
                   2795:  * @exc:  Document Object ref
                   2796:  *
                   2797:  * Returns: a NodeList of all the descendant elements with a given local name
                   2798:  * and namespace URI in the order in which they are encountered in a preorder
                   2799:  * traversal of this Document tree.
                   2800:  */
                   2801: GdomeNodeList *
                   2802: gdome_doc_getElementsByTagNameNS (GdomeDocument *self, GdomeDOMString *namespaceURI, GdomeDOMString *localName, GdomeException *exc)
                   2803: {
                   2804:  if (self == NULL) {
                   2805:    *exc = GDOME_NULL_POINTER_ERR;
                   2806:    return NULL;
                   2807:  }
                   2808:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2809:    *exc = GDOME_INVALID_STATE_ERR;
                   2810:    return NULL;
                   2811:  }
                   2812:  *exc = 0;
                   2813:  return ((Gdome_xml_Document *)self)->vtab->getElementsByTagNameNS (self, namespaceURI, localName, exc);
                   2814: }
                   2815: /**
                   2816:  * gdome_doc_importNode:
                   2817:  * @self:  Document Objects ref
                   2818:  * @importedNode:  The node to import.
                   2819:  * @deep:  If %TRUE, recursively import the subtree under the specified node;
                   2820:  *         if %FALSE, import only the node itself. This has no effect on Attr,
                   2821:  *         EntityReference, and Notation nodes.
                   2822:  * @exc:  Exception Object ref
                   2823:  *
                   2824:  *
                   2825:  * Imports a node from another document to this document. The returned node has
                   2826:  * no parent; (parentNode is %NULL). The source node is not altered or removed
                   2827:  * from the original document; this method creates a new copy of the source
                   2828:  * node. %GDOME_DOCUMENT_NODE, %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE
                   2829:  * and %GDOME_ENTITY_NODE nodes are not supported.
                   2830:  *
                   2831:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being imported is not
                   2832:  * supported.
                   2833:  * Returns: the imported node that belongs to this Document.
                   2834:  */
1.2     ! paf      2835: xmlNode *
        !          2836: gdome_doc_importNode (GdomeDocument *self, xmlNode *importedNode, GdomeBoolean deep, GdomeException *exc)
1.1       paf      2837: {
                   2838:  if (self == NULL) {
                   2839:    *exc = GDOME_NULL_POINTER_ERR;
                   2840:    return NULL;
                   2841:  }
                   2842:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2843:    *exc = GDOME_INVALID_STATE_ERR;
                   2844:    return NULL;
                   2845:  }
                   2846:  *exc = 0;
                   2847:  return ((Gdome_xml_Document *)self)->vtab->importNode (self, importedNode, deep, exc);
                   2848: }
                   2849: /**
                   2850:  * gdome_doc_createEvent:
                   2851:  * @self:  Document Objects ref
                   2852:  * @eventType:  The @eventType parameter specifies the type of Event interface
                   2853:  *              to be created.
                   2854:  * @exc:  Exception Object ref
                   2855:  *
                   2856:  * If the Event interface specified is supported by the implementation this
                   2857:  * method will return a new Event of the interface type requested. If the Event
                   2858:  * is to be dispatched via the dispatchEvent method the appropriate event init
                   2859:  * method must be called after creation in order to initialize the Event's
                   2860:  * values. As an example, a user wishing to synthesize some kind of
                   2861:  * MutationEvents would call createEvent with the parameter "MutationEvents".
                   2862:  * The gdome_mevnt_initMuatationEvent() method could then be called on the
                   2863:  * newly created MutationEvent to set the specific type of MutationEvent to be
                   2864:  * dispatched and set its context information.
                   2865:  *
                   2866:  * GDOME_NOT_SUPPORTED_ERR: Raised if the implementation does not support the
                   2867:  * type of Event interface requested
                   2868:  * Returns: the newly created Event.
                   2869:  */
                   2870: GdomeEvent *
                   2871: gdome_doc_createEvent (GdomeDocument *self, GdomeDOMString *eventType, GdomeException *exc)
                   2872: {
                   2873:  if (self == NULL) {
                   2874:    *exc = GDOME_NULL_POINTER_ERR;
                   2875:    return NULL;
                   2876:  }
                   2877:  if (((Gdome_xml_Document *)self)->n == NULL) {
                   2878:    *exc = GDOME_INVALID_STATE_ERR;
                   2879:    return NULL;
                   2880:  }
                   2881:  *exc = 0;
                   2882:  return ((Gdome_xml_Document *)self)->vtab->createEvent (self, eventType, exc);
                   2883: }
                   2884: /**
                   2885:  * gdome_doc_attributes:
                   2886:  * @self:  Node Object ref
                   2887:  * @exc:  Exception Object ref
                   2888:  *
                   2889:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   2890:  * Element) or %NULL otherwise.
                   2891:  */
                   2892: GdomeNamedNodeMap *
                   2893: gdome_doc_attributes (GdomeDocument *self, GdomeException *exc)
                   2894: {
                   2895:  if (self == NULL) {
                   2896:    *exc = GDOME_NULL_POINTER_ERR;
                   2897:    return NULL;
                   2898:  }
                   2899:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2900:    *exc = GDOME_INVALID_STATE_ERR;
                   2901:    return NULL;
                   2902:  }
                   2903:  *exc = 0;
1.2     ! paf      2904:  return ((Gdome_xml_Document *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      2905: }
                   2906: /**
                   2907:  * gdome_doc_childNodes:
                   2908:  * @self:  Node Object ref
                   2909:  * @exc:  Exception Object ref
                   2910:  *
                   2911:  * Returns: a NodeList that contains all children of this node. If there are no
                   2912:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   2913:  * not considered to be children of element nodes - use gdome_n_attributes to
                   2914:  * obtain the attributes.
                   2915:  */
                   2916: GdomeNodeList *
                   2917: gdome_doc_childNodes (GdomeDocument *self, GdomeException *exc)
                   2918: {
                   2919:  if (self == NULL) {
                   2920:    *exc = GDOME_NULL_POINTER_ERR;
                   2921:    return NULL;
                   2922:  }
                   2923:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2924:    *exc = GDOME_INVALID_STATE_ERR;
                   2925:    return NULL;
                   2926:  }
                   2927:  *exc = 0;
1.2     ! paf      2928:  return ((Gdome_xml_Document *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      2929: }
                   2930: /**
                   2931:  * gdome_doc_firstChild:
                   2932:  * @self:  Node Object ref
                   2933:  * @exc:  Exception Object ref
                   2934:  * 
                   2935:  * Returns: the first child of this node. If there is no such node,
                   2936:  * this returns %NULL.
                   2937:  */
1.2     ! paf      2938: xmlNode *
1.1       paf      2939: gdome_doc_firstChild (GdomeDocument *self, GdomeException *exc)
                   2940: {
                   2941:  if (self == NULL) {
                   2942:    *exc = GDOME_NULL_POINTER_ERR;
                   2943:    return NULL;
                   2944:  }
                   2945:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2946:    *exc = GDOME_INVALID_STATE_ERR;
                   2947:    return NULL;
                   2948:  }
                   2949:  *exc = 0;
1.2     ! paf      2950:  return ((Gdome_xml_Document *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      2951: }
                   2952: /**
                   2953:  * gdome_doc_lastChild:
                   2954:  * @self:  Node Object ref
                   2955:  * @exc:  Exception Object ref
                   2956:  *
                   2957:  * Returns: the last child of this node. If there is no such node,
                   2958:  * this returns %NULL.
                   2959:  */
1.2     ! paf      2960: xmlNode *
1.1       paf      2961: gdome_doc_lastChild (GdomeDocument *self, GdomeException *exc)
                   2962: {
                   2963:  if (self == NULL) {
                   2964:    *exc = GDOME_NULL_POINTER_ERR;
                   2965:    return NULL;
                   2966:  }
                   2967:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2968:    *exc = GDOME_INVALID_STATE_ERR;
                   2969:    return NULL;
                   2970:  }
                   2971:  *exc = 0;
1.2     ! paf      2972:  return ((Gdome_xml_Document *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      2973: }
                   2974: /**
                   2975:  * gdome_doc_localName:
                   2976:  * @self:  Node Objects ref
                   2977:  * @exc:  Exception Object ref
                   2978:  *
                   2979:  * Returns: the local part of the qualified name of this node.
                   2980:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   2981:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   2982:  * always %NULL.
                   2983:  */
                   2984: GdomeDOMString *
                   2985: gdome_doc_localName (GdomeDocument *self, GdomeException *exc)
                   2986: {
                   2987:  if (self == NULL) {
                   2988:    *exc = GDOME_NULL_POINTER_ERR;
                   2989:    return NULL;
                   2990:  }
                   2991:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   2992:    *exc = GDOME_INVALID_STATE_ERR;
                   2993:    return NULL;
                   2994:  }
                   2995:  *exc = 0;
1.2     ! paf      2996:  return ((Gdome_xml_Document *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      2997: }
                   2998: /**
                   2999:  * gdome_doc_namespaceURI:
                   3000:  * @self:  Node Objects ref
                   3001:  * @exc:  Exception Object ref
                   3002:  *
                   3003:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   3004:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   3005:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   3006:  * always %NULL.
                   3007:  */
                   3008: GdomeDOMString *
                   3009: gdome_doc_namespaceURI (GdomeDocument *self, GdomeException *exc)
                   3010: {
                   3011:  if (self == NULL) {
                   3012:    *exc = GDOME_NULL_POINTER_ERR;
                   3013:    return NULL;
                   3014:  }
                   3015:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3016:    *exc = GDOME_INVALID_STATE_ERR;
                   3017:    return NULL;
                   3018:  }
                   3019:  *exc = 0;
1.2     ! paf      3020:  return ((Gdome_xml_Document *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      3021: }
                   3022: /**
                   3023:  * gdome_doc_nextSibling:
                   3024:  * @self:  Node Object ref
                   3025:  * @exc:  Exception Object ref
                   3026:  *
                   3027:  * Returns: the node immediately following this node. If there is no such
                   3028:  * node, this returns %NULL.
                   3029:  */
1.2     ! paf      3030: xmlNode *
1.1       paf      3031: gdome_doc_nextSibling (GdomeDocument *self, GdomeException *exc)
                   3032: {
                   3033:  if (self == NULL) {
                   3034:    *exc = GDOME_NULL_POINTER_ERR;
                   3035:    return NULL;
                   3036:  }
                   3037:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3038:    *exc = GDOME_INVALID_STATE_ERR;
                   3039:    return NULL;
                   3040:  }
                   3041:  *exc = 0;
1.2     ! paf      3042:  return ((Gdome_xml_Document *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      3043: }
                   3044: /**
                   3045:  * gdome_doc_nodeName:
                   3046:  * @self:  Node Object ref
                   3047:  * @exc:  Exception Object ref
                   3048:  *
                   3049:  * Returns: the name of this node, depending on its type.
                   3050:  */
                   3051: GdomeDOMString *
                   3052: gdome_doc_nodeName (GdomeDocument *self, GdomeException *exc)
                   3053: {
                   3054:  if (self == NULL) {
                   3055:    *exc = GDOME_NULL_POINTER_ERR;
                   3056:    return NULL;
                   3057:  }
                   3058:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3059:    *exc = GDOME_INVALID_STATE_ERR;
                   3060:    return NULL;
                   3061:  }
                   3062:  *exc = 0;
1.2     ! paf      3063:  return ((Gdome_xml_Document *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      3064: }
                   3065: /**
                   3066:  * gdome_doc_nodeType:
                   3067:  * @self:  Node Object ref
                   3068:  * @exc:  Exception Object ref
                   3069:  *
                   3070:  * Returns: an integer bigger than %0 representing the type of the underlying
                   3071:  * object or %0 on error.
                   3072:  */
                   3073: unsigned short
                   3074: gdome_doc_nodeType (GdomeDocument *self, GdomeException *exc)
                   3075: {
                   3076:  if (self == NULL) {
                   3077:    *exc = GDOME_NULL_POINTER_ERR;
                   3078:    return 0;
                   3079:  }
                   3080:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3081:    *exc = GDOME_INVALID_STATE_ERR;
                   3082:    return 0;
                   3083:  }
                   3084:  *exc = 0;
1.2     ! paf      3085:  return ((Gdome_xml_Document *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      3086: }
                   3087: /**
                   3088:  * gdome_doc_nodeValue:
                   3089:  * @self:  Node Object ref
                   3090:  * @exc:  Exception Object ref
                   3091:  *
                   3092:  * Returns: the value of this node, depending on its type.
                   3093:  */
                   3094: GdomeDOMString *
                   3095: gdome_doc_nodeValue (GdomeDocument *self, GdomeException *exc)
                   3096: {
                   3097:  if (self == NULL) {
                   3098:    *exc = GDOME_NULL_POINTER_ERR;
                   3099:    return NULL;
                   3100:  }
                   3101:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3102:    *exc = GDOME_INVALID_STATE_ERR;
                   3103:    return NULL;
                   3104:  }
                   3105:  *exc = 0;
1.2     ! paf      3106:  return ((Gdome_xml_Document *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      3107: }
                   3108: /**
                   3109:  * gdome_doc_set_nodeValue:
                   3110:  * @self:  Node Object ref
                   3111:  * @nodeValue:  The new value for this node.
                   3112:  * @exc:  Exception Object ref
                   3113:  *
                   3114:  * Sets The value of this node, depending on its type.
                   3115:  *
                   3116:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3117:  */
                   3118: void
                   3119: gdome_doc_set_nodeValue (GdomeDocument *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   3120: {
                   3121:  if (self == NULL) {
                   3122:    *exc = GDOME_NULL_POINTER_ERR;
                   3123:    return;
                   3124:  }
                   3125:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3126:    *exc = GDOME_INVALID_STATE_ERR;
                   3127:    return;
                   3128:  }
                   3129:  *exc = 0;
1.2     ! paf      3130:  ((Gdome_xml_Document *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      3131: }
                   3132: /**
                   3133:  * gdome_doc_ownerDocument:
                   3134:  * @self:  Node Objects ref
                   3135:  * @exc:  Exception Object ref
                   3136:  *
                   3137:  * Returns: the documment object associated with this node. This is also the
                   3138:  * Document object used to create new nodes. When this node is a Document or a
                   3139:  * DocumentType which is not used with any Document yet, this is %NULL.
                   3140:  */
                   3141: GdomeDocument *
                   3142: gdome_doc_ownerDocument (GdomeDocument *self, GdomeException *exc)
                   3143: {
                   3144:  if (self == NULL) {
                   3145:    *exc = GDOME_NULL_POINTER_ERR;
                   3146:    return NULL;
                   3147:  }
                   3148:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3149:    *exc = GDOME_INVALID_STATE_ERR;
                   3150:    return NULL;
                   3151:  }
                   3152:  *exc = 0;
1.2     ! paf      3153:  return ((Gdome_xml_Document *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      3154: }
                   3155: /**
                   3156:  * gdome_doc_parentNode:
                   3157:  * @self: Node Object ref
                   3158:  * @exc: Exception Object ref
                   3159:  *
                   3160:  * Returns: the parent of this node. All nodes, except Attr,
                   3161:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   3162:  * if a node has just been created and not yet added to the tree, or if it has
                   3163:  * been removed from the tree, this is %NULL.
                   3164:  */
1.2     ! paf      3165: xmlNode *
1.1       paf      3166: gdome_doc_parentNode (GdomeDocument *self, GdomeException *exc)
                   3167: {
                   3168:  if (self == NULL) {
                   3169:    *exc = GDOME_NULL_POINTER_ERR;
                   3170:    return NULL;
                   3171:  }
                   3172:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3173:    *exc = GDOME_INVALID_STATE_ERR;
                   3174:    return NULL;
                   3175:  }
                   3176:  *exc = 0;
1.2     ! paf      3177:  return ((Gdome_xml_Document *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      3178: }
                   3179: /**
                   3180:  * gdome_doc_prefix:
                   3181:  * @self:  Node Objects ref
                   3182:  * @exc:  Exception Object ref
                   3183:  *
                   3184:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   3185:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   3186:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   3187:  * always %NULL.
                   3188:  */
                   3189: GdomeDOMString *
                   3190: gdome_doc_prefix (GdomeDocument *self, GdomeException *exc)
                   3191: {
                   3192:  if (self == NULL) {
                   3193:    *exc = GDOME_NULL_POINTER_ERR;
                   3194:    return NULL;
                   3195:  }
                   3196:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3197:    *exc = GDOME_INVALID_STATE_ERR;
                   3198:    return NULL;
                   3199:  }
                   3200:  *exc = 0;
1.2     ! paf      3201:  return ((Gdome_xml_Document *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      3202: }
                   3203: /**
                   3204:  * gdome_doc_set_prefix:
                   3205:  * @self:  Node Object ref
                   3206:  * @prefix:  The new prefix for this node.
                   3207:  * @exc:  Exception Object ref
                   3208:  *
                   3209:  * Sets a new nemaspace prefix for this node.
                   3210:  *
                   3211:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3212:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   3213:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   3214:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   3215:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   3216:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   3217:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   3218:  * an attribute and the qualifiedName of this node is "xmlns".
                   3219:  */
                   3220: void
                   3221: gdome_doc_set_prefix (GdomeDocument *self, GdomeDOMString *prefix, GdomeException *exc)
                   3222: {
                   3223:  if (self == NULL) {
                   3224:    *exc = GDOME_NULL_POINTER_ERR;
                   3225:    return;
                   3226:  }
                   3227:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3228:    *exc = GDOME_INVALID_STATE_ERR;
                   3229:    return;
                   3230:  }
                   3231:  *exc = 0;
1.2     ! paf      3232:  ((Gdome_xml_Document *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      3233: }
                   3234: /**
                   3235:  * gdome_doc_previousSibling:
                   3236:  * @self:  Node Object ref
                   3237:  * @exc:  Exception Object ref
                   3238:  *
                   3239:  * Returns: the node immediately preceding this node. If there is no such
                   3240:  * node, this returns %NULL.
                   3241:  */
1.2     ! paf      3242: xmlNode *
1.1       paf      3243: gdome_doc_previousSibling (GdomeDocument *self, GdomeException *exc)
                   3244: {
                   3245:  if (self == NULL) {
                   3246:    *exc = GDOME_NULL_POINTER_ERR;
                   3247:    return NULL;
                   3248:  }
                   3249:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3250:    *exc = GDOME_INVALID_STATE_ERR;
                   3251:    return NULL;
                   3252:  }
                   3253:  *exc = 0;
1.2     ! paf      3254:  return ((Gdome_xml_Document *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      3255: }
                   3256: /**
                   3257:  * gdome_doc_ref:
                   3258:  * @self:  Node Object ref
                   3259:  * @exc:  Exception Object ref
                   3260:  *
                   3261:  * Increase the reference count of the specified Node.
                   3262:  */
                   3263: void
                   3264: gdome_doc_ref (GdomeDocument *self, GdomeException *exc)
                   3265: {
                   3266:  if (self == NULL) {
                   3267:    *exc = GDOME_NULL_POINTER_ERR;
                   3268:    return;
                   3269:  }
                   3270:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3271:    *exc = GDOME_INVALID_STATE_ERR;
                   3272:    return;
                   3273:  }
                   3274:  *exc = 0;
1.2     ! paf      3275:  ((Gdome_xml_Document *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      3276: }
                   3277: /**
                   3278:  * gdome_doc_unref:
                   3279:  * @self:  Node Object ref
                   3280:  * @exc:  Exception Object ref
                   3281:  *
                   3282:  * Decrease the reference count of the specified Node. Free the Node structure
                   3283:  * if the Node will have zero reference.
                   3284:  */
                   3285: void
                   3286: gdome_doc_unref (GdomeDocument *self, GdomeException *exc)
                   3287: {
                   3288:  if (self == NULL) {
                   3289:    *exc = GDOME_NULL_POINTER_ERR;
                   3290:    return;
                   3291:  }
                   3292:  *exc = 0;
                   3293:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3294:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   3295:      ((Gdome_xml_Node *)self)->refcnt--;
                   3296: 
                   3297:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   3298: #ifdef DEBUG_REFCNT
                   3299:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   3300: #endif
                   3301:      g_free (self);
                   3302:    }
                   3303:    return;
                   3304:  }
1.2     ! paf      3305:  ((Gdome_xml_Document *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      3306: }
                   3307: /**
                   3308:  * gdome_doc_query_interface:
                   3309:  * @self:  Node Object ref
                   3310:  * @interface:  interface needed
                   3311:  * @exc:  Exception Object ref
                   3312:  *
                   3313:  * Returns: a reference to this object that implements the @interface needed,
                   3314:  *          or %NULL if the @interface is not supported by this Object.
                   3315:  */
                   3316: gpointer
                   3317: gdome_doc_query_interface (GdomeDocument *self, const char *interface, GdomeException *exc)
                   3318: {
                   3319:  if (self == NULL) {
                   3320:    *exc = GDOME_NULL_POINTER_ERR;
                   3321:    return NULL;
                   3322:  }
                   3323:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3324:    *exc = GDOME_INVALID_STATE_ERR;
                   3325:    return NULL;
                   3326:  }
                   3327:  *exc = 0;
1.2     ! paf      3328:  return ((Gdome_xml_Document *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      3329: }
                   3330: /**
                   3331:  * gdome_doc_appendChild:
                   3332:  * @self:  Node Object ref
                   3333:  * @newChild:  The node to add
                   3334:  * @exc:  Exception Object ref
                   3335:  *
                   3336:  * Adds the node @newChild to the end of the list of children of this node.
                   3337:  * If the @newChild is already in the tree, it is first removed. If it is a
                   3338:  * DocumentFragment node, the entire contents of the document fragment are
                   3339:  * moved into the child list of this node
                   3340:  *
                   3341:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   3342:  * allow children of the type of the @newChild node, or if the node to append is
                   3343:  * one of this node's ancestors or this node itself.
                   3344:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   3345:  * document than the one that created this node.
                   3346:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3347:  * Returns: the node added.
                   3348:  */
1.2     ! paf      3349: xmlNode *
        !          3350: gdome_doc_appendChild (GdomeDocument *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      3351: {
                   3352:  if (self == NULL) {
                   3353:    *exc = GDOME_NULL_POINTER_ERR;
                   3354:    return NULL;
                   3355:  }
                   3356:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3357:    *exc = GDOME_INVALID_STATE_ERR;
                   3358:    return NULL;
                   3359:  }
                   3360:  *exc = 0;
1.2     ! paf      3361:  return ((Gdome_xml_Document *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      3362: }
                   3363: /**
                   3364:  * gdome_doc_cloneNode:
                   3365:  * @self:  Node Object ref
                   3366:  * @deep:  If true, recursively clone the subtree under the specified node;
                   3367:  *         if false, clone only the node itself (and its attributes, if it is
                   3368:  *         an Element).
                   3369:  * @exc:  Exception Object ref
                   3370:  *
                   3371:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   3372:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   3373:  * %NULL).
                   3374:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   3375:  * nodes are not supported.
                   3376:  *
                   3377:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   3378:  * supported.
                   3379:  * Returns: the duplicate node.
                   3380:  */
1.2     ! paf      3381: xmlNode *
1.1       paf      3382: gdome_doc_cloneNode (GdomeDocument *self, GdomeBoolean deep, GdomeException *exc)
                   3383: {
                   3384:  if (self == NULL) {
                   3385:    *exc = GDOME_NULL_POINTER_ERR;
                   3386:    return NULL;
                   3387:  }
                   3388:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3389:    *exc = GDOME_INVALID_STATE_ERR;
                   3390:    return NULL;
                   3391:  }
                   3392:  *exc = 0;
1.2     ! paf      3393:  return ((Gdome_xml_Document *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      3394: }
                   3395: /**
                   3396:  * gdome_doc_hasAttributes:
                   3397:  * @self:  Node Object ref
                   3398:  * @exc:  Exception Object ref
                   3399:  *
                   3400:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   3401:  */
                   3402: GdomeBoolean
                   3403: gdome_doc_hasAttributes (GdomeDocument *self, GdomeException *exc)
                   3404: {
                   3405:  if (self == NULL) {
                   3406:    *exc = GDOME_NULL_POINTER_ERR;
                   3407:    return FALSE;
                   3408:  }
                   3409:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3410:    *exc = GDOME_INVALID_STATE_ERR;
                   3411:    return FALSE;
                   3412:  }
                   3413:  *exc = 0;
1.2     ! paf      3414:  return ((Gdome_xml_Document *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      3415: }
                   3416: /**
                   3417:  * gdome_doc_hasChildNodes:
                   3418:  * @self:  Node Object ref
                   3419:  * @exc:  Exception Object ref
                   3420:  *
                   3421:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   3422:  */
                   3423: GdomeBoolean
                   3424: gdome_doc_hasChildNodes (GdomeDocument *self, GdomeException *exc)
                   3425: {
                   3426:  if (self == NULL) {
                   3427:    *exc = GDOME_NULL_POINTER_ERR;
                   3428:    return FALSE;
                   3429:  }
                   3430:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3431:    *exc = GDOME_INVALID_STATE_ERR;
                   3432:    return FALSE;
                   3433:  }
                   3434:  *exc = 0;
1.2     ! paf      3435:  return ((Gdome_xml_Document *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      3436: }
                   3437: /**
                   3438:  * gdome_doc_insertBefore:
                   3439:  * @self:  Node Object ref
                   3440:  * @newChild:  The new node to put in the child list
                   3441:  * @refChild:  the reference node, i.e., the node before which the new node
                   3442:  *             must be inserted.
                   3443:  * @exc:  Exception Object ref
                   3444:  *
                   3445:  * Inserts the node @newChild before the existing child node @refChild. If
                   3446:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   3447:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   3448:  * in the same order, before @refChild. If the @newChild is already in the
                   3449:  * tree, it is first removed.
                   3450:  *
                   3451:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   3452:  * allow children of the type of the @newChild node, or if the node to insert is
                   3453:  * one of this node's ancestors or this node itself.
                   3454:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   3455:  * document than the one that created this node.
                   3456:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   3457:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3458:  * Returns: the node being inserted.
                   3459:  */
1.2     ! paf      3460: xmlNode *
        !          3461: gdome_doc_insertBefore (GdomeDocument *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      3462: {
                   3463:  if (self == NULL) {
                   3464:    *exc = GDOME_NULL_POINTER_ERR;
                   3465:    return NULL;
                   3466:  }
                   3467:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3468:    *exc = GDOME_INVALID_STATE_ERR;
                   3469:    return NULL;
                   3470:  }
                   3471:  *exc = 0;
1.2     ! paf      3472:  return ((Gdome_xml_Document *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      3473: }
                   3474: /**
                   3475:  * gdome_doc_isSupported:
                   3476:  * @self:  Node Object ref
                   3477:  * @feature:  The name of the feature to test.
                   3478:  * @version:  This is the version number of the feature to test. In Level 2,
                   3479:  *            version 1, this is the string "2.0". If the version is not
                   3480:  *            specified, supporting any version of the feature will cause the
                   3481:  *            method to return %TRUE.
                   3482:  * @exc:  Exception Object ref
                   3483:  *
                   3484:  * Tests whether the DOM implementation implements a specific feature and that
                   3485:  * feature is supported by this node.
                   3486:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   3487:  * otherwise.
                   3488:  */
                   3489: GdomeBoolean
                   3490: gdome_doc_isSupported (GdomeDocument *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   3491: {
                   3492:  if (self == NULL) {
                   3493:    *exc = GDOME_NULL_POINTER_ERR;
                   3494:    return FALSE;
                   3495:  }
                   3496:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3497:    *exc = GDOME_INVALID_STATE_ERR;
                   3498:    return FALSE;
                   3499:  }
                   3500:  *exc = 0;
1.2     ! paf      3501:  return ((Gdome_xml_Document *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      3502: }
                   3503: /**
                   3504:  * gdome_doc_normalize:
                   3505:  * @self:  Node Object ref
                   3506:  * @exc:  Exception Object ref
                   3507:  *
                   3508:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   3509:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   3510:  * elements, comments, processing instructions, CDATA sections, and entity
                   3511:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   3512:  * nodes nor empty Text nodes.
                   3513:  */
                   3514: void
                   3515: gdome_doc_normalize (GdomeDocument *self, GdomeException *exc)
                   3516: {
                   3517:  if (self == NULL) {
                   3518:    *exc = GDOME_NULL_POINTER_ERR;
                   3519:    return;
                   3520:  }
                   3521:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3522:    *exc = GDOME_INVALID_STATE_ERR;
                   3523:    return;
                   3524:  }
                   3525:  *exc = 0;
1.2     ! paf      3526:  ((Gdome_xml_Document *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      3527: }
                   3528: /**
                   3529:  * gdome_doc_removeChild:
                   3530:  * @self:  Node Object ref
                   3531:  * @oldChild:  The node being removed
                   3532:  * @exc:  Exception Object ref
                   3533:  *
                   3534:  * Removes the child node indicated by @oldChild from the list of children, and
                   3535:  * returns it.
                   3536:  *
                   3537:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   3538:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3539:  * Returns: the node removed.
                   3540:  */
1.2     ! paf      3541: xmlNode *
        !          3542: gdome_doc_removeChild (GdomeDocument *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      3543: {
                   3544:  if (self == NULL) {
                   3545:    *exc = GDOME_NULL_POINTER_ERR;
                   3546:    return NULL;
                   3547:  }
                   3548:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3549:    *exc = GDOME_INVALID_STATE_ERR;
                   3550:    return NULL;
                   3551:  }
                   3552:  *exc = 0;
1.2     ! paf      3553:  return ((Gdome_xml_Document *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      3554: }
                   3555: /**
                   3556:  * gdome_doc_replaceChild:
                   3557:  * @self:  Node Object ref
                   3558:  * @newChild:  The new node to put in the child list
                   3559:  * @oldChild:  The node being replaced in the list
                   3560:  * @exc:  Exception Object ref
                   3561:  *
                   3562:  * Replaces the child node @oldChild with @newChild in the list of children,
                   3563:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   3564:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   3565:  * inserted in the same order. If the @newChild is already in the tree, it is
                   3566:  * first removed.
                   3567:  *
                   3568:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   3569:  * not allow children of the type of the @newChild node, or if the node to put
                   3570:  * in is one of this node's ancestors or this node itself.
                   3571:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   3572:  * document than the one that created this node.
                   3573:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   3574:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3575:  * Returns: the node replaced.
                   3576:  */
1.2     ! paf      3577: xmlNode *
        !          3578: gdome_doc_replaceChild (GdomeDocument *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      3579: {
                   3580:  if (self == NULL) {
                   3581:    *exc = GDOME_NULL_POINTER_ERR;
                   3582:    return NULL;
                   3583:  }
                   3584:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3585:    *exc = GDOME_INVALID_STATE_ERR;
                   3586:    return NULL;
                   3587:  }
                   3588:  *exc = 0;
1.2     ! paf      3589:  return ((Gdome_xml_Document *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      3590: }
                   3591: /**
                   3592:  * gdome_doc_addEventListener:
                   3593:  * @self:  Node Object ref
                   3594:  * @type:  the event type for which the user is registering
                   3595:  * @listener:  the listener parameter takes an interface implemented by the
                   3596:  *             user which contains the methods to be called when the event occurs.
                   3597:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   3598:  *               capture. After initiating capture, all events of the specified
                   3599:  *               type will be dispatched to the registered EventListener before
                   3600:  *               being dispatched to any EventTargets beneath them in the tree.
                   3601:  *               Events which are bubbling upward through the tree will not
                   3602:  *               trigger an EventListener designated to use capture.
                   3603:  * @exc:  Exception Object ref
                   3604:  *
                   3605:  * This method allows the registration of event listeners on the event target.
                   3606:  * If an EventListener is added to an EventTarget while it is processing an
                   3607:  * event, it will not be triggered by the current actions but may be triggered
                   3608:  * during a later stage of event flow, such as the bubbling phase.
                   3609:  * If multiple identical EventListeners are registered on the same EventTarget
                   3610:  * with the same parameters the duplicate instances are discarded. They do not
                   3611:  * cause the EventListener to be called twice and since they are discarded
                   3612:  * they do not need to be removed with the removeEventListener method.
                   3613:  */
                   3614: void
                   3615: gdome_doc_addEventListener (GdomeDocument *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   3616: {
                   3617:  if (self == NULL) {
                   3618:    *exc = GDOME_NULL_POINTER_ERR;
                   3619:    return;
                   3620:  }
                   3621:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3622:    *exc = GDOME_INVALID_STATE_ERR;
                   3623:    return;
                   3624:  }
                   3625:  *exc = 0;
1.2     ! paf      3626:  ((Gdome_xml_Document *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      3627: }
                   3628: /**
                   3629:  * gdome_doc_removeEventListener:
                   3630:  * @self:  Node Object ref
                   3631:  * @type:  Specifies the event type of the EventListener being removed.
                   3632:  * @listener:  The EventListener parameter indicates the EventListener to be
                   3633:  *             removed.
                   3634:  * @useCapture:  Specifies whether the EventListener being removed was
                   3635:  *               registered as a capturing listener or not. If a listener was
                   3636:  *               registered twice, one with capture and one without, each must
                   3637:  *               be removed separately. Removal of a capturing listener does
                   3638:  *               not affect a non-capturing version of the same listener, and
                   3639:  *               vice versa.
                   3640:  * @exc:  Exception Object ref
                   3641:  *
                   3642:  * This method allows the removal of event listeners from the event target. If
                   3643:  * an EventListener is removed from an EventTarget while it is processing an
                   3644:  * event, it will not be triggered by the current actions. EventListeners can
                   3645:  * never be invoked after being removed. Calling removeEventListener with
                   3646:  * arguments which do not identify any currently registered EventListener on
                   3647:  * the EventTarget has no effect.
                   3648:  */
                   3649: void
                   3650: gdome_doc_removeEventListener (GdomeDocument *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   3651: {
                   3652:  if (self == NULL) {
                   3653:    *exc = GDOME_NULL_POINTER_ERR;
                   3654:    return;
                   3655:  }
                   3656:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3657:    *exc = GDOME_INVALID_STATE_ERR;
                   3658:    return;
                   3659:  }
                   3660:  *exc = 0;
1.2     ! paf      3661:  ((Gdome_xml_Document *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      3662: }
                   3663: /**
                   3664:  * gdome_doc_dispatchEvent:
                   3665:  * @self:  Node Object ref
                   3666:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   3667:  *        used in processing the event.
                   3668:  * @exc:  Exception Object ref
                   3669:  *
                   3670:  * This method allows the dispatch of events into the implementations event
                   3671:  * model. Events dispatched in this manner will have the same capturing and
                   3672:  * bubbling behavior as events dispatched directly by the implementation. The
                   3673:  * target of the event is the EventTarget on which dispatchEvent is called.
                   3674:  *
                   3675:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   3676:  * specified by initializing the event before dispatchEvent was called.
                   3677:  * Specification of the Event's type as %NULL or an empty string will also
                   3678:  * trigger this exception.
                   3679:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   3680:  *          is %TRUE.
                   3681:  */
                   3682: GdomeBoolean
                   3683: gdome_doc_dispatchEvent (GdomeDocument *self, GdomeEvent *evt, GdomeException *exc)
                   3684: {
                   3685:  if (self == NULL) {
                   3686:    *exc = GDOME_NULL_POINTER_ERR;
                   3687:    return FALSE;
                   3688:  }
                   3689:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3690:    *exc = GDOME_INVALID_STATE_ERR;
                   3691:    return FALSE;
                   3692:  }
                   3693:  *exc = 0;
1.2     ! paf      3694:  return ((Gdome_xml_Document *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      3695: }
                   3696: /**
                   3697:  * gdome_doc_subTreeDispatchEvent:
                   3698:  * @self:  Node Object ref
                   3699:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   3700:  *        used in processing the event.
                   3701:  * @exc:  Exception Object ref
                   3702:  *
                   3703:  * This method allows the dispatch of events into the implementations event
                   3704:  * model. Events dispatched in this manner will have the same capturing and
                   3705:  * bubbling behavior as events dispatched directly by the implementation. The
                   3706:  * target of the event is any nodes in the subtree of the EventTarget on which
                   3707:  * dispatchEvent is called.
                   3708:  *
                   3709:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   3710:  * specified by initializing the event before dispatchEvent was called.
                   3711:  * Specification of the Event's type as %NULL or an empty string will also
                   3712:  * trigger this exception.
                   3713:  */
                   3714: void
                   3715: gdome_doc_subTreeDispatchEvent (GdomeDocument *self, GdomeEvent *evt, GdomeException *exc)
                   3716: {
                   3717:  if (self == NULL) {
                   3718:    *exc = GDOME_NULL_POINTER_ERR;
                   3719:    return;
                   3720:  }
                   3721:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3722:    *exc = GDOME_INVALID_STATE_ERR;
                   3723:    return;
                   3724:  }
                   3725:  *exc = 0;
1.2     ! paf      3726:  ((Gdome_xml_Document *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      3727: }
                   3728: /**
                   3729:  * gdome_doc_canAppend:
                   3730:  * @self:  Node Object ref
                   3731:  * @newChild:  The Node Object ref of the node to test
                   3732:  * @exc:  Exception Object ref
                   3733:  *
                   3734:  * Tests if a @newChild can be added in the child list of this node.
                   3735:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   3736:  */
                   3737: GdomeBoolean
1.2     ! paf      3738: gdome_doc_canAppend (GdomeDocument *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      3739: {
                   3740:  if (self == NULL) {
                   3741:    *exc = GDOME_NULL_POINTER_ERR;
                   3742:    return FALSE;
                   3743:  }
                   3744:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3745:    *exc = GDOME_INVALID_STATE_ERR;
                   3746:    return FALSE;
                   3747:  }
                   3748:  *exc = 0;
1.2     ! paf      3749:  return ((Gdome_xml_Document *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      3750: }
                   3751: 
                   3752: /******************************************************************************
                   3753:           GdomeCharacterData interface API
                   3754:  ******************************************************************************/
                   3755: /**
                   3756:  * gdome_cd_data:
                   3757:  * @self:  The CharacterData Object ref
                   3758:  * @exc:  The Exception Object ref
                   3759:  *
                   3760:  * Returns: the character data of the node that implements this interface.
                   3761:  */
                   3762: GdomeDOMString *
                   3763: gdome_cd_data (GdomeCharacterData *self, GdomeException *exc)
                   3764: {
                   3765:  if (self == NULL) {
                   3766:    *exc = GDOME_NULL_POINTER_ERR;
                   3767:    return NULL;
                   3768:  }
                   3769:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   3770:    *exc = GDOME_INVALID_STATE_ERR;
                   3771:    return NULL;
                   3772:  }
                   3773:  *exc = 0;
                   3774:  return ((Gdome_xml_CharacterData *)self)->vtab->data (self, exc);
                   3775: }
                   3776: /**
                   3777:  * gdome_cd_set_data:
                   3778:  * @self:  The CharacterData Object ref
                   3779:  * @data:  The data value for this node
                   3780:  * @exc:  The Exception Object ref
                   3781:  *
                   3782:  * Sets the data value of this node.
                   3783:  *
                   3784:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3785:  */
                   3786: void
                   3787: gdome_cd_set_data (GdomeCharacterData *self, GdomeDOMString *data, GdomeException *exc)
                   3788: {
                   3789:  if (self == NULL) {
                   3790:    *exc = GDOME_NULL_POINTER_ERR;
                   3791:    return;
                   3792:  }
                   3793:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   3794:    *exc = GDOME_INVALID_STATE_ERR;
                   3795:    return;
                   3796:  }
                   3797:  *exc = 0;
                   3798:  ((Gdome_xml_CharacterData *)self)->vtab->set_data (self, data, exc);
                   3799: }
                   3800: /**
                   3801:  * gdome_cd_length:
                   3802:  * @self:  The CharacterData Object ref
                   3803:  * @exc:  The GdomeException Object ref
                   3804:  *
                   3805:  * Returns: The number of 16-bit units that are available. This may have the
                   3806:  * value zero, i.e., CharacterData nodes may be empty.
                   3807:  */
                   3808: gulong
                   3809: gdome_cd_length (GdomeCharacterData *self, GdomeException *exc)
                   3810: {
                   3811:  if (self == NULL) {
                   3812:    *exc = GDOME_NULL_POINTER_ERR;
                   3813:    return 0L;
                   3814:  }
                   3815:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   3816:    *exc = GDOME_INVALID_STATE_ERR;
                   3817:    return 0L;
                   3818:  }
                   3819:  *exc = 0;
                   3820:  return ((Gdome_xml_CharacterData *)self)->vtab->length (self, exc);
                   3821: }
                   3822: /**
                   3823:  * gdome_cd_appendData:
                   3824:  * @self:  The CharacterData Object ref
                   3825:  * @arg:  The string to append
                   3826:  * @exc:  The Exception Object ref
                   3827:  *
                   3828:  * Append the string to the end of the character data of the node. Upon
                   3829:  * success, data provides access to the concatenation of data and the
                   3830:  * string specified.
                   3831:  *
                   3832:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3833:  */
                   3834: void
                   3835: gdome_cd_appendData (GdomeCharacterData *self, GdomeDOMString *arg, GdomeException *exc)
                   3836: {
                   3837:  if (self == NULL) {
                   3838:    *exc = GDOME_NULL_POINTER_ERR;
                   3839:    return;
                   3840:  }
                   3841:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   3842:    *exc = GDOME_INVALID_STATE_ERR;
                   3843:    return;
                   3844:  }
                   3845:  *exc = 0;
                   3846:  ((Gdome_xml_CharacterData *)self)->vtab->appendData (self, arg, exc);
                   3847: }
                   3848: /**
                   3849:  * gdome_cd_deleteData:
                   3850:  * @self:  The CharacterData Object ref
                   3851:  * @offset:  The offset from which to start removing
                   3852:  * @count:  The number of 16-bit units to delete.
                   3853:  * @exc:  The Exception Object ref
                   3854:  *
                   3855:  * Remove a range of 16-bit units from the node. If the sum of @offset and
                   3856:  * @count exceeds length then all 16-bit units from @offset to the end of the
                   3857:  * data are deleted. Upon success, data and length reflect the change.
                   3858:  *
                   3859:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the
                   3860:  * number of 16-bit units in data.
                   3861:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3862:  */
                   3863: void
                   3864: gdome_cd_deleteData (GdomeCharacterData *self, gulong offset, gulong count, GdomeException *exc)
                   3865: {
                   3866:  if (self == NULL) {
                   3867:    *exc = GDOME_NULL_POINTER_ERR;
                   3868:    return;
                   3869:  }
                   3870:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   3871:    *exc = GDOME_INVALID_STATE_ERR;
                   3872:    return;
                   3873:  }
                   3874:  *exc = 0;
                   3875:  ((Gdome_xml_CharacterData *)self)->vtab->deleteData (self, offset, count, exc);
                   3876: }
                   3877: /**
                   3878:  * gdome_cd_insertData:
                   3879:  * @self:  The CharacterData Object ref
                   3880:  * @offset:  The character offset at which to insert
                   3881:  * @arg:  The string to insert
                   3882:  * @exc:  The Exception Object ref
                   3883:  *
                   3884:  * Insert a string at the specified 16-bit unit offset.
                   3885:  *
                   3886:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the
                   3887:  * number of 16-bit units in data.
                   3888:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3889:  */
                   3890: void
                   3891: gdome_cd_insertData (GdomeCharacterData *self, gulong offset, GdomeDOMString *arg, GdomeException *exc)
                   3892: {
                   3893:  if (self == NULL) {
                   3894:    *exc = GDOME_NULL_POINTER_ERR;
                   3895:    return;
                   3896:  }
                   3897:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   3898:    *exc = GDOME_INVALID_STATE_ERR;
                   3899:    return;
                   3900:  }
                   3901:  *exc = 0;
                   3902:  ((Gdome_xml_CharacterData *)self)->vtab->insertData (self, offset, arg, exc);
                   3903: }
                   3904: /**
                   3905:  * gdome_cd_replaceData:
                   3906:  * @self:  The CharacterData Object ref
                   3907:  * @offset:  The offset from which to start replacing
                   3908:  * @count:  The number of 16-bit units to replace.
                   3909:  * @arg:  The String with which the range must be replaced
                   3910:  * @exc:  The GdomeException Object ref
                   3911:  *
                   3912:  * Replace the characters starting at the specified 16-bit unit @offset with
                   3913:  * the specified string. If the sum of @offset and @count exceeds length, then
                   3914:  * all 16-bit units to the end of the data are replaced;
                   3915:  *
                   3916:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified @offset is greater than the
                   3917:  * number of 16-bit units in data.
                   3918:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   3919:  */
                   3920: void
                   3921: gdome_cd_replaceData (GdomeCharacterData *self, gulong offset, gulong count, GdomeDOMString *arg, GdomeException *exc)
                   3922: {
                   3923:  if (self == NULL) {
                   3924:    *exc = GDOME_NULL_POINTER_ERR;
                   3925:    return;
                   3926:  }
                   3927:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   3928:    *exc = GDOME_INVALID_STATE_ERR;
                   3929:    return;
                   3930:  }
                   3931:  *exc = 0;
                   3932:  ((Gdome_xml_CharacterData *)self)->vtab->replaceData (self, offset, count, arg, exc);
                   3933: }
                   3934: /**
                   3935:  * gdome_cd_substringData:
                   3936:  * @self:  The CharacterData Object ref
                   3937:  * @offset:  Start offset of substring to extract
                   3938:  * @count:  The number of 16-bit units to extract
                   3939:  * @exc:  The Exception Object ref
                   3940:  *
                   3941:  * Extracts a range of data from the node.
                   3942:  *
                   3943:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified @offset is greater than the
                   3944:  * number of 16-bit units in data.
                   3945:  * Returns: The specified substring. If the sum of @offset and @count exceeds
                   3946:  * the length, then all 16-bit units to the end of the data are returned.
                   3947:  */
                   3948: GdomeDOMString *
                   3949: gdome_cd_substringData (GdomeCharacterData *self, gulong offset, gulong count, GdomeException *exc)
                   3950: {
                   3951:  if (self == NULL) {
                   3952:    *exc = GDOME_NULL_POINTER_ERR;
                   3953:    return NULL;
                   3954:  }
                   3955:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   3956:    *exc = GDOME_INVALID_STATE_ERR;
                   3957:    return NULL;
                   3958:  }
                   3959:  *exc = 0;
                   3960:  return ((Gdome_xml_CharacterData *)self)->vtab->substringData (self, offset, count, exc);
                   3961: }
                   3962: /**
                   3963:  * gdome_cd_attributes:
                   3964:  * @self:  Node Object ref
                   3965:  * @exc:  Exception Object ref
                   3966:  *
                   3967:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   3968:  * Element) or %NULL otherwise.
                   3969:  */
                   3970: GdomeNamedNodeMap *
                   3971: gdome_cd_attributes (GdomeCharacterData *self, GdomeException *exc)
                   3972: {
                   3973:  if (self == NULL) {
                   3974:    *exc = GDOME_NULL_POINTER_ERR;
                   3975:    return NULL;
                   3976:  }
                   3977:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   3978:    *exc = GDOME_INVALID_STATE_ERR;
                   3979:    return NULL;
                   3980:  }
                   3981:  *exc = 0;
1.2     ! paf      3982:  return ((Gdome_xml_CharacterData *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      3983: }
                   3984: /**
                   3985:  * gdome_cd_childNodes:
                   3986:  * @self:  Node Object ref
                   3987:  * @exc:  Exception Object ref
                   3988:  *
                   3989:  * Returns: a NodeList that contains all children of this node. If there are no
                   3990:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   3991:  * not considered to be children of element nodes - use gdome_n_attributes to
                   3992:  * obtain the attributes.
                   3993:  */
                   3994: GdomeNodeList *
                   3995: gdome_cd_childNodes (GdomeCharacterData *self, GdomeException *exc)
                   3996: {
                   3997:  if (self == NULL) {
                   3998:    *exc = GDOME_NULL_POINTER_ERR;
                   3999:    return NULL;
                   4000:  }
                   4001:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4002:    *exc = GDOME_INVALID_STATE_ERR;
                   4003:    return NULL;
                   4004:  }
                   4005:  *exc = 0;
1.2     ! paf      4006:  return ((Gdome_xml_CharacterData *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      4007: }
                   4008: /**
                   4009:  * gdome_cd_firstChild:
                   4010:  * @self:  Node Object ref
                   4011:  * @exc:  Exception Object ref
                   4012:  * 
                   4013:  * Returns: the first child of this node. If there is no such node,
                   4014:  * this returns %NULL.
                   4015:  */
1.2     ! paf      4016: xmlNode *
1.1       paf      4017: gdome_cd_firstChild (GdomeCharacterData *self, GdomeException *exc)
                   4018: {
                   4019:  if (self == NULL) {
                   4020:    *exc = GDOME_NULL_POINTER_ERR;
                   4021:    return NULL;
                   4022:  }
                   4023:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4024:    *exc = GDOME_INVALID_STATE_ERR;
                   4025:    return NULL;
                   4026:  }
                   4027:  *exc = 0;
1.2     ! paf      4028:  return ((Gdome_xml_CharacterData *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      4029: }
                   4030: /**
                   4031:  * gdome_cd_lastChild:
                   4032:  * @self:  Node Object ref
                   4033:  * @exc:  Exception Object ref
                   4034:  *
                   4035:  * Returns: the last child of this node. If there is no such node,
                   4036:  * this returns %NULL.
                   4037:  */
1.2     ! paf      4038: xmlNode *
1.1       paf      4039: gdome_cd_lastChild (GdomeCharacterData *self, GdomeException *exc)
                   4040: {
                   4041:  if (self == NULL) {
                   4042:    *exc = GDOME_NULL_POINTER_ERR;
                   4043:    return NULL;
                   4044:  }
                   4045:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4046:    *exc = GDOME_INVALID_STATE_ERR;
                   4047:    return NULL;
                   4048:  }
                   4049:  *exc = 0;
1.2     ! paf      4050:  return ((Gdome_xml_CharacterData *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      4051: }
                   4052: /**
                   4053:  * gdome_cd_localName:
                   4054:  * @self:  Node Objects ref
                   4055:  * @exc:  Exception Object ref
                   4056:  *
                   4057:  * Returns: the local part of the qualified name of this node.
                   4058:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   4059:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   4060:  * always %NULL.
                   4061:  */
                   4062: GdomeDOMString *
                   4063: gdome_cd_localName (GdomeCharacterData *self, GdomeException *exc)
                   4064: {
                   4065:  if (self == NULL) {
                   4066:    *exc = GDOME_NULL_POINTER_ERR;
                   4067:    return NULL;
                   4068:  }
                   4069:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4070:    *exc = GDOME_INVALID_STATE_ERR;
                   4071:    return NULL;
                   4072:  }
                   4073:  *exc = 0;
1.2     ! paf      4074:  return ((Gdome_xml_CharacterData *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      4075: }
                   4076: /**
                   4077:  * gdome_cd_namespaceURI:
                   4078:  * @self:  Node Objects ref
                   4079:  * @exc:  Exception Object ref
                   4080:  *
                   4081:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   4082:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   4083:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   4084:  * always %NULL.
                   4085:  */
                   4086: GdomeDOMString *
                   4087: gdome_cd_namespaceURI (GdomeCharacterData *self, GdomeException *exc)
                   4088: {
                   4089:  if (self == NULL) {
                   4090:    *exc = GDOME_NULL_POINTER_ERR;
                   4091:    return NULL;
                   4092:  }
                   4093:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4094:    *exc = GDOME_INVALID_STATE_ERR;
                   4095:    return NULL;
                   4096:  }
                   4097:  *exc = 0;
1.2     ! paf      4098:  return ((Gdome_xml_CharacterData *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      4099: }
                   4100: /**
                   4101:  * gdome_cd_nextSibling:
                   4102:  * @self:  Node Object ref
                   4103:  * @exc:  Exception Object ref
                   4104:  *
                   4105:  * Returns: the node immediately following this node. If there is no such
                   4106:  * node, this returns %NULL.
                   4107:  */
1.2     ! paf      4108: xmlNode *
1.1       paf      4109: gdome_cd_nextSibling (GdomeCharacterData *self, GdomeException *exc)
                   4110: {
                   4111:  if (self == NULL) {
                   4112:    *exc = GDOME_NULL_POINTER_ERR;
                   4113:    return NULL;
                   4114:  }
                   4115:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4116:    *exc = GDOME_INVALID_STATE_ERR;
                   4117:    return NULL;
                   4118:  }
                   4119:  *exc = 0;
1.2     ! paf      4120:  return ((Gdome_xml_CharacterData *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      4121: }
                   4122: /**
                   4123:  * gdome_cd_nodeName:
                   4124:  * @self:  Node Object ref
                   4125:  * @exc:  Exception Object ref
                   4126:  *
                   4127:  * Returns: the name of this node, depending on its type.
                   4128:  */
                   4129: GdomeDOMString *
                   4130: gdome_cd_nodeName (GdomeCharacterData *self, GdomeException *exc)
                   4131: {
                   4132:  if (self == NULL) {
                   4133:    *exc = GDOME_NULL_POINTER_ERR;
                   4134:    return NULL;
                   4135:  }
                   4136:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4137:    *exc = GDOME_INVALID_STATE_ERR;
                   4138:    return NULL;
                   4139:  }
                   4140:  *exc = 0;
1.2     ! paf      4141:  return ((Gdome_xml_CharacterData *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      4142: }
                   4143: /**
                   4144:  * gdome_cd_nodeType:
                   4145:  * @self:  Node Object ref
                   4146:  * @exc:  Exception Object ref
                   4147:  *
                   4148:  * Returns: an integer bigger than %0 representing the type of the underlying
                   4149:  * object or %0 on error.
                   4150:  */
                   4151: unsigned short
                   4152: gdome_cd_nodeType (GdomeCharacterData *self, GdomeException *exc)
                   4153: {
                   4154:  if (self == NULL) {
                   4155:    *exc = GDOME_NULL_POINTER_ERR;
                   4156:    return 0;
                   4157:  }
                   4158:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4159:    *exc = GDOME_INVALID_STATE_ERR;
                   4160:    return 0;
                   4161:  }
                   4162:  *exc = 0;
1.2     ! paf      4163:  return ((Gdome_xml_CharacterData *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      4164: }
                   4165: /**
                   4166:  * gdome_cd_nodeValue:
                   4167:  * @self:  Node Object ref
                   4168:  * @exc:  Exception Object ref
                   4169:  *
                   4170:  * Returns: the value of this node, depending on its type.
                   4171:  */
                   4172: GdomeDOMString *
                   4173: gdome_cd_nodeValue (GdomeCharacterData *self, GdomeException *exc)
                   4174: {
                   4175:  if (self == NULL) {
                   4176:    *exc = GDOME_NULL_POINTER_ERR;
                   4177:    return NULL;
                   4178:  }
                   4179:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4180:    *exc = GDOME_INVALID_STATE_ERR;
                   4181:    return NULL;
                   4182:  }
                   4183:  *exc = 0;
1.2     ! paf      4184:  return ((Gdome_xml_CharacterData *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      4185: }
                   4186: /**
                   4187:  * gdome_cd_set_nodeValue:
                   4188:  * @self:  Node Object ref
                   4189:  * @nodeValue:  The new value for this node.
                   4190:  * @exc:  Exception Object ref
                   4191:  *
                   4192:  * Sets The value of this node, depending on its type.
                   4193:  *
                   4194:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   4195:  */
                   4196: void
                   4197: gdome_cd_set_nodeValue (GdomeCharacterData *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   4198: {
                   4199:  if (self == NULL) {
                   4200:    *exc = GDOME_NULL_POINTER_ERR;
                   4201:    return;
                   4202:  }
                   4203:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4204:    *exc = GDOME_INVALID_STATE_ERR;
                   4205:    return;
                   4206:  }
                   4207:  *exc = 0;
1.2     ! paf      4208:  ((Gdome_xml_CharacterData *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      4209: }
                   4210: /**
                   4211:  * gdome_cd_ownerDocument:
                   4212:  * @self:  Node Objects ref
                   4213:  * @exc:  Exception Object ref
                   4214:  *
                   4215:  * Returns: the documment object associated with this node. This is also the
                   4216:  * Document object used to create new nodes. When this node is a Document or a
                   4217:  * DocumentType which is not used with any Document yet, this is %NULL.
                   4218:  */
                   4219: GdomeDocument *
                   4220: gdome_cd_ownerDocument (GdomeCharacterData *self, GdomeException *exc)
                   4221: {
                   4222:  if (self == NULL) {
                   4223:    *exc = GDOME_NULL_POINTER_ERR;
                   4224:    return NULL;
                   4225:  }
                   4226:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4227:    *exc = GDOME_INVALID_STATE_ERR;
                   4228:    return NULL;
                   4229:  }
                   4230:  *exc = 0;
1.2     ! paf      4231:  return ((Gdome_xml_CharacterData *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      4232: }
                   4233: /**
                   4234:  * gdome_cd_parentNode:
                   4235:  * @self: Node Object ref
                   4236:  * @exc: Exception Object ref
                   4237:  *
                   4238:  * Returns: the parent of this node. All nodes, except Attr,
                   4239:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   4240:  * if a node has just been created and not yet added to the tree, or if it has
                   4241:  * been removed from the tree, this is %NULL.
                   4242:  */
1.2     ! paf      4243: xmlNode *
1.1       paf      4244: gdome_cd_parentNode (GdomeCharacterData *self, GdomeException *exc)
                   4245: {
                   4246:  if (self == NULL) {
                   4247:    *exc = GDOME_NULL_POINTER_ERR;
                   4248:    return NULL;
                   4249:  }
                   4250:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4251:    *exc = GDOME_INVALID_STATE_ERR;
                   4252:    return NULL;
                   4253:  }
                   4254:  *exc = 0;
1.2     ! paf      4255:  return ((Gdome_xml_CharacterData *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      4256: }
                   4257: /**
                   4258:  * gdome_cd_prefix:
                   4259:  * @self:  Node Objects ref
                   4260:  * @exc:  Exception Object ref
                   4261:  *
                   4262:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   4263:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   4264:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   4265:  * always %NULL.
                   4266:  */
                   4267: GdomeDOMString *
                   4268: gdome_cd_prefix (GdomeCharacterData *self, GdomeException *exc)
                   4269: {
                   4270:  if (self == NULL) {
                   4271:    *exc = GDOME_NULL_POINTER_ERR;
                   4272:    return NULL;
                   4273:  }
                   4274:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4275:    *exc = GDOME_INVALID_STATE_ERR;
                   4276:    return NULL;
                   4277:  }
                   4278:  *exc = 0;
1.2     ! paf      4279:  return ((Gdome_xml_CharacterData *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      4280: }
                   4281: /**
                   4282:  * gdome_cd_set_prefix:
                   4283:  * @self:  Node Object ref
                   4284:  * @prefix:  The new prefix for this node.
                   4285:  * @exc:  Exception Object ref
                   4286:  *
                   4287:  * Sets a new nemaspace prefix for this node.
                   4288:  *
                   4289:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   4290:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   4291:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   4292:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   4293:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   4294:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   4295:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   4296:  * an attribute and the qualifiedName of this node is "xmlns".
                   4297:  */
                   4298: void
                   4299: gdome_cd_set_prefix (GdomeCharacterData *self, GdomeDOMString *prefix, GdomeException *exc)
                   4300: {
                   4301:  if (self == NULL) {
                   4302:    *exc = GDOME_NULL_POINTER_ERR;
                   4303:    return;
                   4304:  }
                   4305:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4306:    *exc = GDOME_INVALID_STATE_ERR;
                   4307:    return;
                   4308:  }
                   4309:  *exc = 0;
1.2     ! paf      4310:  ((Gdome_xml_CharacterData *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      4311: }
                   4312: /**
                   4313:  * gdome_cd_previousSibling:
                   4314:  * @self:  Node Object ref
                   4315:  * @exc:  Exception Object ref
                   4316:  *
                   4317:  * Returns: the node immediately preceding this node. If there is no such
                   4318:  * node, this returns %NULL.
                   4319:  */
1.2     ! paf      4320: xmlNode *
1.1       paf      4321: gdome_cd_previousSibling (GdomeCharacterData *self, GdomeException *exc)
                   4322: {
                   4323:  if (self == NULL) {
                   4324:    *exc = GDOME_NULL_POINTER_ERR;
                   4325:    return NULL;
                   4326:  }
                   4327:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4328:    *exc = GDOME_INVALID_STATE_ERR;
                   4329:    return NULL;
                   4330:  }
                   4331:  *exc = 0;
1.2     ! paf      4332:  return ((Gdome_xml_CharacterData *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      4333: }
                   4334: /**
                   4335:  * gdome_cd_ref:
                   4336:  * @self:  Node Object ref
                   4337:  * @exc:  Exception Object ref
                   4338:  *
                   4339:  * Increase the reference count of the specified Node.
                   4340:  */
                   4341: void
                   4342: gdome_cd_ref (GdomeCharacterData *self, GdomeException *exc)
                   4343: {
                   4344:  if (self == NULL) {
                   4345:    *exc = GDOME_NULL_POINTER_ERR;
                   4346:    return;
                   4347:  }
                   4348:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4349:    *exc = GDOME_INVALID_STATE_ERR;
                   4350:    return;
                   4351:  }
                   4352:  *exc = 0;
1.2     ! paf      4353:  ((Gdome_xml_CharacterData *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      4354: }
                   4355: /**
                   4356:  * gdome_cd_unref:
                   4357:  * @self:  Node Object ref
                   4358:  * @exc:  Exception Object ref
                   4359:  *
                   4360:  * Decrease the reference count of the specified Node. Free the Node structure
                   4361:  * if the Node will have zero reference.
                   4362:  */
                   4363: void
                   4364: gdome_cd_unref (GdomeCharacterData *self, GdomeException *exc)
                   4365: {
                   4366:  if (self == NULL) {
                   4367:    *exc = GDOME_NULL_POINTER_ERR;
                   4368:    return;
                   4369:  }
                   4370:  *exc = 0;
                   4371:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4372:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   4373:      ((Gdome_xml_Node *)self)->refcnt--;
                   4374: 
                   4375:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   4376: #ifdef DEBUG_REFCNT
                   4377:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   4378: #endif
                   4379:      g_free (self);
                   4380:    }
                   4381:    return;
                   4382:  }
1.2     ! paf      4383:  ((Gdome_xml_CharacterData *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      4384: }
                   4385: /**
                   4386:  * gdome_cd_query_interface:
                   4387:  * @self:  Node Object ref
                   4388:  * @interface:  interface needed
                   4389:  * @exc:  Exception Object ref
                   4390:  *
                   4391:  * Returns: a reference to this object that implements the @interface needed,
                   4392:  *          or %NULL if the @interface is not supported by this Object.
                   4393:  */
                   4394: gpointer
                   4395: gdome_cd_query_interface (GdomeCharacterData *self, const char *interface, GdomeException *exc)
                   4396: {
                   4397:  if (self == NULL) {
                   4398:    *exc = GDOME_NULL_POINTER_ERR;
                   4399:    return NULL;
                   4400:  }
                   4401:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4402:    *exc = GDOME_INVALID_STATE_ERR;
                   4403:    return NULL;
                   4404:  }
                   4405:  *exc = 0;
1.2     ! paf      4406:  return ((Gdome_xml_CharacterData *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      4407: }
                   4408: /**
                   4409:  * gdome_cd_appendChild:
                   4410:  * @self:  Node Object ref
                   4411:  * @newChild:  The node to add
                   4412:  * @exc:  Exception Object ref
                   4413:  *
                   4414:  * Adds the node @newChild to the end of the list of children of this node.
                   4415:  * If the @newChild is already in the tree, it is first removed. If it is a
                   4416:  * DocumentFragment node, the entire contents of the document fragment are
                   4417:  * moved into the child list of this node
                   4418:  *
                   4419:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   4420:  * allow children of the type of the @newChild node, or if the node to append is
                   4421:  * one of this node's ancestors or this node itself.
                   4422:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   4423:  * document than the one that created this node.
                   4424:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   4425:  * Returns: the node added.
                   4426:  */
1.2     ! paf      4427: xmlNode *
        !          4428: gdome_cd_appendChild (GdomeCharacterData *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      4429: {
                   4430:  if (self == NULL) {
                   4431:    *exc = GDOME_NULL_POINTER_ERR;
                   4432:    return NULL;
                   4433:  }
                   4434:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4435:    *exc = GDOME_INVALID_STATE_ERR;
                   4436:    return NULL;
                   4437:  }
                   4438:  *exc = 0;
1.2     ! paf      4439:  return ((Gdome_xml_CharacterData *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      4440: }
                   4441: /**
                   4442:  * gdome_cd_cloneNode:
                   4443:  * @self:  Node Object ref
                   4444:  * @deep:  If true, recursively clone the subtree under the specified node;
                   4445:  *         if false, clone only the node itself (and its attributes, if it is
                   4446:  *         an Element).
                   4447:  * @exc:  Exception Object ref
                   4448:  *
                   4449:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   4450:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   4451:  * %NULL).
                   4452:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   4453:  * nodes are not supported.
                   4454:  *
                   4455:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   4456:  * supported.
                   4457:  * Returns: the duplicate node.
                   4458:  */
1.2     ! paf      4459: xmlNode *
1.1       paf      4460: gdome_cd_cloneNode (GdomeCharacterData *self, GdomeBoolean deep, GdomeException *exc)
                   4461: {
                   4462:  if (self == NULL) {
                   4463:    *exc = GDOME_NULL_POINTER_ERR;
                   4464:    return NULL;
                   4465:  }
                   4466:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4467:    *exc = GDOME_INVALID_STATE_ERR;
                   4468:    return NULL;
                   4469:  }
                   4470:  *exc = 0;
1.2     ! paf      4471:  return ((Gdome_xml_CharacterData *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      4472: }
                   4473: /**
                   4474:  * gdome_cd_hasAttributes:
                   4475:  * @self:  Node Object ref
                   4476:  * @exc:  Exception Object ref
                   4477:  *
                   4478:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   4479:  */
                   4480: GdomeBoolean
                   4481: gdome_cd_hasAttributes (GdomeCharacterData *self, GdomeException *exc)
                   4482: {
                   4483:  if (self == NULL) {
                   4484:    *exc = GDOME_NULL_POINTER_ERR;
                   4485:    return FALSE;
                   4486:  }
                   4487:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4488:    *exc = GDOME_INVALID_STATE_ERR;
                   4489:    return FALSE;
                   4490:  }
                   4491:  *exc = 0;
1.2     ! paf      4492:  return ((Gdome_xml_CharacterData *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      4493: }
                   4494: /**
                   4495:  * gdome_cd_hasChildNodes:
                   4496:  * @self:  Node Object ref
                   4497:  * @exc:  Exception Object ref
                   4498:  *
                   4499:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   4500:  */
                   4501: GdomeBoolean
                   4502: gdome_cd_hasChildNodes (GdomeCharacterData *self, GdomeException *exc)
                   4503: {
                   4504:  if (self == NULL) {
                   4505:    *exc = GDOME_NULL_POINTER_ERR;
                   4506:    return FALSE;
                   4507:  }
                   4508:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4509:    *exc = GDOME_INVALID_STATE_ERR;
                   4510:    return FALSE;
                   4511:  }
                   4512:  *exc = 0;
1.2     ! paf      4513:  return ((Gdome_xml_CharacterData *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      4514: }
                   4515: /**
                   4516:  * gdome_cd_insertBefore:
                   4517:  * @self:  Node Object ref
                   4518:  * @newChild:  The new node to put in the child list
                   4519:  * @refChild:  the reference node, i.e., the node before which the new node
                   4520:  *             must be inserted.
                   4521:  * @exc:  Exception Object ref
                   4522:  *
                   4523:  * Inserts the node @newChild before the existing child node @refChild. If
                   4524:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   4525:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   4526:  * in the same order, before @refChild. If the @newChild is already in the
                   4527:  * tree, it is first removed.
                   4528:  *
                   4529:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   4530:  * allow children of the type of the @newChild node, or if the node to insert is
                   4531:  * one of this node's ancestors or this node itself.
                   4532:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   4533:  * document than the one that created this node.
                   4534:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   4535:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   4536:  * Returns: the node being inserted.
                   4537:  */
1.2     ! paf      4538: xmlNode *
        !          4539: gdome_cd_insertBefore (GdomeCharacterData *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      4540: {
                   4541:  if (self == NULL) {
                   4542:    *exc = GDOME_NULL_POINTER_ERR;
                   4543:    return NULL;
                   4544:  }
                   4545:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4546:    *exc = GDOME_INVALID_STATE_ERR;
                   4547:    return NULL;
                   4548:  }
                   4549:  *exc = 0;
1.2     ! paf      4550:  return ((Gdome_xml_CharacterData *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      4551: }
                   4552: /**
                   4553:  * gdome_cd_isSupported:
                   4554:  * @self:  Node Object ref
                   4555:  * @feature:  The name of the feature to test.
                   4556:  * @version:  This is the version number of the feature to test. In Level 2,
                   4557:  *            version 1, this is the string "2.0". If the version is not
                   4558:  *            specified, supporting any version of the feature will cause the
                   4559:  *            method to return %TRUE.
                   4560:  * @exc:  Exception Object ref
                   4561:  *
                   4562:  * Tests whether the DOM implementation implements a specific feature and that
                   4563:  * feature is supported by this node.
                   4564:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   4565:  * otherwise.
                   4566:  */
                   4567: GdomeBoolean
                   4568: gdome_cd_isSupported (GdomeCharacterData *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   4569: {
                   4570:  if (self == NULL) {
                   4571:    *exc = GDOME_NULL_POINTER_ERR;
                   4572:    return FALSE;
                   4573:  }
                   4574:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4575:    *exc = GDOME_INVALID_STATE_ERR;
                   4576:    return FALSE;
                   4577:  }
                   4578:  *exc = 0;
1.2     ! paf      4579:  return ((Gdome_xml_CharacterData *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      4580: }
                   4581: /**
                   4582:  * gdome_cd_normalize:
                   4583:  * @self:  Node Object ref
                   4584:  * @exc:  Exception Object ref
                   4585:  *
                   4586:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   4587:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   4588:  * elements, comments, processing instructions, CDATA sections, and entity
                   4589:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   4590:  * nodes nor empty Text nodes.
                   4591:  */
                   4592: void
                   4593: gdome_cd_normalize (GdomeCharacterData *self, GdomeException *exc)
                   4594: {
                   4595:  if (self == NULL) {
                   4596:    *exc = GDOME_NULL_POINTER_ERR;
                   4597:    return;
                   4598:  }
                   4599:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4600:    *exc = GDOME_INVALID_STATE_ERR;
                   4601:    return;
                   4602:  }
                   4603:  *exc = 0;
1.2     ! paf      4604:  ((Gdome_xml_CharacterData *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      4605: }
                   4606: /**
                   4607:  * gdome_cd_removeChild:
                   4608:  * @self:  Node Object ref
                   4609:  * @oldChild:  The node being removed
                   4610:  * @exc:  Exception Object ref
                   4611:  *
                   4612:  * Removes the child node indicated by @oldChild from the list of children, and
                   4613:  * returns it.
                   4614:  *
                   4615:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   4616:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   4617:  * Returns: the node removed.
                   4618:  */
1.2     ! paf      4619: xmlNode *
        !          4620: gdome_cd_removeChild (GdomeCharacterData *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      4621: {
                   4622:  if (self == NULL) {
                   4623:    *exc = GDOME_NULL_POINTER_ERR;
                   4624:    return NULL;
                   4625:  }
                   4626:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4627:    *exc = GDOME_INVALID_STATE_ERR;
                   4628:    return NULL;
                   4629:  }
                   4630:  *exc = 0;
1.2     ! paf      4631:  return ((Gdome_xml_CharacterData *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      4632: }
                   4633: /**
                   4634:  * gdome_cd_replaceChild:
                   4635:  * @self:  Node Object ref
                   4636:  * @newChild:  The new node to put in the child list
                   4637:  * @oldChild:  The node being replaced in the list
                   4638:  * @exc:  Exception Object ref
                   4639:  *
                   4640:  * Replaces the child node @oldChild with @newChild in the list of children,
                   4641:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   4642:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   4643:  * inserted in the same order. If the @newChild is already in the tree, it is
                   4644:  * first removed.
                   4645:  *
                   4646:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   4647:  * not allow children of the type of the @newChild node, or if the node to put
                   4648:  * in is one of this node's ancestors or this node itself.
                   4649:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   4650:  * document than the one that created this node.
                   4651:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   4652:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   4653:  * Returns: the node replaced.
                   4654:  */
1.2     ! paf      4655: xmlNode *
        !          4656: gdome_cd_replaceChild (GdomeCharacterData *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      4657: {
                   4658:  if (self == NULL) {
                   4659:    *exc = GDOME_NULL_POINTER_ERR;
                   4660:    return NULL;
                   4661:  }
                   4662:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4663:    *exc = GDOME_INVALID_STATE_ERR;
                   4664:    return NULL;
                   4665:  }
                   4666:  *exc = 0;
1.2     ! paf      4667:  return ((Gdome_xml_CharacterData *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      4668: }
                   4669: /**
                   4670:  * gdome_cd_addEventListener:
                   4671:  * @self:  Node Object ref
                   4672:  * @type:  the event type for which the user is registering
                   4673:  * @listener:  the listener parameter takes an interface implemented by the
                   4674:  *             user which contains the methods to be called when the event occurs.
                   4675:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   4676:  *               capture. After initiating capture, all events of the specified
                   4677:  *               type will be dispatched to the registered EventListener before
                   4678:  *               being dispatched to any EventTargets beneath them in the tree.
                   4679:  *               Events which are bubbling upward through the tree will not
                   4680:  *               trigger an EventListener designated to use capture.
                   4681:  * @exc:  Exception Object ref
                   4682:  *
                   4683:  * This method allows the registration of event listeners on the event target.
                   4684:  * If an EventListener is added to an EventTarget while it is processing an
                   4685:  * event, it will not be triggered by the current actions but may be triggered
                   4686:  * during a later stage of event flow, such as the bubbling phase.
                   4687:  * If multiple identical EventListeners are registered on the same EventTarget
                   4688:  * with the same parameters the duplicate instances are discarded. They do not
                   4689:  * cause the EventListener to be called twice and since they are discarded
                   4690:  * they do not need to be removed with the removeEventListener method.
                   4691:  */
                   4692: void
                   4693: gdome_cd_addEventListener (GdomeCharacterData *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   4694: {
                   4695:  if (self == NULL) {
                   4696:    *exc = GDOME_NULL_POINTER_ERR;
                   4697:    return;
                   4698:  }
                   4699:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4700:    *exc = GDOME_INVALID_STATE_ERR;
                   4701:    return;
                   4702:  }
                   4703:  *exc = 0;
1.2     ! paf      4704:  ((Gdome_xml_CharacterData *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      4705: }
                   4706: /**
                   4707:  * gdome_cd_removeEventListener:
                   4708:  * @self:  Node Object ref
                   4709:  * @type:  Specifies the event type of the EventListener being removed.
                   4710:  * @listener:  The EventListener parameter indicates the EventListener to be
                   4711:  *             removed.
                   4712:  * @useCapture:  Specifies whether the EventListener being removed was
                   4713:  *               registered as a capturing listener or not. If a listener was
                   4714:  *               registered twice, one with capture and one without, each must
                   4715:  *               be removed separately. Removal of a capturing listener does
                   4716:  *               not affect a non-capturing version of the same listener, and
                   4717:  *               vice versa.
                   4718:  * @exc:  Exception Object ref
                   4719:  *
                   4720:  * This method allows the removal of event listeners from the event target. If
                   4721:  * an EventListener is removed from an EventTarget while it is processing an
                   4722:  * event, it will not be triggered by the current actions. EventListeners can
                   4723:  * never be invoked after being removed. Calling removeEventListener with
                   4724:  * arguments which do not identify any currently registered EventListener on
                   4725:  * the EventTarget has no effect.
                   4726:  */
                   4727: void
                   4728: gdome_cd_removeEventListener (GdomeCharacterData *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   4729: {
                   4730:  if (self == NULL) {
                   4731:    *exc = GDOME_NULL_POINTER_ERR;
                   4732:    return;
                   4733:  }
                   4734:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4735:    *exc = GDOME_INVALID_STATE_ERR;
                   4736:    return;
                   4737:  }
                   4738:  *exc = 0;
1.2     ! paf      4739:  ((Gdome_xml_CharacterData *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      4740: }
                   4741: /**
                   4742:  * gdome_cd_dispatchEvent:
                   4743:  * @self:  Node Object ref
                   4744:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   4745:  *        used in processing the event.
                   4746:  * @exc:  Exception Object ref
                   4747:  *
                   4748:  * This method allows the dispatch of events into the implementations event
                   4749:  * model. Events dispatched in this manner will have the same capturing and
                   4750:  * bubbling behavior as events dispatched directly by the implementation. The
                   4751:  * target of the event is the EventTarget on which dispatchEvent is called.
                   4752:  *
                   4753:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   4754:  * specified by initializing the event before dispatchEvent was called.
                   4755:  * Specification of the Event's type as %NULL or an empty string will also
                   4756:  * trigger this exception.
                   4757:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   4758:  *          is %TRUE.
                   4759:  */
                   4760: GdomeBoolean
                   4761: gdome_cd_dispatchEvent (GdomeCharacterData *self, GdomeEvent *evt, GdomeException *exc)
                   4762: {
                   4763:  if (self == NULL) {
                   4764:    *exc = GDOME_NULL_POINTER_ERR;
                   4765:    return FALSE;
                   4766:  }
                   4767:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4768:    *exc = GDOME_INVALID_STATE_ERR;
                   4769:    return FALSE;
                   4770:  }
                   4771:  *exc = 0;
1.2     ! paf      4772:  return ((Gdome_xml_CharacterData *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      4773: }
                   4774: /**
                   4775:  * gdome_cd_subTreeDispatchEvent:
                   4776:  * @self:  Node Object ref
                   4777:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   4778:  *        used in processing the event.
                   4779:  * @exc:  Exception Object ref
                   4780:  *
                   4781:  * This method allows the dispatch of events into the implementations event
                   4782:  * model. Events dispatched in this manner will have the same capturing and
                   4783:  * bubbling behavior as events dispatched directly by the implementation. The
                   4784:  * target of the event is any nodes in the subtree of the EventTarget on which
                   4785:  * dispatchEvent is called.
                   4786:  *
                   4787:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   4788:  * specified by initializing the event before dispatchEvent was called.
                   4789:  * Specification of the Event's type as %NULL or an empty string will also
                   4790:  * trigger this exception.
                   4791:  */
                   4792: void
                   4793: gdome_cd_subTreeDispatchEvent (GdomeCharacterData *self, GdomeEvent *evt, GdomeException *exc)
                   4794: {
                   4795:  if (self == NULL) {
                   4796:    *exc = GDOME_NULL_POINTER_ERR;
                   4797:    return;
                   4798:  }
                   4799:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4800:    *exc = GDOME_INVALID_STATE_ERR;
                   4801:    return;
                   4802:  }
                   4803:  *exc = 0;
1.2     ! paf      4804:  ((Gdome_xml_CharacterData *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      4805: }
                   4806: /**
                   4807:  * gdome_cd_canAppend:
                   4808:  * @self:  Node Object ref
                   4809:  * @newChild:  The Node Object ref of the node to test
                   4810:  * @exc:  Exception Object ref
                   4811:  *
                   4812:  * Tests if a @newChild can be added in the child list of this node.
                   4813:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   4814:  */
                   4815: GdomeBoolean
1.2     ! paf      4816: gdome_cd_canAppend (GdomeCharacterData *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      4817: {
                   4818:  if (self == NULL) {
                   4819:    *exc = GDOME_NULL_POINTER_ERR;
                   4820:    return FALSE;
                   4821:  }
                   4822:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   4823:    *exc = GDOME_INVALID_STATE_ERR;
                   4824:    return FALSE;
                   4825:  }
                   4826:  *exc = 0;
1.2     ! paf      4827:  return ((Gdome_xml_CharacterData *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      4828: }
                   4829: 
                   4830: /******************************************************************************
                   4831:           GdomeText interface API
                   4832:  ******************************************************************************/
                   4833: /**
                   4834:  * gdome_t_splitText:
                   4835:  * @self:  The Text Object ref
                   4836:  * @offset: The 16-bit unit offset at which to split, starting from 0
                   4837:  * @exc:  The GdomeException Object ref
                   4838:  *
                   4839:  * Breaks this node into two nodes at the specified @offset, keeping both in
                   4840:  * the tree as siblings. After being split, this node will contain all the
                   4841:  * content up to the @offset point. A new node of the same type, which contains
                   4842:  * all the content at and after the @offset point, is returned. If the original
                   4843:  * node had a parent node, the new node is inserted as the next sibling of the
                   4844:  * original node. When the @offset is equal to the length of this node, the new
                   4845:  * node has no data.
                   4846:  *
                   4847:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified @offset is greater than the
                   4848:  * number of 16-bit units in data.
                   4849:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
                   4850:  * Returns: the new node, of the same type as this node.
                   4851:  */
                   4852: GdomeText *
                   4853: gdome_t_splitText (GdomeText *self, gulong offset, GdomeException *exc)
                   4854: {
                   4855:  if (self == NULL) {
                   4856:    *exc = GDOME_NULL_POINTER_ERR;
                   4857:    return NULL;
                   4858:  }
                   4859:  if (((Gdome_xml_Text *)self)->n == NULL) {
                   4860:    *exc = GDOME_INVALID_STATE_ERR;
                   4861:    return NULL;
                   4862:  }
                   4863:  *exc = 0;
                   4864:  return ((Gdome_xml_Text *)self)->vtab->splitText (self, offset, exc);
                   4865: }
                   4866: /**
                   4867:  * gdome_t_data:
                   4868:  * @self:  The CharacterData Object ref
                   4869:  * @exc:  The Exception Object ref
                   4870:  *
                   4871:  * Returns: the character data of the node that implements this interface.
                   4872:  */
                   4873: GdomeDOMString *
                   4874: gdome_t_data (GdomeText *self, GdomeException *exc)
                   4875: {
                   4876:  if (self == NULL) {
                   4877:    *exc = GDOME_NULL_POINTER_ERR;
                   4878:    return NULL;
                   4879:  }
                   4880:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   4881:    *exc = GDOME_INVALID_STATE_ERR;
                   4882:    return NULL;
                   4883:  }
                   4884:  *exc = 0;
                   4885:  return ((Gdome_xml_Text *)self)->vtab->super.data ((GdomeCharacterData *)self, exc);
                   4886: }
                   4887: /**
                   4888:  * gdome_t_set_data:
                   4889:  * @self:  The CharacterData Object ref
                   4890:  * @data:  The data value for this node
                   4891:  * @exc:  The Exception Object ref
                   4892:  *
                   4893:  * Sets the data value of this node.
                   4894:  *
                   4895:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   4896:  */
                   4897: void
                   4898: gdome_t_set_data (GdomeText *self, GdomeDOMString *data, GdomeException *exc)
                   4899: {
                   4900:  if (self == NULL) {
                   4901:    *exc = GDOME_NULL_POINTER_ERR;
                   4902:    return;
                   4903:  }
                   4904:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   4905:    *exc = GDOME_INVALID_STATE_ERR;
                   4906:    return;
                   4907:  }
                   4908:  *exc = 0;
                   4909:  ((Gdome_xml_Text *)self)->vtab->super.set_data ((GdomeCharacterData *)self, data, exc);
                   4910: }
                   4911: /**
                   4912:  * gdome_t_length:
                   4913:  * @self:  The CharacterData Object ref
                   4914:  * @exc:  The GdomeException Object ref
                   4915:  *
                   4916:  * Returns: The number of 16-bit units that are available. This may have the
                   4917:  * value zero, i.e., CharacterData nodes may be empty.
                   4918:  */
                   4919: gulong
                   4920: gdome_t_length (GdomeText *self, GdomeException *exc)
                   4921: {
                   4922:  if (self == NULL) {
                   4923:    *exc = GDOME_NULL_POINTER_ERR;
                   4924:    return 0L;
                   4925:  }
                   4926:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   4927:    *exc = GDOME_INVALID_STATE_ERR;
                   4928:    return 0L;
                   4929:  }
                   4930:  *exc = 0;
                   4931:  return ((Gdome_xml_Text *)self)->vtab->super.length ((GdomeCharacterData *)self, exc);
                   4932: }
                   4933: /**
                   4934:  * gdome_t_appendData:
                   4935:  * @self:  The CharacterData Object ref
                   4936:  * @arg:  The string to append
                   4937:  * @exc:  The Exception Object ref
                   4938:  *
                   4939:  * Append the string to the end of the character data of the node. Upon
                   4940:  * success, data provides access to the concatenation of data and the
                   4941:  * string specified.
                   4942:  *
                   4943:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   4944:  */
                   4945: void
                   4946: gdome_t_appendData (GdomeText *self, GdomeDOMString *arg, GdomeException *exc)
                   4947: {
                   4948:  if (self == NULL) {
                   4949:    *exc = GDOME_NULL_POINTER_ERR;
                   4950:    return;
                   4951:  }
                   4952:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   4953:    *exc = GDOME_INVALID_STATE_ERR;
                   4954:    return;
                   4955:  }
                   4956:  *exc = 0;
                   4957:  ((Gdome_xml_Text *)self)->vtab->super.appendData ((GdomeCharacterData *)self, arg, exc);
                   4958: }
                   4959: /**
                   4960:  * gdome_t_deleteData:
                   4961:  * @self:  The CharacterData Object ref
                   4962:  * @offset:  The offset from which to start removing
                   4963:  * @count:  The number of 16-bit units to delete.
                   4964:  * @exc:  The Exception Object ref
                   4965:  *
                   4966:  * Remove a range of 16-bit units from the node. If the sum of @offset and
                   4967:  * @count exceeds length then all 16-bit units from @offset to the end of the
                   4968:  * data are deleted. Upon success, data and length reflect the change.
                   4969:  *
                   4970:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the
                   4971:  * number of 16-bit units in data.
                   4972:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   4973:  */
                   4974: void
                   4975: gdome_t_deleteData (GdomeText *self, gulong offset, gulong count, GdomeException *exc)
                   4976: {
                   4977:  if (self == NULL) {
                   4978:    *exc = GDOME_NULL_POINTER_ERR;
                   4979:    return;
                   4980:  }
                   4981:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   4982:    *exc = GDOME_INVALID_STATE_ERR;
                   4983:    return;
                   4984:  }
                   4985:  *exc = 0;
                   4986:  ((Gdome_xml_Text *)self)->vtab->super.deleteData ((GdomeCharacterData *)self, offset, count, exc);
                   4987: }
                   4988: /**
                   4989:  * gdome_t_insertData:
                   4990:  * @self:  The CharacterData Object ref
                   4991:  * @offset:  The character offset at which to insert
                   4992:  * @arg:  The string to insert
                   4993:  * @exc:  The Exception Object ref
                   4994:  *
                   4995:  * Insert a string at the specified 16-bit unit offset.
                   4996:  *
                   4997:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the
                   4998:  * number of 16-bit units in data.
                   4999:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   5000:  */
                   5001: void
                   5002: gdome_t_insertData (GdomeText *self, gulong offset, GdomeDOMString *arg, GdomeException *exc)
                   5003: {
                   5004:  if (self == NULL) {
                   5005:    *exc = GDOME_NULL_POINTER_ERR;
                   5006:    return;
                   5007:  }
                   5008:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   5009:    *exc = GDOME_INVALID_STATE_ERR;
                   5010:    return;
                   5011:  }
                   5012:  *exc = 0;
                   5013:  ((Gdome_xml_Text *)self)->vtab->super.insertData ((GdomeCharacterData *)self, offset, arg, exc);
                   5014: }
                   5015: /**
                   5016:  * gdome_t_replaceData:
                   5017:  * @self:  The CharacterData Object ref
                   5018:  * @offset:  The offset from which to start replacing
                   5019:  * @count:  The number of 16-bit units to replace.
                   5020:  * @arg:  The String with which the range must be replaced
                   5021:  * @exc:  The GdomeException Object ref
                   5022:  *
                   5023:  * Replace the characters starting at the specified 16-bit unit @offset with
                   5024:  * the specified string. If the sum of @offset and @count exceeds length, then
                   5025:  * all 16-bit units to the end of the data are replaced;
                   5026:  *
                   5027:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified @offset is greater than the
                   5028:  * number of 16-bit units in data.
                   5029:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   5030:  */
                   5031: void
                   5032: gdome_t_replaceData (GdomeText *self, gulong offset, gulong count, GdomeDOMString *arg, GdomeException *exc)
                   5033: {
                   5034:  if (self == NULL) {
                   5035:    *exc = GDOME_NULL_POINTER_ERR;
                   5036:    return;
                   5037:  }
                   5038:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   5039:    *exc = GDOME_INVALID_STATE_ERR;
                   5040:    return;
                   5041:  }
                   5042:  *exc = 0;
                   5043:  ((Gdome_xml_Text *)self)->vtab->super.replaceData ((GdomeCharacterData *)self, offset, count, arg, exc);
                   5044: }
                   5045: /**
                   5046:  * gdome_t_substringData:
                   5047:  * @self:  The CharacterData Object ref
                   5048:  * @offset:  Start offset of substring to extract
                   5049:  * @count:  The number of 16-bit units to extract
                   5050:  * @exc:  The Exception Object ref
                   5051:  *
                   5052:  * Extracts a range of data from the node.
                   5053:  *
                   5054:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified @offset is greater than the
                   5055:  * number of 16-bit units in data.
                   5056:  * Returns: The specified substring. If the sum of @offset and @count exceeds
                   5057:  * the length, then all 16-bit units to the end of the data are returned.
                   5058:  */
                   5059: GdomeDOMString *
                   5060: gdome_t_substringData (GdomeText *self, gulong offset, gulong count, GdomeException *exc)
                   5061: {
                   5062:  if (self == NULL) {
                   5063:    *exc = GDOME_NULL_POINTER_ERR;
                   5064:    return NULL;
                   5065:  }
                   5066:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   5067:    *exc = GDOME_INVALID_STATE_ERR;
                   5068:    return NULL;
                   5069:  }
                   5070:  *exc = 0;
                   5071:  return ((Gdome_xml_Text *)self)->vtab->super.substringData ((GdomeCharacterData *)self, offset, count, exc);
                   5072: }
                   5073: /**
                   5074:  * gdome_t_attributes:
                   5075:  * @self:  Node Object ref
                   5076:  * @exc:  Exception Object ref
                   5077:  *
                   5078:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   5079:  * Element) or %NULL otherwise.
                   5080:  */
                   5081: GdomeNamedNodeMap *
                   5082: gdome_t_attributes (GdomeText *self, GdomeException *exc)
                   5083: {
                   5084:  if (self == NULL) {
                   5085:    *exc = GDOME_NULL_POINTER_ERR;
                   5086:    return NULL;
                   5087:  }
                   5088:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5089:    *exc = GDOME_INVALID_STATE_ERR;
                   5090:    return NULL;
                   5091:  }
                   5092:  *exc = 0;
1.2     ! paf      5093:  return ((Gdome_xml_Text *)self)->vtab->super.super.attributes ((xmlNode *)self, exc);
1.1       paf      5094: }
                   5095: /**
                   5096:  * gdome_t_childNodes:
                   5097:  * @self:  Node Object ref
                   5098:  * @exc:  Exception Object ref
                   5099:  *
                   5100:  * Returns: a NodeList that contains all children of this node. If there are no
                   5101:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   5102:  * not considered to be children of element nodes - use gdome_n_attributes to
                   5103:  * obtain the attributes.
                   5104:  */
                   5105: GdomeNodeList *
                   5106: gdome_t_childNodes (GdomeText *self, GdomeException *exc)
                   5107: {
                   5108:  if (self == NULL) {
                   5109:    *exc = GDOME_NULL_POINTER_ERR;
                   5110:    return NULL;
                   5111:  }
                   5112:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5113:    *exc = GDOME_INVALID_STATE_ERR;
                   5114:    return NULL;
                   5115:  }
                   5116:  *exc = 0;
1.2     ! paf      5117:  return ((Gdome_xml_Text *)self)->vtab->super.super.childNodes ((xmlNode *)self, exc);
1.1       paf      5118: }
                   5119: /**
                   5120:  * gdome_t_firstChild:
                   5121:  * @self:  Node Object ref
                   5122:  * @exc:  Exception Object ref
                   5123:  * 
                   5124:  * Returns: the first child of this node. If there is no such node,
                   5125:  * this returns %NULL.
                   5126:  */
1.2     ! paf      5127: xmlNode *
1.1       paf      5128: gdome_t_firstChild (GdomeText *self, GdomeException *exc)
                   5129: {
                   5130:  if (self == NULL) {
                   5131:    *exc = GDOME_NULL_POINTER_ERR;
                   5132:    return NULL;
                   5133:  }
                   5134:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5135:    *exc = GDOME_INVALID_STATE_ERR;
                   5136:    return NULL;
                   5137:  }
                   5138:  *exc = 0;
1.2     ! paf      5139:  return ((Gdome_xml_Text *)self)->vtab->super.super.firstChild ((xmlNode *)self, exc);
1.1       paf      5140: }
                   5141: /**
                   5142:  * gdome_t_lastChild:
                   5143:  * @self:  Node Object ref
                   5144:  * @exc:  Exception Object ref
                   5145:  *
                   5146:  * Returns: the last child of this node. If there is no such node,
                   5147:  * this returns %NULL.
                   5148:  */
1.2     ! paf      5149: xmlNode *
1.1       paf      5150: gdome_t_lastChild (GdomeText *self, GdomeException *exc)
                   5151: {
                   5152:  if (self == NULL) {
                   5153:    *exc = GDOME_NULL_POINTER_ERR;
                   5154:    return NULL;
                   5155:  }
                   5156:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5157:    *exc = GDOME_INVALID_STATE_ERR;
                   5158:    return NULL;
                   5159:  }
                   5160:  *exc = 0;
1.2     ! paf      5161:  return ((Gdome_xml_Text *)self)->vtab->super.super.lastChild ((xmlNode *)self, exc);
1.1       paf      5162: }
                   5163: /**
                   5164:  * gdome_t_localName:
                   5165:  * @self:  Node Objects ref
                   5166:  * @exc:  Exception Object ref
                   5167:  *
                   5168:  * Returns: the local part of the qualified name of this node.
                   5169:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   5170:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   5171:  * always %NULL.
                   5172:  */
                   5173: GdomeDOMString *
                   5174: gdome_t_localName (GdomeText *self, GdomeException *exc)
                   5175: {
                   5176:  if (self == NULL) {
                   5177:    *exc = GDOME_NULL_POINTER_ERR;
                   5178:    return NULL;
                   5179:  }
                   5180:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5181:    *exc = GDOME_INVALID_STATE_ERR;
                   5182:    return NULL;
                   5183:  }
                   5184:  *exc = 0;
1.2     ! paf      5185:  return ((Gdome_xml_Text *)self)->vtab->super.super.localName ((xmlNode *)self, exc);
1.1       paf      5186: }
                   5187: /**
                   5188:  * gdome_t_namespaceURI:
                   5189:  * @self:  Node Objects ref
                   5190:  * @exc:  Exception Object ref
                   5191:  *
                   5192:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   5193:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   5194:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   5195:  * always %NULL.
                   5196:  */
                   5197: GdomeDOMString *
                   5198: gdome_t_namespaceURI (GdomeText *self, GdomeException *exc)
                   5199: {
                   5200:  if (self == NULL) {
                   5201:    *exc = GDOME_NULL_POINTER_ERR;
                   5202:    return NULL;
                   5203:  }
                   5204:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5205:    *exc = GDOME_INVALID_STATE_ERR;
                   5206:    return NULL;
                   5207:  }
                   5208:  *exc = 0;
1.2     ! paf      5209:  return ((Gdome_xml_Text *)self)->vtab->super.super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      5210: }
                   5211: /**
                   5212:  * gdome_t_nextSibling:
                   5213:  * @self:  Node Object ref
                   5214:  * @exc:  Exception Object ref
                   5215:  *
                   5216:  * Returns: the node immediately following this node. If there is no such
                   5217:  * node, this returns %NULL.
                   5218:  */
1.2     ! paf      5219: xmlNode *
1.1       paf      5220: gdome_t_nextSibling (GdomeText *self, GdomeException *exc)
                   5221: {
                   5222:  if (self == NULL) {
                   5223:    *exc = GDOME_NULL_POINTER_ERR;
                   5224:    return NULL;
                   5225:  }
                   5226:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5227:    *exc = GDOME_INVALID_STATE_ERR;
                   5228:    return NULL;
                   5229:  }
                   5230:  *exc = 0;
1.2     ! paf      5231:  return ((Gdome_xml_Text *)self)->vtab->super.super.nextSibling ((xmlNode *)self, exc);
1.1       paf      5232: }
                   5233: /**
                   5234:  * gdome_t_nodeName:
                   5235:  * @self:  Node Object ref
                   5236:  * @exc:  Exception Object ref
                   5237:  *
                   5238:  * Returns: the name of this node, depending on its type.
                   5239:  */
                   5240: GdomeDOMString *
                   5241: gdome_t_nodeName (GdomeText *self, GdomeException *exc)
                   5242: {
                   5243:  if (self == NULL) {
                   5244:    *exc = GDOME_NULL_POINTER_ERR;
                   5245:    return NULL;
                   5246:  }
                   5247:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5248:    *exc = GDOME_INVALID_STATE_ERR;
                   5249:    return NULL;
                   5250:  }
                   5251:  *exc = 0;
1.2     ! paf      5252:  return ((Gdome_xml_Text *)self)->vtab->super.super.nodeName ((xmlNode *)self, exc);
1.1       paf      5253: }
                   5254: /**
                   5255:  * gdome_t_nodeType:
                   5256:  * @self:  Node Object ref
                   5257:  * @exc:  Exception Object ref
                   5258:  *
                   5259:  * Returns: an integer bigger than %0 representing the type of the underlying
                   5260:  * object or %0 on error.
                   5261:  */
                   5262: unsigned short
                   5263: gdome_t_nodeType (GdomeText *self, GdomeException *exc)
                   5264: {
                   5265:  if (self == NULL) {
                   5266:    *exc = GDOME_NULL_POINTER_ERR;
                   5267:    return 0;
                   5268:  }
                   5269:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5270:    *exc = GDOME_INVALID_STATE_ERR;
                   5271:    return 0;
                   5272:  }
                   5273:  *exc = 0;
1.2     ! paf      5274:  return ((Gdome_xml_Text *)self)->vtab->super.super.nodeType ((xmlNode *)self, exc);
1.1       paf      5275: }
                   5276: /**
                   5277:  * gdome_t_nodeValue:
                   5278:  * @self:  Node Object ref
                   5279:  * @exc:  Exception Object ref
                   5280:  *
                   5281:  * Returns: the value of this node, depending on its type.
                   5282:  */
                   5283: GdomeDOMString *
                   5284: gdome_t_nodeValue (GdomeText *self, GdomeException *exc)
                   5285: {
                   5286:  if (self == NULL) {
                   5287:    *exc = GDOME_NULL_POINTER_ERR;
                   5288:    return NULL;
                   5289:  }
                   5290:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5291:    *exc = GDOME_INVALID_STATE_ERR;
                   5292:    return NULL;
                   5293:  }
                   5294:  *exc = 0;
1.2     ! paf      5295:  return ((Gdome_xml_Text *)self)->vtab->super.super.nodeValue ((xmlNode *)self, exc);
1.1       paf      5296: }
                   5297: /**
                   5298:  * gdome_t_set_nodeValue:
                   5299:  * @self:  Node Object ref
                   5300:  * @nodeValue:  The new value for this node.
                   5301:  * @exc:  Exception Object ref
                   5302:  *
                   5303:  * Sets The value of this node, depending on its type.
                   5304:  *
                   5305:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   5306:  */
                   5307: void
                   5308: gdome_t_set_nodeValue (GdomeText *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   5309: {
                   5310:  if (self == NULL) {
                   5311:    *exc = GDOME_NULL_POINTER_ERR;
                   5312:    return;
                   5313:  }
                   5314:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5315:    *exc = GDOME_INVALID_STATE_ERR;
                   5316:    return;
                   5317:  }
                   5318:  *exc = 0;
1.2     ! paf      5319:  ((Gdome_xml_Text *)self)->vtab->super.super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      5320: }
                   5321: /**
                   5322:  * gdome_t_ownerDocument:
                   5323:  * @self:  Node Objects ref
                   5324:  * @exc:  Exception Object ref
                   5325:  *
                   5326:  * Returns: the documment object associated with this node. This is also the
                   5327:  * Document object used to create new nodes. When this node is a Document or a
                   5328:  * DocumentType which is not used with any Document yet, this is %NULL.
                   5329:  */
                   5330: GdomeDocument *
                   5331: gdome_t_ownerDocument (GdomeText *self, GdomeException *exc)
                   5332: {
                   5333:  if (self == NULL) {
                   5334:    *exc = GDOME_NULL_POINTER_ERR;
                   5335:    return NULL;
                   5336:  }
                   5337:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5338:    *exc = GDOME_INVALID_STATE_ERR;
                   5339:    return NULL;
                   5340:  }
                   5341:  *exc = 0;
1.2     ! paf      5342:  return ((Gdome_xml_Text *)self)->vtab->super.super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      5343: }
                   5344: /**
                   5345:  * gdome_t_parentNode:
                   5346:  * @self: Node Object ref
                   5347:  * @exc: Exception Object ref
                   5348:  *
                   5349:  * Returns: the parent of this node. All nodes, except Attr,
                   5350:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   5351:  * if a node has just been created and not yet added to the tree, or if it has
                   5352:  * been removed from the tree, this is %NULL.
                   5353:  */
1.2     ! paf      5354: xmlNode *
1.1       paf      5355: gdome_t_parentNode (GdomeText *self, GdomeException *exc)
                   5356: {
                   5357:  if (self == NULL) {
                   5358:    *exc = GDOME_NULL_POINTER_ERR;
                   5359:    return NULL;
                   5360:  }
                   5361:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5362:    *exc = GDOME_INVALID_STATE_ERR;
                   5363:    return NULL;
                   5364:  }
                   5365:  *exc = 0;
1.2     ! paf      5366:  return ((Gdome_xml_Text *)self)->vtab->super.super.parentNode ((xmlNode *)self, exc);
1.1       paf      5367: }
                   5368: /**
                   5369:  * gdome_t_prefix:
                   5370:  * @self:  Node Objects ref
                   5371:  * @exc:  Exception Object ref
                   5372:  *
                   5373:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   5374:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   5375:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   5376:  * always %NULL.
                   5377:  */
                   5378: GdomeDOMString *
                   5379: gdome_t_prefix (GdomeText *self, GdomeException *exc)
                   5380: {
                   5381:  if (self == NULL) {
                   5382:    *exc = GDOME_NULL_POINTER_ERR;
                   5383:    return NULL;
                   5384:  }
                   5385:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5386:    *exc = GDOME_INVALID_STATE_ERR;
                   5387:    return NULL;
                   5388:  }
                   5389:  *exc = 0;
1.2     ! paf      5390:  return ((Gdome_xml_Text *)self)->vtab->super.super.prefix ((xmlNode *)self, exc);
1.1       paf      5391: }
                   5392: /**
                   5393:  * gdome_t_set_prefix:
                   5394:  * @self:  Node Object ref
                   5395:  * @prefix:  The new prefix for this node.
                   5396:  * @exc:  Exception Object ref
                   5397:  *
                   5398:  * Sets a new nemaspace prefix for this node.
                   5399:  *
                   5400:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   5401:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   5402:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   5403:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   5404:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   5405:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   5406:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   5407:  * an attribute and the qualifiedName of this node is "xmlns".
                   5408:  */
                   5409: void
                   5410: gdome_t_set_prefix (GdomeText *self, GdomeDOMString *prefix, GdomeException *exc)
                   5411: {
                   5412:  if (self == NULL) {
                   5413:    *exc = GDOME_NULL_POINTER_ERR;
                   5414:    return;
                   5415:  }
                   5416:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5417:    *exc = GDOME_INVALID_STATE_ERR;
                   5418:    return;
                   5419:  }
                   5420:  *exc = 0;
1.2     ! paf      5421:  ((Gdome_xml_Text *)self)->vtab->super.super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      5422: }
                   5423: /**
                   5424:  * gdome_t_previousSibling:
                   5425:  * @self:  Node Object ref
                   5426:  * @exc:  Exception Object ref
                   5427:  *
                   5428:  * Returns: the node immediately preceding this node. If there is no such
                   5429:  * node, this returns %NULL.
                   5430:  */
1.2     ! paf      5431: xmlNode *
1.1       paf      5432: gdome_t_previousSibling (GdomeText *self, GdomeException *exc)
                   5433: {
                   5434:  if (self == NULL) {
                   5435:    *exc = GDOME_NULL_POINTER_ERR;
                   5436:    return NULL;
                   5437:  }
                   5438:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5439:    *exc = GDOME_INVALID_STATE_ERR;
                   5440:    return NULL;
                   5441:  }
                   5442:  *exc = 0;
1.2     ! paf      5443:  return ((Gdome_xml_Text *)self)->vtab->super.super.previousSibling ((xmlNode *)self, exc);
1.1       paf      5444: }
                   5445: /**
                   5446:  * gdome_t_ref:
                   5447:  * @self:  Node Object ref
                   5448:  * @exc:  Exception Object ref
                   5449:  *
                   5450:  * Increase the reference count of the specified Node.
                   5451:  */
                   5452: void
                   5453: gdome_t_ref (GdomeText *self, GdomeException *exc)
                   5454: {
                   5455:  if (self == NULL) {
                   5456:    *exc = GDOME_NULL_POINTER_ERR;
                   5457:    return;
                   5458:  }
                   5459:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5460:    *exc = GDOME_INVALID_STATE_ERR;
                   5461:    return;
                   5462:  }
                   5463:  *exc = 0;
1.2     ! paf      5464:  ((Gdome_xml_Text *)self)->vtab->super.super.ref ((xmlNode *)self, exc);
1.1       paf      5465: }
                   5466: /**
                   5467:  * gdome_t_unref:
                   5468:  * @self:  Node Object ref
                   5469:  * @exc:  Exception Object ref
                   5470:  *
                   5471:  * Decrease the reference count of the specified Node. Free the Node structure
                   5472:  * if the Node will have zero reference.
                   5473:  */
                   5474: void
                   5475: gdome_t_unref (GdomeText *self, GdomeException *exc)
                   5476: {
                   5477:  if (self == NULL) {
                   5478:    *exc = GDOME_NULL_POINTER_ERR;
                   5479:    return;
                   5480:  }
                   5481:  *exc = 0;
                   5482:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5483:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   5484:      ((Gdome_xml_Node *)self)->refcnt--;
                   5485: 
                   5486:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   5487: #ifdef DEBUG_REFCNT
                   5488:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   5489: #endif
                   5490:      g_free (self);
                   5491:    }
                   5492:    return;
                   5493:  }
1.2     ! paf      5494:  ((Gdome_xml_Text *)self)->vtab->super.super.unref ((xmlNode *)self, exc);
1.1       paf      5495: }
                   5496: /**
                   5497:  * gdome_t_query_interface:
                   5498:  * @self:  Node Object ref
                   5499:  * @interface:  interface needed
                   5500:  * @exc:  Exception Object ref
                   5501:  *
                   5502:  * Returns: a reference to this object that implements the @interface needed,
                   5503:  *          or %NULL if the @interface is not supported by this Object.
                   5504:  */
                   5505: gpointer
                   5506: gdome_t_query_interface (GdomeText *self, const char *interface, GdomeException *exc)
                   5507: {
                   5508:  if (self == NULL) {
                   5509:    *exc = GDOME_NULL_POINTER_ERR;
                   5510:    return NULL;
                   5511:  }
                   5512:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5513:    *exc = GDOME_INVALID_STATE_ERR;
                   5514:    return NULL;
                   5515:  }
                   5516:  *exc = 0;
1.2     ! paf      5517:  return ((Gdome_xml_Text *)self)->vtab->super.super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      5518: }
                   5519: /**
                   5520:  * gdome_t_appendChild:
                   5521:  * @self:  Node Object ref
                   5522:  * @newChild:  The node to add
                   5523:  * @exc:  Exception Object ref
                   5524:  *
                   5525:  * Adds the node @newChild to the end of the list of children of this node.
                   5526:  * If the @newChild is already in the tree, it is first removed. If it is a
                   5527:  * DocumentFragment node, the entire contents of the document fragment are
                   5528:  * moved into the child list of this node
                   5529:  *
                   5530:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   5531:  * allow children of the type of the @newChild node, or if the node to append is
                   5532:  * one of this node's ancestors or this node itself.
                   5533:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   5534:  * document than the one that created this node.
                   5535:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   5536:  * Returns: the node added.
                   5537:  */
1.2     ! paf      5538: xmlNode *
        !          5539: gdome_t_appendChild (GdomeText *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      5540: {
                   5541:  if (self == NULL) {
                   5542:    *exc = GDOME_NULL_POINTER_ERR;
                   5543:    return NULL;
                   5544:  }
                   5545:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5546:    *exc = GDOME_INVALID_STATE_ERR;
                   5547:    return NULL;
                   5548:  }
                   5549:  *exc = 0;
1.2     ! paf      5550:  return ((Gdome_xml_Text *)self)->vtab->super.super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      5551: }
                   5552: /**
                   5553:  * gdome_t_cloneNode:
                   5554:  * @self:  Node Object ref
                   5555:  * @deep:  If true, recursively clone the subtree under the specified node;
                   5556:  *         if false, clone only the node itself (and its attributes, if it is
                   5557:  *         an Element).
                   5558:  * @exc:  Exception Object ref
                   5559:  *
                   5560:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   5561:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   5562:  * %NULL).
                   5563:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   5564:  * nodes are not supported.
                   5565:  *
                   5566:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   5567:  * supported.
                   5568:  * Returns: the duplicate node.
                   5569:  */
1.2     ! paf      5570: xmlNode *
1.1       paf      5571: gdome_t_cloneNode (GdomeText *self, GdomeBoolean deep, GdomeException *exc)
                   5572: {
                   5573:  if (self == NULL) {
                   5574:    *exc = GDOME_NULL_POINTER_ERR;
                   5575:    return NULL;
                   5576:  }
                   5577:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5578:    *exc = GDOME_INVALID_STATE_ERR;
                   5579:    return NULL;
                   5580:  }
                   5581:  *exc = 0;
1.2     ! paf      5582:  return ((Gdome_xml_Text *)self)->vtab->super.super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      5583: }
                   5584: /**
                   5585:  * gdome_t_hasAttributes:
                   5586:  * @self:  Node Object ref
                   5587:  * @exc:  Exception Object ref
                   5588:  *
                   5589:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   5590:  */
                   5591: GdomeBoolean
                   5592: gdome_t_hasAttributes (GdomeText *self, GdomeException *exc)
                   5593: {
                   5594:  if (self == NULL) {
                   5595:    *exc = GDOME_NULL_POINTER_ERR;
                   5596:    return FALSE;
                   5597:  }
                   5598:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5599:    *exc = GDOME_INVALID_STATE_ERR;
                   5600:    return FALSE;
                   5601:  }
                   5602:  *exc = 0;
1.2     ! paf      5603:  return ((Gdome_xml_Text *)self)->vtab->super.super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      5604: }
                   5605: /**
                   5606:  * gdome_t_hasChildNodes:
                   5607:  * @self:  Node Object ref
                   5608:  * @exc:  Exception Object ref
                   5609:  *
                   5610:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   5611:  */
                   5612: GdomeBoolean
                   5613: gdome_t_hasChildNodes (GdomeText *self, GdomeException *exc)
                   5614: {
                   5615:  if (self == NULL) {
                   5616:    *exc = GDOME_NULL_POINTER_ERR;
                   5617:    return FALSE;
                   5618:  }
                   5619:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5620:    *exc = GDOME_INVALID_STATE_ERR;
                   5621:    return FALSE;
                   5622:  }
                   5623:  *exc = 0;
1.2     ! paf      5624:  return ((Gdome_xml_Text *)self)->vtab->super.super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      5625: }
                   5626: /**
                   5627:  * gdome_t_insertBefore:
                   5628:  * @self:  Node Object ref
                   5629:  * @newChild:  The new node to put in the child list
                   5630:  * @refChild:  the reference node, i.e., the node before which the new node
                   5631:  *             must be inserted.
                   5632:  * @exc:  Exception Object ref
                   5633:  *
                   5634:  * Inserts the node @newChild before the existing child node @refChild. If
                   5635:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   5636:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   5637:  * in the same order, before @refChild. If the @newChild is already in the
                   5638:  * tree, it is first removed.
                   5639:  *
                   5640:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   5641:  * allow children of the type of the @newChild node, or if the node to insert is
                   5642:  * one of this node's ancestors or this node itself.
                   5643:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   5644:  * document than the one that created this node.
                   5645:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   5646:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   5647:  * Returns: the node being inserted.
                   5648:  */
1.2     ! paf      5649: xmlNode *
        !          5650: gdome_t_insertBefore (GdomeText *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      5651: {
                   5652:  if (self == NULL) {
                   5653:    *exc = GDOME_NULL_POINTER_ERR;
                   5654:    return NULL;
                   5655:  }
                   5656:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5657:    *exc = GDOME_INVALID_STATE_ERR;
                   5658:    return NULL;
                   5659:  }
                   5660:  *exc = 0;
1.2     ! paf      5661:  return ((Gdome_xml_Text *)self)->vtab->super.super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      5662: }
                   5663: /**
                   5664:  * gdome_t_isSupported:
                   5665:  * @self:  Node Object ref
                   5666:  * @feature:  The name of the feature to test.
                   5667:  * @version:  This is the version number of the feature to test. In Level 2,
                   5668:  *            version 1, this is the string "2.0". If the version is not
                   5669:  *            specified, supporting any version of the feature will cause the
                   5670:  *            method to return %TRUE.
                   5671:  * @exc:  Exception Object ref
                   5672:  *
                   5673:  * Tests whether the DOM implementation implements a specific feature and that
                   5674:  * feature is supported by this node.
                   5675:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   5676:  * otherwise.
                   5677:  */
                   5678: GdomeBoolean
                   5679: gdome_t_isSupported (GdomeText *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   5680: {
                   5681:  if (self == NULL) {
                   5682:    *exc = GDOME_NULL_POINTER_ERR;
                   5683:    return FALSE;
                   5684:  }
                   5685:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5686:    *exc = GDOME_INVALID_STATE_ERR;
                   5687:    return FALSE;
                   5688:  }
                   5689:  *exc = 0;
1.2     ! paf      5690:  return ((Gdome_xml_Text *)self)->vtab->super.super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      5691: }
                   5692: /**
                   5693:  * gdome_t_normalize:
                   5694:  * @self:  Node Object ref
                   5695:  * @exc:  Exception Object ref
                   5696:  *
                   5697:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   5698:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   5699:  * elements, comments, processing instructions, CDATA sections, and entity
                   5700:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   5701:  * nodes nor empty Text nodes.
                   5702:  */
                   5703: void
                   5704: gdome_t_normalize (GdomeText *self, GdomeException *exc)
                   5705: {
                   5706:  if (self == NULL) {
                   5707:    *exc = GDOME_NULL_POINTER_ERR;
                   5708:    return;
                   5709:  }
                   5710:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5711:    *exc = GDOME_INVALID_STATE_ERR;
                   5712:    return;
                   5713:  }
                   5714:  *exc = 0;
1.2     ! paf      5715:  ((Gdome_xml_Text *)self)->vtab->super.super.normalize ((xmlNode *)self, exc);
1.1       paf      5716: }
                   5717: /**
                   5718:  * gdome_t_removeChild:
                   5719:  * @self:  Node Object ref
                   5720:  * @oldChild:  The node being removed
                   5721:  * @exc:  Exception Object ref
                   5722:  *
                   5723:  * Removes the child node indicated by @oldChild from the list of children, and
                   5724:  * returns it.
                   5725:  *
                   5726:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   5727:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   5728:  * Returns: the node removed.
                   5729:  */
1.2     ! paf      5730: xmlNode *
        !          5731: gdome_t_removeChild (GdomeText *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      5732: {
                   5733:  if (self == NULL) {
                   5734:    *exc = GDOME_NULL_POINTER_ERR;
                   5735:    return NULL;
                   5736:  }
                   5737:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5738:    *exc = GDOME_INVALID_STATE_ERR;
                   5739:    return NULL;
                   5740:  }
                   5741:  *exc = 0;
1.2     ! paf      5742:  return ((Gdome_xml_Text *)self)->vtab->super.super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      5743: }
                   5744: /**
                   5745:  * gdome_t_replaceChild:
                   5746:  * @self:  Node Object ref
                   5747:  * @newChild:  The new node to put in the child list
                   5748:  * @oldChild:  The node being replaced in the list
                   5749:  * @exc:  Exception Object ref
                   5750:  *
                   5751:  * Replaces the child node @oldChild with @newChild in the list of children,
                   5752:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   5753:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   5754:  * inserted in the same order. If the @newChild is already in the tree, it is
                   5755:  * first removed.
                   5756:  *
                   5757:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   5758:  * not allow children of the type of the @newChild node, or if the node to put
                   5759:  * in is one of this node's ancestors or this node itself.
                   5760:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   5761:  * document than the one that created this node.
                   5762:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   5763:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   5764:  * Returns: the node replaced.
                   5765:  */
1.2     ! paf      5766: xmlNode *
        !          5767: gdome_t_replaceChild (GdomeText *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      5768: {
                   5769:  if (self == NULL) {
                   5770:    *exc = GDOME_NULL_POINTER_ERR;
                   5771:    return NULL;
                   5772:  }
                   5773:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5774:    *exc = GDOME_INVALID_STATE_ERR;
                   5775:    return NULL;
                   5776:  }
                   5777:  *exc = 0;
1.2     ! paf      5778:  return ((Gdome_xml_Text *)self)->vtab->super.super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      5779: }
                   5780: /**
                   5781:  * gdome_t_addEventListener:
                   5782:  * @self:  Node Object ref
                   5783:  * @type:  the event type for which the user is registering
                   5784:  * @listener:  the listener parameter takes an interface implemented by the
                   5785:  *             user which contains the methods to be called when the event occurs.
                   5786:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   5787:  *               capture. After initiating capture, all events of the specified
                   5788:  *               type will be dispatched to the registered EventListener before
                   5789:  *               being dispatched to any EventTargets beneath them in the tree.
                   5790:  *               Events which are bubbling upward through the tree will not
                   5791:  *               trigger an EventListener designated to use capture.
                   5792:  * @exc:  Exception Object ref
                   5793:  *
                   5794:  * This method allows the registration of event listeners on the event target.
                   5795:  * If an EventListener is added to an EventTarget while it is processing an
                   5796:  * event, it will not be triggered by the current actions but may be triggered
                   5797:  * during a later stage of event flow, such as the bubbling phase.
                   5798:  * If multiple identical EventListeners are registered on the same EventTarget
                   5799:  * with the same parameters the duplicate instances are discarded. They do not
                   5800:  * cause the EventListener to be called twice and since they are discarded
                   5801:  * they do not need to be removed with the removeEventListener method.
                   5802:  */
                   5803: void
                   5804: gdome_t_addEventListener (GdomeText *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   5805: {
                   5806:  if (self == NULL) {
                   5807:    *exc = GDOME_NULL_POINTER_ERR;
                   5808:    return;
                   5809:  }
                   5810:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5811:    *exc = GDOME_INVALID_STATE_ERR;
                   5812:    return;
                   5813:  }
                   5814:  *exc = 0;
1.2     ! paf      5815:  ((Gdome_xml_Text *)self)->vtab->super.super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      5816: }
                   5817: /**
                   5818:  * gdome_t_removeEventListener:
                   5819:  * @self:  Node Object ref
                   5820:  * @type:  Specifies the event type of the EventListener being removed.
                   5821:  * @listener:  The EventListener parameter indicates the EventListener to be
                   5822:  *             removed.
                   5823:  * @useCapture:  Specifies whether the EventListener being removed was
                   5824:  *               registered as a capturing listener or not. If a listener was
                   5825:  *               registered twice, one with capture and one without, each must
                   5826:  *               be removed separately. Removal of a capturing listener does
                   5827:  *               not affect a non-capturing version of the same listener, and
                   5828:  *               vice versa.
                   5829:  * @exc:  Exception Object ref
                   5830:  *
                   5831:  * This method allows the removal of event listeners from the event target. If
                   5832:  * an EventListener is removed from an EventTarget while it is processing an
                   5833:  * event, it will not be triggered by the current actions. EventListeners can
                   5834:  * never be invoked after being removed. Calling removeEventListener with
                   5835:  * arguments which do not identify any currently registered EventListener on
                   5836:  * the EventTarget has no effect.
                   5837:  */
                   5838: void
                   5839: gdome_t_removeEventListener (GdomeText *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   5840: {
                   5841:  if (self == NULL) {
                   5842:    *exc = GDOME_NULL_POINTER_ERR;
                   5843:    return;
                   5844:  }
                   5845:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5846:    *exc = GDOME_INVALID_STATE_ERR;
                   5847:    return;
                   5848:  }
                   5849:  *exc = 0;
1.2     ! paf      5850:  ((Gdome_xml_Text *)self)->vtab->super.super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      5851: }
                   5852: /**
                   5853:  * gdome_t_dispatchEvent:
                   5854:  * @self:  Node Object ref
                   5855:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   5856:  *        used in processing the event.
                   5857:  * @exc:  Exception Object ref
                   5858:  *
                   5859:  * This method allows the dispatch of events into the implementations event
                   5860:  * model. Events dispatched in this manner will have the same capturing and
                   5861:  * bubbling behavior as events dispatched directly by the implementation. The
                   5862:  * target of the event is the EventTarget on which dispatchEvent is called.
                   5863:  *
                   5864:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   5865:  * specified by initializing the event before dispatchEvent was called.
                   5866:  * Specification of the Event's type as %NULL or an empty string will also
                   5867:  * trigger this exception.
                   5868:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   5869:  *          is %TRUE.
                   5870:  */
                   5871: GdomeBoolean
                   5872: gdome_t_dispatchEvent (GdomeText *self, GdomeEvent *evt, GdomeException *exc)
                   5873: {
                   5874:  if (self == NULL) {
                   5875:    *exc = GDOME_NULL_POINTER_ERR;
                   5876:    return FALSE;
                   5877:  }
                   5878:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5879:    *exc = GDOME_INVALID_STATE_ERR;
                   5880:    return FALSE;
                   5881:  }
                   5882:  *exc = 0;
1.2     ! paf      5883:  return ((Gdome_xml_Text *)self)->vtab->super.super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      5884: }
                   5885: /**
                   5886:  * gdome_t_subTreeDispatchEvent:
                   5887:  * @self:  Node Object ref
                   5888:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   5889:  *        used in processing the event.
                   5890:  * @exc:  Exception Object ref
                   5891:  *
                   5892:  * This method allows the dispatch of events into the implementations event
                   5893:  * model. Events dispatched in this manner will have the same capturing and
                   5894:  * bubbling behavior as events dispatched directly by the implementation. The
                   5895:  * target of the event is any nodes in the subtree of the EventTarget on which
                   5896:  * dispatchEvent is called.
                   5897:  *
                   5898:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   5899:  * specified by initializing the event before dispatchEvent was called.
                   5900:  * Specification of the Event's type as %NULL or an empty string will also
                   5901:  * trigger this exception.
                   5902:  */
                   5903: void
                   5904: gdome_t_subTreeDispatchEvent (GdomeText *self, GdomeEvent *evt, GdomeException *exc)
                   5905: {
                   5906:  if (self == NULL) {
                   5907:    *exc = GDOME_NULL_POINTER_ERR;
                   5908:    return;
                   5909:  }
                   5910:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5911:    *exc = GDOME_INVALID_STATE_ERR;
                   5912:    return;
                   5913:  }
                   5914:  *exc = 0;
1.2     ! paf      5915:  ((Gdome_xml_Text *)self)->vtab->super.super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      5916: }
                   5917: /**
                   5918:  * gdome_t_canAppend:
                   5919:  * @self:  Node Object ref
                   5920:  * @newChild:  The Node Object ref of the node to test
                   5921:  * @exc:  Exception Object ref
                   5922:  *
                   5923:  * Tests if a @newChild can be added in the child list of this node.
                   5924:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   5925:  */
                   5926: GdomeBoolean
1.2     ! paf      5927: gdome_t_canAppend (GdomeText *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      5928: {
                   5929:  if (self == NULL) {
                   5930:    *exc = GDOME_NULL_POINTER_ERR;
                   5931:    return FALSE;
                   5932:  }
                   5933:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   5934:    *exc = GDOME_INVALID_STATE_ERR;
                   5935:    return FALSE;
                   5936:  }
                   5937:  *exc = 0;
1.2     ! paf      5938:  return ((Gdome_xml_Text *)self)->vtab->super.super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      5939: }
                   5940: 
                   5941: /******************************************************************************
                   5942:           GdomeCDATASection interface API
                   5943:  ******************************************************************************/
                   5944: /**
                   5945:  * gdome_cds_splitText:
                   5946:  * @self:  The Text Object ref
                   5947:  * @offset: The 16-bit unit offset at which to split, starting from 0
                   5948:  * @exc:  The GdomeException Object ref
                   5949:  *
                   5950:  * Breaks this node into two nodes at the specified @offset, keeping both in
                   5951:  * the tree as siblings. After being split, this node will contain all the
                   5952:  * content up to the @offset point. A new node of the same type, which contains
                   5953:  * all the content at and after the @offset point, is returned. If the original
                   5954:  * node had a parent node, the new node is inserted as the next sibling of the
                   5955:  * original node. When the @offset is equal to the length of this node, the new
                   5956:  * node has no data.
                   5957:  *
                   5958:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified @offset is greater than the
                   5959:  * number of 16-bit units in data.
                   5960:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
                   5961:  * Returns: the new node, of the same type as this node.
                   5962:  */
                   5963: GdomeText *
                   5964: gdome_cds_splitText (GdomeCDATASection *self, gulong offset, GdomeException *exc)
                   5965: {
                   5966:  if (self == NULL) {
                   5967:    *exc = GDOME_NULL_POINTER_ERR;
                   5968:    return NULL;
                   5969:  }
                   5970:  if (((Gdome_xml_Text *)self)->n == NULL) {
                   5971:    *exc = GDOME_INVALID_STATE_ERR;
                   5972:    return NULL;
                   5973:  }
                   5974:  *exc = 0;
                   5975:  return ((Gdome_xml_CDATASection *)self)->vtab->super.splitText ((GdomeText *)self, offset, exc);
                   5976: }
                   5977: /**
                   5978:  * gdome_cds_data:
                   5979:  * @self:  The CharacterData Object ref
                   5980:  * @exc:  The Exception Object ref
                   5981:  *
                   5982:  * Returns: the character data of the node that implements this interface.
                   5983:  */
                   5984: GdomeDOMString *
                   5985: gdome_cds_data (GdomeCDATASection *self, GdomeException *exc)
                   5986: {
                   5987:  if (self == NULL) {
                   5988:    *exc = GDOME_NULL_POINTER_ERR;
                   5989:    return NULL;
                   5990:  }
                   5991:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   5992:    *exc = GDOME_INVALID_STATE_ERR;
                   5993:    return NULL;
                   5994:  }
                   5995:  *exc = 0;
                   5996:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.data ((GdomeCharacterData *)self, exc);
                   5997: }
                   5998: /**
                   5999:  * gdome_cds_set_data:
                   6000:  * @self:  The CharacterData Object ref
                   6001:  * @data:  The data value for this node
                   6002:  * @exc:  The Exception Object ref
                   6003:  *
                   6004:  * Sets the data value of this node.
                   6005:  *
                   6006:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6007:  */
                   6008: void
                   6009: gdome_cds_set_data (GdomeCDATASection *self, GdomeDOMString *data, GdomeException *exc)
                   6010: {
                   6011:  if (self == NULL) {
                   6012:    *exc = GDOME_NULL_POINTER_ERR;
                   6013:    return;
                   6014:  }
                   6015:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   6016:    *exc = GDOME_INVALID_STATE_ERR;
                   6017:    return;
                   6018:  }
                   6019:  *exc = 0;
                   6020:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.set_data ((GdomeCharacterData *)self, data, exc);
                   6021: }
                   6022: /**
                   6023:  * gdome_cds_length:
                   6024:  * @self:  The CharacterData Object ref
                   6025:  * @exc:  The GdomeException Object ref
                   6026:  *
                   6027:  * Returns: The number of 16-bit units that are available. This may have the
                   6028:  * value zero, i.e., CharacterData nodes may be empty.
                   6029:  */
                   6030: gulong
                   6031: gdome_cds_length (GdomeCDATASection *self, GdomeException *exc)
                   6032: {
                   6033:  if (self == NULL) {
                   6034:    *exc = GDOME_NULL_POINTER_ERR;
                   6035:    return 0L;
                   6036:  }
                   6037:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   6038:    *exc = GDOME_INVALID_STATE_ERR;
                   6039:    return 0L;
                   6040:  }
                   6041:  *exc = 0;
                   6042:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.length ((GdomeCharacterData *)self, exc);
                   6043: }
                   6044: /**
                   6045:  * gdome_cds_appendData:
                   6046:  * @self:  The CharacterData Object ref
                   6047:  * @arg:  The string to append
                   6048:  * @exc:  The Exception Object ref
                   6049:  *
                   6050:  * Append the string to the end of the character data of the node. Upon
                   6051:  * success, data provides access to the concatenation of data and the
                   6052:  * string specified.
                   6053:  *
                   6054:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6055:  */
                   6056: void
                   6057: gdome_cds_appendData (GdomeCDATASection *self, GdomeDOMString *arg, GdomeException *exc)
                   6058: {
                   6059:  if (self == NULL) {
                   6060:    *exc = GDOME_NULL_POINTER_ERR;
                   6061:    return;
                   6062:  }
                   6063:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   6064:    *exc = GDOME_INVALID_STATE_ERR;
                   6065:    return;
                   6066:  }
                   6067:  *exc = 0;
                   6068:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.appendData ((GdomeCharacterData *)self, arg, exc);
                   6069: }
                   6070: /**
                   6071:  * gdome_cds_deleteData:
                   6072:  * @self:  The CharacterData Object ref
                   6073:  * @offset:  The offset from which to start removing
                   6074:  * @count:  The number of 16-bit units to delete.
                   6075:  * @exc:  The Exception Object ref
                   6076:  *
                   6077:  * Remove a range of 16-bit units from the node. If the sum of @offset and
                   6078:  * @count exceeds length then all 16-bit units from @offset to the end of the
                   6079:  * data are deleted. Upon success, data and length reflect the change.
                   6080:  *
                   6081:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the
                   6082:  * number of 16-bit units in data.
                   6083:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6084:  */
                   6085: void
                   6086: gdome_cds_deleteData (GdomeCDATASection *self, gulong offset, gulong count, GdomeException *exc)
                   6087: {
                   6088:  if (self == NULL) {
                   6089:    *exc = GDOME_NULL_POINTER_ERR;
                   6090:    return;
                   6091:  }
                   6092:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   6093:    *exc = GDOME_INVALID_STATE_ERR;
                   6094:    return;
                   6095:  }
                   6096:  *exc = 0;
                   6097:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.deleteData ((GdomeCharacterData *)self, offset, count, exc);
                   6098: }
                   6099: /**
                   6100:  * gdome_cds_insertData:
                   6101:  * @self:  The CharacterData Object ref
                   6102:  * @offset:  The character offset at which to insert
                   6103:  * @arg:  The string to insert
                   6104:  * @exc:  The Exception Object ref
                   6105:  *
                   6106:  * Insert a string at the specified 16-bit unit offset.
                   6107:  *
                   6108:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the
                   6109:  * number of 16-bit units in data.
                   6110:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6111:  */
                   6112: void
                   6113: gdome_cds_insertData (GdomeCDATASection *self, gulong offset, GdomeDOMString *arg, GdomeException *exc)
                   6114: {
                   6115:  if (self == NULL) {
                   6116:    *exc = GDOME_NULL_POINTER_ERR;
                   6117:    return;
                   6118:  }
                   6119:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   6120:    *exc = GDOME_INVALID_STATE_ERR;
                   6121:    return;
                   6122:  }
                   6123:  *exc = 0;
                   6124:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.insertData ((GdomeCharacterData *)self, offset, arg, exc);
                   6125: }
                   6126: /**
                   6127:  * gdome_cds_replaceData:
                   6128:  * @self:  The CharacterData Object ref
                   6129:  * @offset:  The offset from which to start replacing
                   6130:  * @count:  The number of 16-bit units to replace.
                   6131:  * @arg:  The String with which the range must be replaced
                   6132:  * @exc:  The GdomeException Object ref
                   6133:  *
                   6134:  * Replace the characters starting at the specified 16-bit unit @offset with
                   6135:  * the specified string. If the sum of @offset and @count exceeds length, then
                   6136:  * all 16-bit units to the end of the data are replaced;
                   6137:  *
                   6138:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified @offset is greater than the
                   6139:  * number of 16-bit units in data.
                   6140:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6141:  */
                   6142: void
                   6143: gdome_cds_replaceData (GdomeCDATASection *self, gulong offset, gulong count, GdomeDOMString *arg, GdomeException *exc)
                   6144: {
                   6145:  if (self == NULL) {
                   6146:    *exc = GDOME_NULL_POINTER_ERR;
                   6147:    return;
                   6148:  }
                   6149:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   6150:    *exc = GDOME_INVALID_STATE_ERR;
                   6151:    return;
                   6152:  }
                   6153:  *exc = 0;
                   6154:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.replaceData ((GdomeCharacterData *)self, offset, count, arg, exc);
                   6155: }
                   6156: /**
                   6157:  * gdome_cds_substringData:
                   6158:  * @self:  The CharacterData Object ref
                   6159:  * @offset:  Start offset of substring to extract
                   6160:  * @count:  The number of 16-bit units to extract
                   6161:  * @exc:  The Exception Object ref
                   6162:  *
                   6163:  * Extracts a range of data from the node.
                   6164:  *
                   6165:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified @offset is greater than the
                   6166:  * number of 16-bit units in data.
                   6167:  * Returns: The specified substring. If the sum of @offset and @count exceeds
                   6168:  * the length, then all 16-bit units to the end of the data are returned.
                   6169:  */
                   6170: GdomeDOMString *
                   6171: gdome_cds_substringData (GdomeCDATASection *self, gulong offset, gulong count, GdomeException *exc)
                   6172: {
                   6173:  if (self == NULL) {
                   6174:    *exc = GDOME_NULL_POINTER_ERR;
                   6175:    return NULL;
                   6176:  }
                   6177:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   6178:    *exc = GDOME_INVALID_STATE_ERR;
                   6179:    return NULL;
                   6180:  }
                   6181:  *exc = 0;
                   6182:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.substringData ((GdomeCharacterData *)self, offset, count, exc);
                   6183: }
                   6184: /**
                   6185:  * gdome_cds_attributes:
                   6186:  * @self:  Node Object ref
                   6187:  * @exc:  Exception Object ref
                   6188:  *
                   6189:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   6190:  * Element) or %NULL otherwise.
                   6191:  */
                   6192: GdomeNamedNodeMap *
                   6193: gdome_cds_attributes (GdomeCDATASection *self, GdomeException *exc)
                   6194: {
                   6195:  if (self == NULL) {
                   6196:    *exc = GDOME_NULL_POINTER_ERR;
                   6197:    return NULL;
                   6198:  }
                   6199:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6200:    *exc = GDOME_INVALID_STATE_ERR;
                   6201:    return NULL;
                   6202:  }
                   6203:  *exc = 0;
1.2     ! paf      6204:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.attributes ((xmlNode *)self, exc);
1.1       paf      6205: }
                   6206: /**
                   6207:  * gdome_cds_childNodes:
                   6208:  * @self:  Node Object ref
                   6209:  * @exc:  Exception Object ref
                   6210:  *
                   6211:  * Returns: a NodeList that contains all children of this node. If there are no
                   6212:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   6213:  * not considered to be children of element nodes - use gdome_n_attributes to
                   6214:  * obtain the attributes.
                   6215:  */
                   6216: GdomeNodeList *
                   6217: gdome_cds_childNodes (GdomeCDATASection *self, GdomeException *exc)
                   6218: {
                   6219:  if (self == NULL) {
                   6220:    *exc = GDOME_NULL_POINTER_ERR;
                   6221:    return NULL;
                   6222:  }
                   6223:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6224:    *exc = GDOME_INVALID_STATE_ERR;
                   6225:    return NULL;
                   6226:  }
                   6227:  *exc = 0;
1.2     ! paf      6228:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.childNodes ((xmlNode *)self, exc);
1.1       paf      6229: }
                   6230: /**
                   6231:  * gdome_cds_firstChild:
                   6232:  * @self:  Node Object ref
                   6233:  * @exc:  Exception Object ref
                   6234:  * 
                   6235:  * Returns: the first child of this node. If there is no such node,
                   6236:  * this returns %NULL.
                   6237:  */
1.2     ! paf      6238: xmlNode *
1.1       paf      6239: gdome_cds_firstChild (GdomeCDATASection *self, GdomeException *exc)
                   6240: {
                   6241:  if (self == NULL) {
                   6242:    *exc = GDOME_NULL_POINTER_ERR;
                   6243:    return NULL;
                   6244:  }
                   6245:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6246:    *exc = GDOME_INVALID_STATE_ERR;
                   6247:    return NULL;
                   6248:  }
                   6249:  *exc = 0;
1.2     ! paf      6250:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.firstChild ((xmlNode *)self, exc);
1.1       paf      6251: }
                   6252: /**
                   6253:  * gdome_cds_lastChild:
                   6254:  * @self:  Node Object ref
                   6255:  * @exc:  Exception Object ref
                   6256:  *
                   6257:  * Returns: the last child of this node. If there is no such node,
                   6258:  * this returns %NULL.
                   6259:  */
1.2     ! paf      6260: xmlNode *
1.1       paf      6261: gdome_cds_lastChild (GdomeCDATASection *self, GdomeException *exc)
                   6262: {
                   6263:  if (self == NULL) {
                   6264:    *exc = GDOME_NULL_POINTER_ERR;
                   6265:    return NULL;
                   6266:  }
                   6267:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6268:    *exc = GDOME_INVALID_STATE_ERR;
                   6269:    return NULL;
                   6270:  }
                   6271:  *exc = 0;
1.2     ! paf      6272:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.lastChild ((xmlNode *)self, exc);
1.1       paf      6273: }
                   6274: /**
                   6275:  * gdome_cds_localName:
                   6276:  * @self:  Node Objects ref
                   6277:  * @exc:  Exception Object ref
                   6278:  *
                   6279:  * Returns: the local part of the qualified name of this node.
                   6280:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   6281:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   6282:  * always %NULL.
                   6283:  */
                   6284: GdomeDOMString *
                   6285: gdome_cds_localName (GdomeCDATASection *self, GdomeException *exc)
                   6286: {
                   6287:  if (self == NULL) {
                   6288:    *exc = GDOME_NULL_POINTER_ERR;
                   6289:    return NULL;
                   6290:  }
                   6291:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6292:    *exc = GDOME_INVALID_STATE_ERR;
                   6293:    return NULL;
                   6294:  }
                   6295:  *exc = 0;
1.2     ! paf      6296:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.localName ((xmlNode *)self, exc);
1.1       paf      6297: }
                   6298: /**
                   6299:  * gdome_cds_namespaceURI:
                   6300:  * @self:  Node Objects ref
                   6301:  * @exc:  Exception Object ref
                   6302:  *
                   6303:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   6304:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   6305:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   6306:  * always %NULL.
                   6307:  */
                   6308: GdomeDOMString *
                   6309: gdome_cds_namespaceURI (GdomeCDATASection *self, GdomeException *exc)
                   6310: {
                   6311:  if (self == NULL) {
                   6312:    *exc = GDOME_NULL_POINTER_ERR;
                   6313:    return NULL;
                   6314:  }
                   6315:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6316:    *exc = GDOME_INVALID_STATE_ERR;
                   6317:    return NULL;
                   6318:  }
                   6319:  *exc = 0;
1.2     ! paf      6320:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      6321: }
                   6322: /**
                   6323:  * gdome_cds_nextSibling:
                   6324:  * @self:  Node Object ref
                   6325:  * @exc:  Exception Object ref
                   6326:  *
                   6327:  * Returns: the node immediately following this node. If there is no such
                   6328:  * node, this returns %NULL.
                   6329:  */
1.2     ! paf      6330: xmlNode *
1.1       paf      6331: gdome_cds_nextSibling (GdomeCDATASection *self, GdomeException *exc)
                   6332: {
                   6333:  if (self == NULL) {
                   6334:    *exc = GDOME_NULL_POINTER_ERR;
                   6335:    return NULL;
                   6336:  }
                   6337:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6338:    *exc = GDOME_INVALID_STATE_ERR;
                   6339:    return NULL;
                   6340:  }
                   6341:  *exc = 0;
1.2     ! paf      6342:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.nextSibling ((xmlNode *)self, exc);
1.1       paf      6343: }
                   6344: /**
                   6345:  * gdome_cds_nodeName:
                   6346:  * @self:  Node Object ref
                   6347:  * @exc:  Exception Object ref
                   6348:  *
                   6349:  * Returns: the name of this node, depending on its type.
                   6350:  */
                   6351: GdomeDOMString *
                   6352: gdome_cds_nodeName (GdomeCDATASection *self, GdomeException *exc)
                   6353: {
                   6354:  if (self == NULL) {
                   6355:    *exc = GDOME_NULL_POINTER_ERR;
                   6356:    return NULL;
                   6357:  }
                   6358:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6359:    *exc = GDOME_INVALID_STATE_ERR;
                   6360:    return NULL;
                   6361:  }
                   6362:  *exc = 0;
1.2     ! paf      6363:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.nodeName ((xmlNode *)self, exc);
1.1       paf      6364: }
                   6365: /**
                   6366:  * gdome_cds_nodeType:
                   6367:  * @self:  Node Object ref
                   6368:  * @exc:  Exception Object ref
                   6369:  *
                   6370:  * Returns: an integer bigger than %0 representing the type of the underlying
                   6371:  * object or %0 on error.
                   6372:  */
                   6373: unsigned short
                   6374: gdome_cds_nodeType (GdomeCDATASection *self, GdomeException *exc)
                   6375: {
                   6376:  if (self == NULL) {
                   6377:    *exc = GDOME_NULL_POINTER_ERR;
                   6378:    return 0;
                   6379:  }
                   6380:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6381:    *exc = GDOME_INVALID_STATE_ERR;
                   6382:    return 0;
                   6383:  }
                   6384:  *exc = 0;
1.2     ! paf      6385:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.nodeType ((xmlNode *)self, exc);
1.1       paf      6386: }
                   6387: /**
                   6388:  * gdome_cds_nodeValue:
                   6389:  * @self:  Node Object ref
                   6390:  * @exc:  Exception Object ref
                   6391:  *
                   6392:  * Returns: the value of this node, depending on its type.
                   6393:  */
                   6394: GdomeDOMString *
                   6395: gdome_cds_nodeValue (GdomeCDATASection *self, GdomeException *exc)
                   6396: {
                   6397:  if (self == NULL) {
                   6398:    *exc = GDOME_NULL_POINTER_ERR;
                   6399:    return NULL;
                   6400:  }
                   6401:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6402:    *exc = GDOME_INVALID_STATE_ERR;
                   6403:    return NULL;
                   6404:  }
                   6405:  *exc = 0;
1.2     ! paf      6406:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.nodeValue ((xmlNode *)self, exc);
1.1       paf      6407: }
                   6408: /**
                   6409:  * gdome_cds_set_nodeValue:
                   6410:  * @self:  Node Object ref
                   6411:  * @nodeValue:  The new value for this node.
                   6412:  * @exc:  Exception Object ref
                   6413:  *
                   6414:  * Sets The value of this node, depending on its type.
                   6415:  *
                   6416:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6417:  */
                   6418: void
                   6419: gdome_cds_set_nodeValue (GdomeCDATASection *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   6420: {
                   6421:  if (self == NULL) {
                   6422:    *exc = GDOME_NULL_POINTER_ERR;
                   6423:    return;
                   6424:  }
                   6425:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6426:    *exc = GDOME_INVALID_STATE_ERR;
                   6427:    return;
                   6428:  }
                   6429:  *exc = 0;
1.2     ! paf      6430:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      6431: }
                   6432: /**
                   6433:  * gdome_cds_ownerDocument:
                   6434:  * @self:  Node Objects ref
                   6435:  * @exc:  Exception Object ref
                   6436:  *
                   6437:  * Returns: the documment object associated with this node. This is also the
                   6438:  * Document object used to create new nodes. When this node is a Document or a
                   6439:  * DocumentType which is not used with any Document yet, this is %NULL.
                   6440:  */
                   6441: GdomeDocument *
                   6442: gdome_cds_ownerDocument (GdomeCDATASection *self, GdomeException *exc)
                   6443: {
                   6444:  if (self == NULL) {
                   6445:    *exc = GDOME_NULL_POINTER_ERR;
                   6446:    return NULL;
                   6447:  }
                   6448:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6449:    *exc = GDOME_INVALID_STATE_ERR;
                   6450:    return NULL;
                   6451:  }
                   6452:  *exc = 0;
1.2     ! paf      6453:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      6454: }
                   6455: /**
                   6456:  * gdome_cds_parentNode:
                   6457:  * @self: Node Object ref
                   6458:  * @exc: Exception Object ref
                   6459:  *
                   6460:  * Returns: the parent of this node. All nodes, except Attr,
                   6461:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   6462:  * if a node has just been created and not yet added to the tree, or if it has
                   6463:  * been removed from the tree, this is %NULL.
                   6464:  */
1.2     ! paf      6465: xmlNode *
1.1       paf      6466: gdome_cds_parentNode (GdomeCDATASection *self, GdomeException *exc)
                   6467: {
                   6468:  if (self == NULL) {
                   6469:    *exc = GDOME_NULL_POINTER_ERR;
                   6470:    return NULL;
                   6471:  }
                   6472:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6473:    *exc = GDOME_INVALID_STATE_ERR;
                   6474:    return NULL;
                   6475:  }
                   6476:  *exc = 0;
1.2     ! paf      6477:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.parentNode ((xmlNode *)self, exc);
1.1       paf      6478: }
                   6479: /**
                   6480:  * gdome_cds_prefix:
                   6481:  * @self:  Node Objects ref
                   6482:  * @exc:  Exception Object ref
                   6483:  *
                   6484:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   6485:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   6486:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   6487:  * always %NULL.
                   6488:  */
                   6489: GdomeDOMString *
                   6490: gdome_cds_prefix (GdomeCDATASection *self, GdomeException *exc)
                   6491: {
                   6492:  if (self == NULL) {
                   6493:    *exc = GDOME_NULL_POINTER_ERR;
                   6494:    return NULL;
                   6495:  }
                   6496:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6497:    *exc = GDOME_INVALID_STATE_ERR;
                   6498:    return NULL;
                   6499:  }
                   6500:  *exc = 0;
1.2     ! paf      6501:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.prefix ((xmlNode *)self, exc);
1.1       paf      6502: }
                   6503: /**
                   6504:  * gdome_cds_set_prefix:
                   6505:  * @self:  Node Object ref
                   6506:  * @prefix:  The new prefix for this node.
                   6507:  * @exc:  Exception Object ref
                   6508:  *
                   6509:  * Sets a new nemaspace prefix for this node.
                   6510:  *
                   6511:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6512:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   6513:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   6514:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   6515:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   6516:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   6517:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   6518:  * an attribute and the qualifiedName of this node is "xmlns".
                   6519:  */
                   6520: void
                   6521: gdome_cds_set_prefix (GdomeCDATASection *self, GdomeDOMString *prefix, GdomeException *exc)
                   6522: {
                   6523:  if (self == NULL) {
                   6524:    *exc = GDOME_NULL_POINTER_ERR;
                   6525:    return;
                   6526:  }
                   6527:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6528:    *exc = GDOME_INVALID_STATE_ERR;
                   6529:    return;
                   6530:  }
                   6531:  *exc = 0;
1.2     ! paf      6532:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      6533: }
                   6534: /**
                   6535:  * gdome_cds_previousSibling:
                   6536:  * @self:  Node Object ref
                   6537:  * @exc:  Exception Object ref
                   6538:  *
                   6539:  * Returns: the node immediately preceding this node. If there is no such
                   6540:  * node, this returns %NULL.
                   6541:  */
1.2     ! paf      6542: xmlNode *
1.1       paf      6543: gdome_cds_previousSibling (GdomeCDATASection *self, GdomeException *exc)
                   6544: {
                   6545:  if (self == NULL) {
                   6546:    *exc = GDOME_NULL_POINTER_ERR;
                   6547:    return NULL;
                   6548:  }
                   6549:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6550:    *exc = GDOME_INVALID_STATE_ERR;
                   6551:    return NULL;
                   6552:  }
                   6553:  *exc = 0;
1.2     ! paf      6554:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.previousSibling ((xmlNode *)self, exc);
1.1       paf      6555: }
                   6556: /**
                   6557:  * gdome_cds_ref:
                   6558:  * @self:  Node Object ref
                   6559:  * @exc:  Exception Object ref
                   6560:  *
                   6561:  * Increase the reference count of the specified Node.
                   6562:  */
                   6563: void
                   6564: gdome_cds_ref (GdomeCDATASection *self, GdomeException *exc)
                   6565: {
                   6566:  if (self == NULL) {
                   6567:    *exc = GDOME_NULL_POINTER_ERR;
                   6568:    return;
                   6569:  }
                   6570:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6571:    *exc = GDOME_INVALID_STATE_ERR;
                   6572:    return;
                   6573:  }
                   6574:  *exc = 0;
1.2     ! paf      6575:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.ref ((xmlNode *)self, exc);
1.1       paf      6576: }
                   6577: /**
                   6578:  * gdome_cds_unref:
                   6579:  * @self:  Node Object ref
                   6580:  * @exc:  Exception Object ref
                   6581:  *
                   6582:  * Decrease the reference count of the specified Node. Free the Node structure
                   6583:  * if the Node will have zero reference.
                   6584:  */
                   6585: void
                   6586: gdome_cds_unref (GdomeCDATASection *self, GdomeException *exc)
                   6587: {
                   6588:  if (self == NULL) {
                   6589:    *exc = GDOME_NULL_POINTER_ERR;
                   6590:    return;
                   6591:  }
                   6592:  *exc = 0;
                   6593:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6594:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   6595:      ((Gdome_xml_Node *)self)->refcnt--;
                   6596: 
                   6597:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   6598: #ifdef DEBUG_REFCNT
                   6599:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   6600: #endif
                   6601:      g_free (self);
                   6602:    }
                   6603:    return;
                   6604:  }
1.2     ! paf      6605:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.unref ((xmlNode *)self, exc);
1.1       paf      6606: }
                   6607: /**
                   6608:  * gdome_cds_query_interface:
                   6609:  * @self:  Node Object ref
                   6610:  * @interface:  interface needed
                   6611:  * @exc:  Exception Object ref
                   6612:  *
                   6613:  * Returns: a reference to this object that implements the @interface needed,
                   6614:  *          or %NULL if the @interface is not supported by this Object.
                   6615:  */
                   6616: gpointer
                   6617: gdome_cds_query_interface (GdomeCDATASection *self, const char *interface, GdomeException *exc)
                   6618: {
                   6619:  if (self == NULL) {
                   6620:    *exc = GDOME_NULL_POINTER_ERR;
                   6621:    return NULL;
                   6622:  }
                   6623:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6624:    *exc = GDOME_INVALID_STATE_ERR;
                   6625:    return NULL;
                   6626:  }
                   6627:  *exc = 0;
1.2     ! paf      6628:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      6629: }
                   6630: /**
                   6631:  * gdome_cds_appendChild:
                   6632:  * @self:  Node Object ref
                   6633:  * @newChild:  The node to add
                   6634:  * @exc:  Exception Object ref
                   6635:  *
                   6636:  * Adds the node @newChild to the end of the list of children of this node.
                   6637:  * If the @newChild is already in the tree, it is first removed. If it is a
                   6638:  * DocumentFragment node, the entire contents of the document fragment are
                   6639:  * moved into the child list of this node
                   6640:  *
                   6641:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   6642:  * allow children of the type of the @newChild node, or if the node to append is
                   6643:  * one of this node's ancestors or this node itself.
                   6644:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   6645:  * document than the one that created this node.
                   6646:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6647:  * Returns: the node added.
                   6648:  */
1.2     ! paf      6649: xmlNode *
        !          6650: gdome_cds_appendChild (GdomeCDATASection *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      6651: {
                   6652:  if (self == NULL) {
                   6653:    *exc = GDOME_NULL_POINTER_ERR;
                   6654:    return NULL;
                   6655:  }
                   6656:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6657:    *exc = GDOME_INVALID_STATE_ERR;
                   6658:    return NULL;
                   6659:  }
                   6660:  *exc = 0;
1.2     ! paf      6661:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      6662: }
                   6663: /**
                   6664:  * gdome_cds_cloneNode:
                   6665:  * @self:  Node Object ref
                   6666:  * @deep:  If true, recursively clone the subtree under the specified node;
                   6667:  *         if false, clone only the node itself (and its attributes, if it is
                   6668:  *         an Element).
                   6669:  * @exc:  Exception Object ref
                   6670:  *
                   6671:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   6672:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   6673:  * %NULL).
                   6674:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   6675:  * nodes are not supported.
                   6676:  *
                   6677:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   6678:  * supported.
                   6679:  * Returns: the duplicate node.
                   6680:  */
1.2     ! paf      6681: xmlNode *
1.1       paf      6682: gdome_cds_cloneNode (GdomeCDATASection *self, GdomeBoolean deep, GdomeException *exc)
                   6683: {
                   6684:  if (self == NULL) {
                   6685:    *exc = GDOME_NULL_POINTER_ERR;
                   6686:    return NULL;
                   6687:  }
                   6688:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6689:    *exc = GDOME_INVALID_STATE_ERR;
                   6690:    return NULL;
                   6691:  }
                   6692:  *exc = 0;
1.2     ! paf      6693:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      6694: }
                   6695: /**
                   6696:  * gdome_cds_hasAttributes:
                   6697:  * @self:  Node Object ref
                   6698:  * @exc:  Exception Object ref
                   6699:  *
                   6700:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   6701:  */
                   6702: GdomeBoolean
                   6703: gdome_cds_hasAttributes (GdomeCDATASection *self, GdomeException *exc)
                   6704: {
                   6705:  if (self == NULL) {
                   6706:    *exc = GDOME_NULL_POINTER_ERR;
                   6707:    return FALSE;
                   6708:  }
                   6709:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6710:    *exc = GDOME_INVALID_STATE_ERR;
                   6711:    return FALSE;
                   6712:  }
                   6713:  *exc = 0;
1.2     ! paf      6714:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      6715: }
                   6716: /**
                   6717:  * gdome_cds_hasChildNodes:
                   6718:  * @self:  Node Object ref
                   6719:  * @exc:  Exception Object ref
                   6720:  *
                   6721:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   6722:  */
                   6723: GdomeBoolean
                   6724: gdome_cds_hasChildNodes (GdomeCDATASection *self, GdomeException *exc)
                   6725: {
                   6726:  if (self == NULL) {
                   6727:    *exc = GDOME_NULL_POINTER_ERR;
                   6728:    return FALSE;
                   6729:  }
                   6730:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6731:    *exc = GDOME_INVALID_STATE_ERR;
                   6732:    return FALSE;
                   6733:  }
                   6734:  *exc = 0;
1.2     ! paf      6735:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      6736: }
                   6737: /**
                   6738:  * gdome_cds_insertBefore:
                   6739:  * @self:  Node Object ref
                   6740:  * @newChild:  The new node to put in the child list
                   6741:  * @refChild:  the reference node, i.e., the node before which the new node
                   6742:  *             must be inserted.
                   6743:  * @exc:  Exception Object ref
                   6744:  *
                   6745:  * Inserts the node @newChild before the existing child node @refChild. If
                   6746:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   6747:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   6748:  * in the same order, before @refChild. If the @newChild is already in the
                   6749:  * tree, it is first removed.
                   6750:  *
                   6751:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   6752:  * allow children of the type of the @newChild node, or if the node to insert is
                   6753:  * one of this node's ancestors or this node itself.
                   6754:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   6755:  * document than the one that created this node.
                   6756:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   6757:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6758:  * Returns: the node being inserted.
                   6759:  */
1.2     ! paf      6760: xmlNode *
        !          6761: gdome_cds_insertBefore (GdomeCDATASection *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      6762: {
                   6763:  if (self == NULL) {
                   6764:    *exc = GDOME_NULL_POINTER_ERR;
                   6765:    return NULL;
                   6766:  }
                   6767:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6768:    *exc = GDOME_INVALID_STATE_ERR;
                   6769:    return NULL;
                   6770:  }
                   6771:  *exc = 0;
1.2     ! paf      6772:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      6773: }
                   6774: /**
                   6775:  * gdome_cds_isSupported:
                   6776:  * @self:  Node Object ref
                   6777:  * @feature:  The name of the feature to test.
                   6778:  * @version:  This is the version number of the feature to test. In Level 2,
                   6779:  *            version 1, this is the string "2.0". If the version is not
                   6780:  *            specified, supporting any version of the feature will cause the
                   6781:  *            method to return %TRUE.
                   6782:  * @exc:  Exception Object ref
                   6783:  *
                   6784:  * Tests whether the DOM implementation implements a specific feature and that
                   6785:  * feature is supported by this node.
                   6786:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   6787:  * otherwise.
                   6788:  */
                   6789: GdomeBoolean
                   6790: gdome_cds_isSupported (GdomeCDATASection *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   6791: {
                   6792:  if (self == NULL) {
                   6793:    *exc = GDOME_NULL_POINTER_ERR;
                   6794:    return FALSE;
                   6795:  }
                   6796:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6797:    *exc = GDOME_INVALID_STATE_ERR;
                   6798:    return FALSE;
                   6799:  }
                   6800:  *exc = 0;
1.2     ! paf      6801:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      6802: }
                   6803: /**
                   6804:  * gdome_cds_normalize:
                   6805:  * @self:  Node Object ref
                   6806:  * @exc:  Exception Object ref
                   6807:  *
                   6808:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   6809:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   6810:  * elements, comments, processing instructions, CDATA sections, and entity
                   6811:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   6812:  * nodes nor empty Text nodes.
                   6813:  */
                   6814: void
                   6815: gdome_cds_normalize (GdomeCDATASection *self, GdomeException *exc)
                   6816: {
                   6817:  if (self == NULL) {
                   6818:    *exc = GDOME_NULL_POINTER_ERR;
                   6819:    return;
                   6820:  }
                   6821:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6822:    *exc = GDOME_INVALID_STATE_ERR;
                   6823:    return;
                   6824:  }
                   6825:  *exc = 0;
1.2     ! paf      6826:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.normalize ((xmlNode *)self, exc);
1.1       paf      6827: }
                   6828: /**
                   6829:  * gdome_cds_removeChild:
                   6830:  * @self:  Node Object ref
                   6831:  * @oldChild:  The node being removed
                   6832:  * @exc:  Exception Object ref
                   6833:  *
                   6834:  * Removes the child node indicated by @oldChild from the list of children, and
                   6835:  * returns it.
                   6836:  *
                   6837:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   6838:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6839:  * Returns: the node removed.
                   6840:  */
1.2     ! paf      6841: xmlNode *
        !          6842: gdome_cds_removeChild (GdomeCDATASection *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      6843: {
                   6844:  if (self == NULL) {
                   6845:    *exc = GDOME_NULL_POINTER_ERR;
                   6846:    return NULL;
                   6847:  }
                   6848:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6849:    *exc = GDOME_INVALID_STATE_ERR;
                   6850:    return NULL;
                   6851:  }
                   6852:  *exc = 0;
1.2     ! paf      6853:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      6854: }
                   6855: /**
                   6856:  * gdome_cds_replaceChild:
                   6857:  * @self:  Node Object ref
                   6858:  * @newChild:  The new node to put in the child list
                   6859:  * @oldChild:  The node being replaced in the list
                   6860:  * @exc:  Exception Object ref
                   6861:  *
                   6862:  * Replaces the child node @oldChild with @newChild in the list of children,
                   6863:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   6864:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   6865:  * inserted in the same order. If the @newChild is already in the tree, it is
                   6866:  * first removed.
                   6867:  *
                   6868:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   6869:  * not allow children of the type of the @newChild node, or if the node to put
                   6870:  * in is one of this node's ancestors or this node itself.
                   6871:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   6872:  * document than the one that created this node.
                   6873:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   6874:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   6875:  * Returns: the node replaced.
                   6876:  */
1.2     ! paf      6877: xmlNode *
        !          6878: gdome_cds_replaceChild (GdomeCDATASection *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      6879: {
                   6880:  if (self == NULL) {
                   6881:    *exc = GDOME_NULL_POINTER_ERR;
                   6882:    return NULL;
                   6883:  }
                   6884:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6885:    *exc = GDOME_INVALID_STATE_ERR;
                   6886:    return NULL;
                   6887:  }
                   6888:  *exc = 0;
1.2     ! paf      6889:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      6890: }
                   6891: /**
                   6892:  * gdome_cds_addEventListener:
                   6893:  * @self:  Node Object ref
                   6894:  * @type:  the event type for which the user is registering
                   6895:  * @listener:  the listener parameter takes an interface implemented by the
                   6896:  *             user which contains the methods to be called when the event occurs.
                   6897:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   6898:  *               capture. After initiating capture, all events of the specified
                   6899:  *               type will be dispatched to the registered EventListener before
                   6900:  *               being dispatched to any EventTargets beneath them in the tree.
                   6901:  *               Events which are bubbling upward through the tree will not
                   6902:  *               trigger an EventListener designated to use capture.
                   6903:  * @exc:  Exception Object ref
                   6904:  *
                   6905:  * This method allows the registration of event listeners on the event target.
                   6906:  * If an EventListener is added to an EventTarget while it is processing an
                   6907:  * event, it will not be triggered by the current actions but may be triggered
                   6908:  * during a later stage of event flow, such as the bubbling phase.
                   6909:  * If multiple identical EventListeners are registered on the same EventTarget
                   6910:  * with the same parameters the duplicate instances are discarded. They do not
                   6911:  * cause the EventListener to be called twice and since they are discarded
                   6912:  * they do not need to be removed with the removeEventListener method.
                   6913:  */
                   6914: void
                   6915: gdome_cds_addEventListener (GdomeCDATASection *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   6916: {
                   6917:  if (self == NULL) {
                   6918:    *exc = GDOME_NULL_POINTER_ERR;
                   6919:    return;
                   6920:  }
                   6921:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6922:    *exc = GDOME_INVALID_STATE_ERR;
                   6923:    return;
                   6924:  }
                   6925:  *exc = 0;
1.2     ! paf      6926:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      6927: }
                   6928: /**
                   6929:  * gdome_cds_removeEventListener:
                   6930:  * @self:  Node Object ref
                   6931:  * @type:  Specifies the event type of the EventListener being removed.
                   6932:  * @listener:  The EventListener parameter indicates the EventListener to be
                   6933:  *             removed.
                   6934:  * @useCapture:  Specifies whether the EventListener being removed was
                   6935:  *               registered as a capturing listener or not. If a listener was
                   6936:  *               registered twice, one with capture and one without, each must
                   6937:  *               be removed separately. Removal of a capturing listener does
                   6938:  *               not affect a non-capturing version of the same listener, and
                   6939:  *               vice versa.
                   6940:  * @exc:  Exception Object ref
                   6941:  *
                   6942:  * This method allows the removal of event listeners from the event target. If
                   6943:  * an EventListener is removed from an EventTarget while it is processing an
                   6944:  * event, it will not be triggered by the current actions. EventListeners can
                   6945:  * never be invoked after being removed. Calling removeEventListener with
                   6946:  * arguments which do not identify any currently registered EventListener on
                   6947:  * the EventTarget has no effect.
                   6948:  */
                   6949: void
                   6950: gdome_cds_removeEventListener (GdomeCDATASection *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   6951: {
                   6952:  if (self == NULL) {
                   6953:    *exc = GDOME_NULL_POINTER_ERR;
                   6954:    return;
                   6955:  }
                   6956:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6957:    *exc = GDOME_INVALID_STATE_ERR;
                   6958:    return;
                   6959:  }
                   6960:  *exc = 0;
1.2     ! paf      6961:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      6962: }
                   6963: /**
                   6964:  * gdome_cds_dispatchEvent:
                   6965:  * @self:  Node Object ref
                   6966:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   6967:  *        used in processing the event.
                   6968:  * @exc:  Exception Object ref
                   6969:  *
                   6970:  * This method allows the dispatch of events into the implementations event
                   6971:  * model. Events dispatched in this manner will have the same capturing and
                   6972:  * bubbling behavior as events dispatched directly by the implementation. The
                   6973:  * target of the event is the EventTarget on which dispatchEvent is called.
                   6974:  *
                   6975:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   6976:  * specified by initializing the event before dispatchEvent was called.
                   6977:  * Specification of the Event's type as %NULL or an empty string will also
                   6978:  * trigger this exception.
                   6979:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   6980:  *          is %TRUE.
                   6981:  */
                   6982: GdomeBoolean
                   6983: gdome_cds_dispatchEvent (GdomeCDATASection *self, GdomeEvent *evt, GdomeException *exc)
                   6984: {
                   6985:  if (self == NULL) {
                   6986:    *exc = GDOME_NULL_POINTER_ERR;
                   6987:    return FALSE;
                   6988:  }
                   6989:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   6990:    *exc = GDOME_INVALID_STATE_ERR;
                   6991:    return FALSE;
                   6992:  }
                   6993:  *exc = 0;
1.2     ! paf      6994:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      6995: }
                   6996: /**
                   6997:  * gdome_cds_subTreeDispatchEvent:
                   6998:  * @self:  Node Object ref
                   6999:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   7000:  *        used in processing the event.
                   7001:  * @exc:  Exception Object ref
                   7002:  *
                   7003:  * This method allows the dispatch of events into the implementations event
                   7004:  * model. Events dispatched in this manner will have the same capturing and
                   7005:  * bubbling behavior as events dispatched directly by the implementation. The
                   7006:  * target of the event is any nodes in the subtree of the EventTarget on which
                   7007:  * dispatchEvent is called.
                   7008:  *
                   7009:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   7010:  * specified by initializing the event before dispatchEvent was called.
                   7011:  * Specification of the Event's type as %NULL or an empty string will also
                   7012:  * trigger this exception.
                   7013:  */
                   7014: void
                   7015: gdome_cds_subTreeDispatchEvent (GdomeCDATASection *self, GdomeEvent *evt, GdomeException *exc)
                   7016: {
                   7017:  if (self == NULL) {
                   7018:    *exc = GDOME_NULL_POINTER_ERR;
                   7019:    return;
                   7020:  }
                   7021:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7022:    *exc = GDOME_INVALID_STATE_ERR;
                   7023:    return;
                   7024:  }
                   7025:  *exc = 0;
1.2     ! paf      7026:  ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      7027: }
                   7028: /**
                   7029:  * gdome_cds_canAppend:
                   7030:  * @self:  Node Object ref
                   7031:  * @newChild:  The Node Object ref of the node to test
                   7032:  * @exc:  Exception Object ref
                   7033:  *
                   7034:  * Tests if a @newChild can be added in the child list of this node.
                   7035:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   7036:  */
                   7037: GdomeBoolean
1.2     ! paf      7038: gdome_cds_canAppend (GdomeCDATASection *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      7039: {
                   7040:  if (self == NULL) {
                   7041:    *exc = GDOME_NULL_POINTER_ERR;
                   7042:    return FALSE;
                   7043:  }
                   7044:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7045:    *exc = GDOME_INVALID_STATE_ERR;
                   7046:    return FALSE;
                   7047:  }
                   7048:  *exc = 0;
1.2     ! paf      7049:  return ((Gdome_xml_CDATASection *)self)->vtab->super.super.super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      7050: }
                   7051: 
                   7052: /******************************************************************************
                   7053:           GdomeComment interface API
                   7054:  ******************************************************************************/
                   7055: /**
                   7056:  * gdome_c_data:
                   7057:  * @self:  The CharacterData Object ref
                   7058:  * @exc:  The Exception Object ref
                   7059:  *
                   7060:  * Returns: the character data of the node that implements this interface.
                   7061:  */
                   7062: GdomeDOMString *
                   7063: gdome_c_data (GdomeComment *self, GdomeException *exc)
                   7064: {
                   7065:  if (self == NULL) {
                   7066:    *exc = GDOME_NULL_POINTER_ERR;
                   7067:    return NULL;
                   7068:  }
                   7069:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   7070:    *exc = GDOME_INVALID_STATE_ERR;
                   7071:    return NULL;
                   7072:  }
                   7073:  *exc = 0;
                   7074:  return ((Gdome_xml_Comment *)self)->vtab->super.data ((GdomeCharacterData *)self, exc);
                   7075: }
                   7076: /**
                   7077:  * gdome_c_set_data:
                   7078:  * @self:  The CharacterData Object ref
                   7079:  * @data:  The data value for this node
                   7080:  * @exc:  The Exception Object ref
                   7081:  *
                   7082:  * Sets the data value of this node.
                   7083:  *
                   7084:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7085:  */
                   7086: void
                   7087: gdome_c_set_data (GdomeComment *self, GdomeDOMString *data, GdomeException *exc)
                   7088: {
                   7089:  if (self == NULL) {
                   7090:    *exc = GDOME_NULL_POINTER_ERR;
                   7091:    return;
                   7092:  }
                   7093:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   7094:    *exc = GDOME_INVALID_STATE_ERR;
                   7095:    return;
                   7096:  }
                   7097:  *exc = 0;
                   7098:  ((Gdome_xml_Comment *)self)->vtab->super.set_data ((GdomeCharacterData *)self, data, exc);
                   7099: }
                   7100: /**
                   7101:  * gdome_c_length:
                   7102:  * @self:  The CharacterData Object ref
                   7103:  * @exc:  The GdomeException Object ref
                   7104:  *
                   7105:  * Returns: The number of 16-bit units that are available. This may have the
                   7106:  * value zero, i.e., CharacterData nodes may be empty.
                   7107:  */
                   7108: gulong
                   7109: gdome_c_length (GdomeComment *self, GdomeException *exc)
                   7110: {
                   7111:  if (self == NULL) {
                   7112:    *exc = GDOME_NULL_POINTER_ERR;
                   7113:    return 0L;
                   7114:  }
                   7115:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   7116:    *exc = GDOME_INVALID_STATE_ERR;
                   7117:    return 0L;
                   7118:  }
                   7119:  *exc = 0;
                   7120:  return ((Gdome_xml_Comment *)self)->vtab->super.length ((GdomeCharacterData *)self, exc);
                   7121: }
                   7122: /**
                   7123:  * gdome_c_appendData:
                   7124:  * @self:  The CharacterData Object ref
                   7125:  * @arg:  The string to append
                   7126:  * @exc:  The Exception Object ref
                   7127:  *
                   7128:  * Append the string to the end of the character data of the node. Upon
                   7129:  * success, data provides access to the concatenation of data and the
                   7130:  * string specified.
                   7131:  *
                   7132:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7133:  */
                   7134: void
                   7135: gdome_c_appendData (GdomeComment *self, GdomeDOMString *arg, GdomeException *exc)
                   7136: {
                   7137:  if (self == NULL) {
                   7138:    *exc = GDOME_NULL_POINTER_ERR;
                   7139:    return;
                   7140:  }
                   7141:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   7142:    *exc = GDOME_INVALID_STATE_ERR;
                   7143:    return;
                   7144:  }
                   7145:  *exc = 0;
                   7146:  ((Gdome_xml_Comment *)self)->vtab->super.appendData ((GdomeCharacterData *)self, arg, exc);
                   7147: }
                   7148: /**
                   7149:  * gdome_c_deleteData:
                   7150:  * @self:  The CharacterData Object ref
                   7151:  * @offset:  The offset from which to start removing
                   7152:  * @count:  The number of 16-bit units to delete.
                   7153:  * @exc:  The Exception Object ref
                   7154:  *
                   7155:  * Remove a range of 16-bit units from the node. If the sum of @offset and
                   7156:  * @count exceeds length then all 16-bit units from @offset to the end of the
                   7157:  * data are deleted. Upon success, data and length reflect the change.
                   7158:  *
                   7159:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the
                   7160:  * number of 16-bit units in data.
                   7161:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7162:  */
                   7163: void
                   7164: gdome_c_deleteData (GdomeComment *self, gulong offset, gulong count, GdomeException *exc)
                   7165: {
                   7166:  if (self == NULL) {
                   7167:    *exc = GDOME_NULL_POINTER_ERR;
                   7168:    return;
                   7169:  }
                   7170:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   7171:    *exc = GDOME_INVALID_STATE_ERR;
                   7172:    return;
                   7173:  }
                   7174:  *exc = 0;
                   7175:  ((Gdome_xml_Comment *)self)->vtab->super.deleteData ((GdomeCharacterData *)self, offset, count, exc);
                   7176: }
                   7177: /**
                   7178:  * gdome_c_insertData:
                   7179:  * @self:  The CharacterData Object ref
                   7180:  * @offset:  The character offset at which to insert
                   7181:  * @arg:  The string to insert
                   7182:  * @exc:  The Exception Object ref
                   7183:  *
                   7184:  * Insert a string at the specified 16-bit unit offset.
                   7185:  *
                   7186:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the
                   7187:  * number of 16-bit units in data.
                   7188:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7189:  */
                   7190: void
                   7191: gdome_c_insertData (GdomeComment *self, gulong offset, GdomeDOMString *arg, GdomeException *exc)
                   7192: {
                   7193:  if (self == NULL) {
                   7194:    *exc = GDOME_NULL_POINTER_ERR;
                   7195:    return;
                   7196:  }
                   7197:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   7198:    *exc = GDOME_INVALID_STATE_ERR;
                   7199:    return;
                   7200:  }
                   7201:  *exc = 0;
                   7202:  ((Gdome_xml_Comment *)self)->vtab->super.insertData ((GdomeCharacterData *)self, offset, arg, exc);
                   7203: }
                   7204: /**
                   7205:  * gdome_c_replaceData:
                   7206:  * @self:  The CharacterData Object ref
                   7207:  * @offset:  The offset from which to start replacing
                   7208:  * @count:  The number of 16-bit units to replace.
                   7209:  * @arg:  The String with which the range must be replaced
                   7210:  * @exc:  The GdomeException Object ref
                   7211:  *
                   7212:  * Replace the characters starting at the specified 16-bit unit @offset with
                   7213:  * the specified string. If the sum of @offset and @count exceeds length, then
                   7214:  * all 16-bit units to the end of the data are replaced;
                   7215:  *
                   7216:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified @offset is greater than the
                   7217:  * number of 16-bit units in data.
                   7218:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7219:  */
                   7220: void
                   7221: gdome_c_replaceData (GdomeComment *self, gulong offset, gulong count, GdomeDOMString *arg, GdomeException *exc)
                   7222: {
                   7223:  if (self == NULL) {
                   7224:    *exc = GDOME_NULL_POINTER_ERR;
                   7225:    return;
                   7226:  }
                   7227:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   7228:    *exc = GDOME_INVALID_STATE_ERR;
                   7229:    return;
                   7230:  }
                   7231:  *exc = 0;
                   7232:  ((Gdome_xml_Comment *)self)->vtab->super.replaceData ((GdomeCharacterData *)self, offset, count, arg, exc);
                   7233: }
                   7234: /**
                   7235:  * gdome_c_substringData:
                   7236:  * @self:  The CharacterData Object ref
                   7237:  * @offset:  Start offset of substring to extract
                   7238:  * @count:  The number of 16-bit units to extract
                   7239:  * @exc:  The Exception Object ref
                   7240:  *
                   7241:  * Extracts a range of data from the node.
                   7242:  *
                   7243:  * %GDOME_INDEX_SIZE_ERR: Raised if the specified @offset is greater than the
                   7244:  * number of 16-bit units in data.
                   7245:  * Returns: The specified substring. If the sum of @offset and @count exceeds
                   7246:  * the length, then all 16-bit units to the end of the data are returned.
                   7247:  */
                   7248: GdomeDOMString *
                   7249: gdome_c_substringData (GdomeComment *self, gulong offset, gulong count, GdomeException *exc)
                   7250: {
                   7251:  if (self == NULL) {
                   7252:    *exc = GDOME_NULL_POINTER_ERR;
                   7253:    return NULL;
                   7254:  }
                   7255:  if (((Gdome_xml_CharacterData *)self)->n == NULL) {
                   7256:    *exc = GDOME_INVALID_STATE_ERR;
                   7257:    return NULL;
                   7258:  }
                   7259:  *exc = 0;
                   7260:  return ((Gdome_xml_Comment *)self)->vtab->super.substringData ((GdomeCharacterData *)self, offset, count, exc);
                   7261: }
                   7262: /**
                   7263:  * gdome_c_attributes:
                   7264:  * @self:  Node Object ref
                   7265:  * @exc:  Exception Object ref
                   7266:  *
                   7267:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   7268:  * Element) or %NULL otherwise.
                   7269:  */
                   7270: GdomeNamedNodeMap *
                   7271: gdome_c_attributes (GdomeComment *self, GdomeException *exc)
                   7272: {
                   7273:  if (self == NULL) {
                   7274:    *exc = GDOME_NULL_POINTER_ERR;
                   7275:    return NULL;
                   7276:  }
                   7277:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7278:    *exc = GDOME_INVALID_STATE_ERR;
                   7279:    return NULL;
                   7280:  }
                   7281:  *exc = 0;
1.2     ! paf      7282:  return ((Gdome_xml_Comment *)self)->vtab->super.super.attributes ((xmlNode *)self, exc);
1.1       paf      7283: }
                   7284: /**
                   7285:  * gdome_c_childNodes:
                   7286:  * @self:  Node Object ref
                   7287:  * @exc:  Exception Object ref
                   7288:  *
                   7289:  * Returns: a NodeList that contains all children of this node. If there are no
                   7290:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   7291:  * not considered to be children of element nodes - use gdome_n_attributes to
                   7292:  * obtain the attributes.
                   7293:  */
                   7294: GdomeNodeList *
                   7295: gdome_c_childNodes (GdomeComment *self, GdomeException *exc)
                   7296: {
                   7297:  if (self == NULL) {
                   7298:    *exc = GDOME_NULL_POINTER_ERR;
                   7299:    return NULL;
                   7300:  }
                   7301:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7302:    *exc = GDOME_INVALID_STATE_ERR;
                   7303:    return NULL;
                   7304:  }
                   7305:  *exc = 0;
1.2     ! paf      7306:  return ((Gdome_xml_Comment *)self)->vtab->super.super.childNodes ((xmlNode *)self, exc);
1.1       paf      7307: }
                   7308: /**
                   7309:  * gdome_c_firstChild:
                   7310:  * @self:  Node Object ref
                   7311:  * @exc:  Exception Object ref
                   7312:  * 
                   7313:  * Returns: the first child of this node. If there is no such node,
                   7314:  * this returns %NULL.
                   7315:  */
1.2     ! paf      7316: xmlNode *
1.1       paf      7317: gdome_c_firstChild (GdomeComment *self, GdomeException *exc)
                   7318: {
                   7319:  if (self == NULL) {
                   7320:    *exc = GDOME_NULL_POINTER_ERR;
                   7321:    return NULL;
                   7322:  }
                   7323:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7324:    *exc = GDOME_INVALID_STATE_ERR;
                   7325:    return NULL;
                   7326:  }
                   7327:  *exc = 0;
1.2     ! paf      7328:  return ((Gdome_xml_Comment *)self)->vtab->super.super.firstChild ((xmlNode *)self, exc);
1.1       paf      7329: }
                   7330: /**
                   7331:  * gdome_c_lastChild:
                   7332:  * @self:  Node Object ref
                   7333:  * @exc:  Exception Object ref
                   7334:  *
                   7335:  * Returns: the last child of this node. If there is no such node,
                   7336:  * this returns %NULL.
                   7337:  */
1.2     ! paf      7338: xmlNode *
1.1       paf      7339: gdome_c_lastChild (GdomeComment *self, GdomeException *exc)
                   7340: {
                   7341:  if (self == NULL) {
                   7342:    *exc = GDOME_NULL_POINTER_ERR;
                   7343:    return NULL;
                   7344:  }
                   7345:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7346:    *exc = GDOME_INVALID_STATE_ERR;
                   7347:    return NULL;
                   7348:  }
                   7349:  *exc = 0;
1.2     ! paf      7350:  return ((Gdome_xml_Comment *)self)->vtab->super.super.lastChild ((xmlNode *)self, exc);
1.1       paf      7351: }
                   7352: /**
                   7353:  * gdome_c_localName:
                   7354:  * @self:  Node Objects ref
                   7355:  * @exc:  Exception Object ref
                   7356:  *
                   7357:  * Returns: the local part of the qualified name of this node.
                   7358:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   7359:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   7360:  * always %NULL.
                   7361:  */
                   7362: GdomeDOMString *
                   7363: gdome_c_localName (GdomeComment *self, GdomeException *exc)
                   7364: {
                   7365:  if (self == NULL) {
                   7366:    *exc = GDOME_NULL_POINTER_ERR;
                   7367:    return NULL;
                   7368:  }
                   7369:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7370:    *exc = GDOME_INVALID_STATE_ERR;
                   7371:    return NULL;
                   7372:  }
                   7373:  *exc = 0;
1.2     ! paf      7374:  return ((Gdome_xml_Comment *)self)->vtab->super.super.localName ((xmlNode *)self, exc);
1.1       paf      7375: }
                   7376: /**
                   7377:  * gdome_c_namespaceURI:
                   7378:  * @self:  Node Objects ref
                   7379:  * @exc:  Exception Object ref
                   7380:  *
                   7381:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   7382:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   7383:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   7384:  * always %NULL.
                   7385:  */
                   7386: GdomeDOMString *
                   7387: gdome_c_namespaceURI (GdomeComment *self, GdomeException *exc)
                   7388: {
                   7389:  if (self == NULL) {
                   7390:    *exc = GDOME_NULL_POINTER_ERR;
                   7391:    return NULL;
                   7392:  }
                   7393:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7394:    *exc = GDOME_INVALID_STATE_ERR;
                   7395:    return NULL;
                   7396:  }
                   7397:  *exc = 0;
1.2     ! paf      7398:  return ((Gdome_xml_Comment *)self)->vtab->super.super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      7399: }
                   7400: /**
                   7401:  * gdome_c_nextSibling:
                   7402:  * @self:  Node Object ref
                   7403:  * @exc:  Exception Object ref
                   7404:  *
                   7405:  * Returns: the node immediately following this node. If there is no such
                   7406:  * node, this returns %NULL.
                   7407:  */
1.2     ! paf      7408: xmlNode *
1.1       paf      7409: gdome_c_nextSibling (GdomeComment *self, GdomeException *exc)
                   7410: {
                   7411:  if (self == NULL) {
                   7412:    *exc = GDOME_NULL_POINTER_ERR;
                   7413:    return NULL;
                   7414:  }
                   7415:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7416:    *exc = GDOME_INVALID_STATE_ERR;
                   7417:    return NULL;
                   7418:  }
                   7419:  *exc = 0;
1.2     ! paf      7420:  return ((Gdome_xml_Comment *)self)->vtab->super.super.nextSibling ((xmlNode *)self, exc);
1.1       paf      7421: }
                   7422: /**
                   7423:  * gdome_c_nodeName:
                   7424:  * @self:  Node Object ref
                   7425:  * @exc:  Exception Object ref
                   7426:  *
                   7427:  * Returns: the name of this node, depending on its type.
                   7428:  */
                   7429: GdomeDOMString *
                   7430: gdome_c_nodeName (GdomeComment *self, GdomeException *exc)
                   7431: {
                   7432:  if (self == NULL) {
                   7433:    *exc = GDOME_NULL_POINTER_ERR;
                   7434:    return NULL;
                   7435:  }
                   7436:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7437:    *exc = GDOME_INVALID_STATE_ERR;
                   7438:    return NULL;
                   7439:  }
                   7440:  *exc = 0;
1.2     ! paf      7441:  return ((Gdome_xml_Comment *)self)->vtab->super.super.nodeName ((xmlNode *)self, exc);
1.1       paf      7442: }
                   7443: /**
                   7444:  * gdome_c_nodeType:
                   7445:  * @self:  Node Object ref
                   7446:  * @exc:  Exception Object ref
                   7447:  *
                   7448:  * Returns: an integer bigger than %0 representing the type of the underlying
                   7449:  * object or %0 on error.
                   7450:  */
                   7451: unsigned short
                   7452: gdome_c_nodeType (GdomeComment *self, GdomeException *exc)
                   7453: {
                   7454:  if (self == NULL) {
                   7455:    *exc = GDOME_NULL_POINTER_ERR;
                   7456:    return 0;
                   7457:  }
                   7458:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7459:    *exc = GDOME_INVALID_STATE_ERR;
                   7460:    return 0;
                   7461:  }
                   7462:  *exc = 0;
1.2     ! paf      7463:  return ((Gdome_xml_Comment *)self)->vtab->super.super.nodeType ((xmlNode *)self, exc);
1.1       paf      7464: }
                   7465: /**
                   7466:  * gdome_c_nodeValue:
                   7467:  * @self:  Node Object ref
                   7468:  * @exc:  Exception Object ref
                   7469:  *
                   7470:  * Returns: the value of this node, depending on its type.
                   7471:  */
                   7472: GdomeDOMString *
                   7473: gdome_c_nodeValue (GdomeComment *self, GdomeException *exc)
                   7474: {
                   7475:  if (self == NULL) {
                   7476:    *exc = GDOME_NULL_POINTER_ERR;
                   7477:    return NULL;
                   7478:  }
                   7479:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7480:    *exc = GDOME_INVALID_STATE_ERR;
                   7481:    return NULL;
                   7482:  }
                   7483:  *exc = 0;
1.2     ! paf      7484:  return ((Gdome_xml_Comment *)self)->vtab->super.super.nodeValue ((xmlNode *)self, exc);
1.1       paf      7485: }
                   7486: /**
                   7487:  * gdome_c_set_nodeValue:
                   7488:  * @self:  Node Object ref
                   7489:  * @nodeValue:  The new value for this node.
                   7490:  * @exc:  Exception Object ref
                   7491:  *
                   7492:  * Sets The value of this node, depending on its type.
                   7493:  *
                   7494:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7495:  */
                   7496: void
                   7497: gdome_c_set_nodeValue (GdomeComment *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   7498: {
                   7499:  if (self == NULL) {
                   7500:    *exc = GDOME_NULL_POINTER_ERR;
                   7501:    return;
                   7502:  }
                   7503:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7504:    *exc = GDOME_INVALID_STATE_ERR;
                   7505:    return;
                   7506:  }
                   7507:  *exc = 0;
1.2     ! paf      7508:  ((Gdome_xml_Comment *)self)->vtab->super.super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      7509: }
                   7510: /**
                   7511:  * gdome_c_ownerDocument:
                   7512:  * @self:  Node Objects ref
                   7513:  * @exc:  Exception Object ref
                   7514:  *
                   7515:  * Returns: the documment object associated with this node. This is also the
                   7516:  * Document object used to create new nodes. When this node is a Document or a
                   7517:  * DocumentType which is not used with any Document yet, this is %NULL.
                   7518:  */
                   7519: GdomeDocument *
                   7520: gdome_c_ownerDocument (GdomeComment *self, GdomeException *exc)
                   7521: {
                   7522:  if (self == NULL) {
                   7523:    *exc = GDOME_NULL_POINTER_ERR;
                   7524:    return NULL;
                   7525:  }
                   7526:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7527:    *exc = GDOME_INVALID_STATE_ERR;
                   7528:    return NULL;
                   7529:  }
                   7530:  *exc = 0;
1.2     ! paf      7531:  return ((Gdome_xml_Comment *)self)->vtab->super.super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      7532: }
                   7533: /**
                   7534:  * gdome_c_parentNode:
                   7535:  * @self: Node Object ref
                   7536:  * @exc: Exception Object ref
                   7537:  *
                   7538:  * Returns: the parent of this node. All nodes, except Attr,
                   7539:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   7540:  * if a node has just been created and not yet added to the tree, or if it has
                   7541:  * been removed from the tree, this is %NULL.
                   7542:  */
1.2     ! paf      7543: xmlNode *
1.1       paf      7544: gdome_c_parentNode (GdomeComment *self, GdomeException *exc)
                   7545: {
                   7546:  if (self == NULL) {
                   7547:    *exc = GDOME_NULL_POINTER_ERR;
                   7548:    return NULL;
                   7549:  }
                   7550:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7551:    *exc = GDOME_INVALID_STATE_ERR;
                   7552:    return NULL;
                   7553:  }
                   7554:  *exc = 0;
1.2     ! paf      7555:  return ((Gdome_xml_Comment *)self)->vtab->super.super.parentNode ((xmlNode *)self, exc);
1.1       paf      7556: }
                   7557: /**
                   7558:  * gdome_c_prefix:
                   7559:  * @self:  Node Objects ref
                   7560:  * @exc:  Exception Object ref
                   7561:  *
                   7562:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   7563:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   7564:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   7565:  * always %NULL.
                   7566:  */
                   7567: GdomeDOMString *
                   7568: gdome_c_prefix (GdomeComment *self, GdomeException *exc)
                   7569: {
                   7570:  if (self == NULL) {
                   7571:    *exc = GDOME_NULL_POINTER_ERR;
                   7572:    return NULL;
                   7573:  }
                   7574:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7575:    *exc = GDOME_INVALID_STATE_ERR;
                   7576:    return NULL;
                   7577:  }
                   7578:  *exc = 0;
1.2     ! paf      7579:  return ((Gdome_xml_Comment *)self)->vtab->super.super.prefix ((xmlNode *)self, exc);
1.1       paf      7580: }
                   7581: /**
                   7582:  * gdome_c_set_prefix:
                   7583:  * @self:  Node Object ref
                   7584:  * @prefix:  The new prefix for this node.
                   7585:  * @exc:  Exception Object ref
                   7586:  *
                   7587:  * Sets a new nemaspace prefix for this node.
                   7588:  *
                   7589:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7590:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   7591:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   7592:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   7593:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   7594:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   7595:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   7596:  * an attribute and the qualifiedName of this node is "xmlns".
                   7597:  */
                   7598: void
                   7599: gdome_c_set_prefix (GdomeComment *self, GdomeDOMString *prefix, GdomeException *exc)
                   7600: {
                   7601:  if (self == NULL) {
                   7602:    *exc = GDOME_NULL_POINTER_ERR;
                   7603:    return;
                   7604:  }
                   7605:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7606:    *exc = GDOME_INVALID_STATE_ERR;
                   7607:    return;
                   7608:  }
                   7609:  *exc = 0;
1.2     ! paf      7610:  ((Gdome_xml_Comment *)self)->vtab->super.super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      7611: }
                   7612: /**
                   7613:  * gdome_c_previousSibling:
                   7614:  * @self:  Node Object ref
                   7615:  * @exc:  Exception Object ref
                   7616:  *
                   7617:  * Returns: the node immediately preceding this node. If there is no such
                   7618:  * node, this returns %NULL.
                   7619:  */
1.2     ! paf      7620: xmlNode *
1.1       paf      7621: gdome_c_previousSibling (GdomeComment *self, GdomeException *exc)
                   7622: {
                   7623:  if (self == NULL) {
                   7624:    *exc = GDOME_NULL_POINTER_ERR;
                   7625:    return NULL;
                   7626:  }
                   7627:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7628:    *exc = GDOME_INVALID_STATE_ERR;
                   7629:    return NULL;
                   7630:  }
                   7631:  *exc = 0;
1.2     ! paf      7632:  return ((Gdome_xml_Comment *)self)->vtab->super.super.previousSibling ((xmlNode *)self, exc);
1.1       paf      7633: }
                   7634: /**
                   7635:  * gdome_c_ref:
                   7636:  * @self:  Node Object ref
                   7637:  * @exc:  Exception Object ref
                   7638:  *
                   7639:  * Increase the reference count of the specified Node.
                   7640:  */
                   7641: void
                   7642: gdome_c_ref (GdomeComment *self, GdomeException *exc)
                   7643: {
                   7644:  if (self == NULL) {
                   7645:    *exc = GDOME_NULL_POINTER_ERR;
                   7646:    return;
                   7647:  }
                   7648:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7649:    *exc = GDOME_INVALID_STATE_ERR;
                   7650:    return;
                   7651:  }
                   7652:  *exc = 0;
1.2     ! paf      7653:  ((Gdome_xml_Comment *)self)->vtab->super.super.ref ((xmlNode *)self, exc);
1.1       paf      7654: }
                   7655: /**
                   7656:  * gdome_c_unref:
                   7657:  * @self:  Node Object ref
                   7658:  * @exc:  Exception Object ref
                   7659:  *
                   7660:  * Decrease the reference count of the specified Node. Free the Node structure
                   7661:  * if the Node will have zero reference.
                   7662:  */
                   7663: void
                   7664: gdome_c_unref (GdomeComment *self, GdomeException *exc)
                   7665: {
                   7666:  if (self == NULL) {
                   7667:    *exc = GDOME_NULL_POINTER_ERR;
                   7668:    return;
                   7669:  }
                   7670:  *exc = 0;
                   7671:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7672:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   7673:      ((Gdome_xml_Node *)self)->refcnt--;
                   7674: 
                   7675:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   7676: #ifdef DEBUG_REFCNT
                   7677:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   7678: #endif
                   7679:      g_free (self);
                   7680:    }
                   7681:    return;
                   7682:  }
1.2     ! paf      7683:  ((Gdome_xml_Comment *)self)->vtab->super.super.unref ((xmlNode *)self, exc);
1.1       paf      7684: }
                   7685: /**
                   7686:  * gdome_c_query_interface:
                   7687:  * @self:  Node Object ref
                   7688:  * @interface:  interface needed
                   7689:  * @exc:  Exception Object ref
                   7690:  *
                   7691:  * Returns: a reference to this object that implements the @interface needed,
                   7692:  *          or %NULL if the @interface is not supported by this Object.
                   7693:  */
                   7694: gpointer
                   7695: gdome_c_query_interface (GdomeComment *self, const char *interface, GdomeException *exc)
                   7696: {
                   7697:  if (self == NULL) {
                   7698:    *exc = GDOME_NULL_POINTER_ERR;
                   7699:    return NULL;
                   7700:  }
                   7701:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7702:    *exc = GDOME_INVALID_STATE_ERR;
                   7703:    return NULL;
                   7704:  }
                   7705:  *exc = 0;
1.2     ! paf      7706:  return ((Gdome_xml_Comment *)self)->vtab->super.super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      7707: }
                   7708: /**
                   7709:  * gdome_c_appendChild:
                   7710:  * @self:  Node Object ref
                   7711:  * @newChild:  The node to add
                   7712:  * @exc:  Exception Object ref
                   7713:  *
                   7714:  * Adds the node @newChild to the end of the list of children of this node.
                   7715:  * If the @newChild is already in the tree, it is first removed. If it is a
                   7716:  * DocumentFragment node, the entire contents of the document fragment are
                   7717:  * moved into the child list of this node
                   7718:  *
                   7719:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   7720:  * allow children of the type of the @newChild node, or if the node to append is
                   7721:  * one of this node's ancestors or this node itself.
                   7722:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   7723:  * document than the one that created this node.
                   7724:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7725:  * Returns: the node added.
                   7726:  */
1.2     ! paf      7727: xmlNode *
        !          7728: gdome_c_appendChild (GdomeComment *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      7729: {
                   7730:  if (self == NULL) {
                   7731:    *exc = GDOME_NULL_POINTER_ERR;
                   7732:    return NULL;
                   7733:  }
                   7734:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7735:    *exc = GDOME_INVALID_STATE_ERR;
                   7736:    return NULL;
                   7737:  }
                   7738:  *exc = 0;
1.2     ! paf      7739:  return ((Gdome_xml_Comment *)self)->vtab->super.super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      7740: }
                   7741: /**
                   7742:  * gdome_c_cloneNode:
                   7743:  * @self:  Node Object ref
                   7744:  * @deep:  If true, recursively clone the subtree under the specified node;
                   7745:  *         if false, clone only the node itself (and its attributes, if it is
                   7746:  *         an Element).
                   7747:  * @exc:  Exception Object ref
                   7748:  *
                   7749:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   7750:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   7751:  * %NULL).
                   7752:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   7753:  * nodes are not supported.
                   7754:  *
                   7755:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   7756:  * supported.
                   7757:  * Returns: the duplicate node.
                   7758:  */
1.2     ! paf      7759: xmlNode *
1.1       paf      7760: gdome_c_cloneNode (GdomeComment *self, GdomeBoolean deep, GdomeException *exc)
                   7761: {
                   7762:  if (self == NULL) {
                   7763:    *exc = GDOME_NULL_POINTER_ERR;
                   7764:    return NULL;
                   7765:  }
                   7766:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7767:    *exc = GDOME_INVALID_STATE_ERR;
                   7768:    return NULL;
                   7769:  }
                   7770:  *exc = 0;
1.2     ! paf      7771:  return ((Gdome_xml_Comment *)self)->vtab->super.super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      7772: }
                   7773: /**
                   7774:  * gdome_c_hasAttributes:
                   7775:  * @self:  Node Object ref
                   7776:  * @exc:  Exception Object ref
                   7777:  *
                   7778:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   7779:  */
                   7780: GdomeBoolean
                   7781: gdome_c_hasAttributes (GdomeComment *self, GdomeException *exc)
                   7782: {
                   7783:  if (self == NULL) {
                   7784:    *exc = GDOME_NULL_POINTER_ERR;
                   7785:    return FALSE;
                   7786:  }
                   7787:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7788:    *exc = GDOME_INVALID_STATE_ERR;
                   7789:    return FALSE;
                   7790:  }
                   7791:  *exc = 0;
1.2     ! paf      7792:  return ((Gdome_xml_Comment *)self)->vtab->super.super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      7793: }
                   7794: /**
                   7795:  * gdome_c_hasChildNodes:
                   7796:  * @self:  Node Object ref
                   7797:  * @exc:  Exception Object ref
                   7798:  *
                   7799:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   7800:  */
                   7801: GdomeBoolean
                   7802: gdome_c_hasChildNodes (GdomeComment *self, GdomeException *exc)
                   7803: {
                   7804:  if (self == NULL) {
                   7805:    *exc = GDOME_NULL_POINTER_ERR;
                   7806:    return FALSE;
                   7807:  }
                   7808:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7809:    *exc = GDOME_INVALID_STATE_ERR;
                   7810:    return FALSE;
                   7811:  }
                   7812:  *exc = 0;
1.2     ! paf      7813:  return ((Gdome_xml_Comment *)self)->vtab->super.super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      7814: }
                   7815: /**
                   7816:  * gdome_c_insertBefore:
                   7817:  * @self:  Node Object ref
                   7818:  * @newChild:  The new node to put in the child list
                   7819:  * @refChild:  the reference node, i.e., the node before which the new node
                   7820:  *             must be inserted.
                   7821:  * @exc:  Exception Object ref
                   7822:  *
                   7823:  * Inserts the node @newChild before the existing child node @refChild. If
                   7824:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   7825:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   7826:  * in the same order, before @refChild. If the @newChild is already in the
                   7827:  * tree, it is first removed.
                   7828:  *
                   7829:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   7830:  * allow children of the type of the @newChild node, or if the node to insert is
                   7831:  * one of this node's ancestors or this node itself.
                   7832:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   7833:  * document than the one that created this node.
                   7834:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   7835:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7836:  * Returns: the node being inserted.
                   7837:  */
1.2     ! paf      7838: xmlNode *
        !          7839: gdome_c_insertBefore (GdomeComment *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      7840: {
                   7841:  if (self == NULL) {
                   7842:    *exc = GDOME_NULL_POINTER_ERR;
                   7843:    return NULL;
                   7844:  }
                   7845:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7846:    *exc = GDOME_INVALID_STATE_ERR;
                   7847:    return NULL;
                   7848:  }
                   7849:  *exc = 0;
1.2     ! paf      7850:  return ((Gdome_xml_Comment *)self)->vtab->super.super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      7851: }
                   7852: /**
                   7853:  * gdome_c_isSupported:
                   7854:  * @self:  Node Object ref
                   7855:  * @feature:  The name of the feature to test.
                   7856:  * @version:  This is the version number of the feature to test. In Level 2,
                   7857:  *            version 1, this is the string "2.0". If the version is not
                   7858:  *            specified, supporting any version of the feature will cause the
                   7859:  *            method to return %TRUE.
                   7860:  * @exc:  Exception Object ref
                   7861:  *
                   7862:  * Tests whether the DOM implementation implements a specific feature and that
                   7863:  * feature is supported by this node.
                   7864:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   7865:  * otherwise.
                   7866:  */
                   7867: GdomeBoolean
                   7868: gdome_c_isSupported (GdomeComment *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   7869: {
                   7870:  if (self == NULL) {
                   7871:    *exc = GDOME_NULL_POINTER_ERR;
                   7872:    return FALSE;
                   7873:  }
                   7874:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7875:    *exc = GDOME_INVALID_STATE_ERR;
                   7876:    return FALSE;
                   7877:  }
                   7878:  *exc = 0;
1.2     ! paf      7879:  return ((Gdome_xml_Comment *)self)->vtab->super.super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      7880: }
                   7881: /**
                   7882:  * gdome_c_normalize:
                   7883:  * @self:  Node Object ref
                   7884:  * @exc:  Exception Object ref
                   7885:  *
                   7886:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   7887:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   7888:  * elements, comments, processing instructions, CDATA sections, and entity
                   7889:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   7890:  * nodes nor empty Text nodes.
                   7891:  */
                   7892: void
                   7893: gdome_c_normalize (GdomeComment *self, GdomeException *exc)
                   7894: {
                   7895:  if (self == NULL) {
                   7896:    *exc = GDOME_NULL_POINTER_ERR;
                   7897:    return;
                   7898:  }
                   7899:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7900:    *exc = GDOME_INVALID_STATE_ERR;
                   7901:    return;
                   7902:  }
                   7903:  *exc = 0;
1.2     ! paf      7904:  ((Gdome_xml_Comment *)self)->vtab->super.super.normalize ((xmlNode *)self, exc);
1.1       paf      7905: }
                   7906: /**
                   7907:  * gdome_c_removeChild:
                   7908:  * @self:  Node Object ref
                   7909:  * @oldChild:  The node being removed
                   7910:  * @exc:  Exception Object ref
                   7911:  *
                   7912:  * Removes the child node indicated by @oldChild from the list of children, and
                   7913:  * returns it.
                   7914:  *
                   7915:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   7916:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7917:  * Returns: the node removed.
                   7918:  */
1.2     ! paf      7919: xmlNode *
        !          7920: gdome_c_removeChild (GdomeComment *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      7921: {
                   7922:  if (self == NULL) {
                   7923:    *exc = GDOME_NULL_POINTER_ERR;
                   7924:    return NULL;
                   7925:  }
                   7926:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7927:    *exc = GDOME_INVALID_STATE_ERR;
                   7928:    return NULL;
                   7929:  }
                   7930:  *exc = 0;
1.2     ! paf      7931:  return ((Gdome_xml_Comment *)self)->vtab->super.super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      7932: }
                   7933: /**
                   7934:  * gdome_c_replaceChild:
                   7935:  * @self:  Node Object ref
                   7936:  * @newChild:  The new node to put in the child list
                   7937:  * @oldChild:  The node being replaced in the list
                   7938:  * @exc:  Exception Object ref
                   7939:  *
                   7940:  * Replaces the child node @oldChild with @newChild in the list of children,
                   7941:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   7942:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   7943:  * inserted in the same order. If the @newChild is already in the tree, it is
                   7944:  * first removed.
                   7945:  *
                   7946:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   7947:  * not allow children of the type of the @newChild node, or if the node to put
                   7948:  * in is one of this node's ancestors or this node itself.
                   7949:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   7950:  * document than the one that created this node.
                   7951:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   7952:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   7953:  * Returns: the node replaced.
                   7954:  */
1.2     ! paf      7955: xmlNode *
        !          7956: gdome_c_replaceChild (GdomeComment *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      7957: {
                   7958:  if (self == NULL) {
                   7959:    *exc = GDOME_NULL_POINTER_ERR;
                   7960:    return NULL;
                   7961:  }
                   7962:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   7963:    *exc = GDOME_INVALID_STATE_ERR;
                   7964:    return NULL;
                   7965:  }
                   7966:  *exc = 0;
1.2     ! paf      7967:  return ((Gdome_xml_Comment *)self)->vtab->super.super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      7968: }
                   7969: /**
                   7970:  * gdome_c_addEventListener:
                   7971:  * @self:  Node Object ref
                   7972:  * @type:  the event type for which the user is registering
                   7973:  * @listener:  the listener parameter takes an interface implemented by the
                   7974:  *             user which contains the methods to be called when the event occurs.
                   7975:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   7976:  *               capture. After initiating capture, all events of the specified
                   7977:  *               type will be dispatched to the registered EventListener before
                   7978:  *               being dispatched to any EventTargets beneath them in the tree.
                   7979:  *               Events which are bubbling upward through the tree will not
                   7980:  *               trigger an EventListener designated to use capture.
                   7981:  * @exc:  Exception Object ref
                   7982:  *
                   7983:  * This method allows the registration of event listeners on the event target.
                   7984:  * If an EventListener is added to an EventTarget while it is processing an
                   7985:  * event, it will not be triggered by the current actions but may be triggered
                   7986:  * during a later stage of event flow, such as the bubbling phase.
                   7987:  * If multiple identical EventListeners are registered on the same EventTarget
                   7988:  * with the same parameters the duplicate instances are discarded. They do not
                   7989:  * cause the EventListener to be called twice and since they are discarded
                   7990:  * they do not need to be removed with the removeEventListener method.
                   7991:  */
                   7992: void
                   7993: gdome_c_addEventListener (GdomeComment *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   7994: {
                   7995:  if (self == NULL) {
                   7996:    *exc = GDOME_NULL_POINTER_ERR;
                   7997:    return;
                   7998:  }
                   7999:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8000:    *exc = GDOME_INVALID_STATE_ERR;
                   8001:    return;
                   8002:  }
                   8003:  *exc = 0;
1.2     ! paf      8004:  ((Gdome_xml_Comment *)self)->vtab->super.super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      8005: }
                   8006: /**
                   8007:  * gdome_c_removeEventListener:
                   8008:  * @self:  Node Object ref
                   8009:  * @type:  Specifies the event type of the EventListener being removed.
                   8010:  * @listener:  The EventListener parameter indicates the EventListener to be
                   8011:  *             removed.
                   8012:  * @useCapture:  Specifies whether the EventListener being removed was
                   8013:  *               registered as a capturing listener or not. If a listener was
                   8014:  *               registered twice, one with capture and one without, each must
                   8015:  *               be removed separately. Removal of a capturing listener does
                   8016:  *               not affect a non-capturing version of the same listener, and
                   8017:  *               vice versa.
                   8018:  * @exc:  Exception Object ref
                   8019:  *
                   8020:  * This method allows the removal of event listeners from the event target. If
                   8021:  * an EventListener is removed from an EventTarget while it is processing an
                   8022:  * event, it will not be triggered by the current actions. EventListeners can
                   8023:  * never be invoked after being removed. Calling removeEventListener with
                   8024:  * arguments which do not identify any currently registered EventListener on
                   8025:  * the EventTarget has no effect.
                   8026:  */
                   8027: void
                   8028: gdome_c_removeEventListener (GdomeComment *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   8029: {
                   8030:  if (self == NULL) {
                   8031:    *exc = GDOME_NULL_POINTER_ERR;
                   8032:    return;
                   8033:  }
                   8034:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8035:    *exc = GDOME_INVALID_STATE_ERR;
                   8036:    return;
                   8037:  }
                   8038:  *exc = 0;
1.2     ! paf      8039:  ((Gdome_xml_Comment *)self)->vtab->super.super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      8040: }
                   8041: /**
                   8042:  * gdome_c_dispatchEvent:
                   8043:  * @self:  Node Object ref
                   8044:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   8045:  *        used in processing the event.
                   8046:  * @exc:  Exception Object ref
                   8047:  *
                   8048:  * This method allows the dispatch of events into the implementations event
                   8049:  * model. Events dispatched in this manner will have the same capturing and
                   8050:  * bubbling behavior as events dispatched directly by the implementation. The
                   8051:  * target of the event is the EventTarget on which dispatchEvent is called.
                   8052:  *
                   8053:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   8054:  * specified by initializing the event before dispatchEvent was called.
                   8055:  * Specification of the Event's type as %NULL or an empty string will also
                   8056:  * trigger this exception.
                   8057:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   8058:  *          is %TRUE.
                   8059:  */
                   8060: GdomeBoolean
                   8061: gdome_c_dispatchEvent (GdomeComment *self, GdomeEvent *evt, GdomeException *exc)
                   8062: {
                   8063:  if (self == NULL) {
                   8064:    *exc = GDOME_NULL_POINTER_ERR;
                   8065:    return FALSE;
                   8066:  }
                   8067:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8068:    *exc = GDOME_INVALID_STATE_ERR;
                   8069:    return FALSE;
                   8070:  }
                   8071:  *exc = 0;
1.2     ! paf      8072:  return ((Gdome_xml_Comment *)self)->vtab->super.super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      8073: }
                   8074: /**
                   8075:  * gdome_c_subTreeDispatchEvent:
                   8076:  * @self:  Node Object ref
                   8077:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   8078:  *        used in processing the event.
                   8079:  * @exc:  Exception Object ref
                   8080:  *
                   8081:  * This method allows the dispatch of events into the implementations event
                   8082:  * model. Events dispatched in this manner will have the same capturing and
                   8083:  * bubbling behavior as events dispatched directly by the implementation. The
                   8084:  * target of the event is any nodes in the subtree of the EventTarget on which
                   8085:  * dispatchEvent is called.
                   8086:  *
                   8087:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   8088:  * specified by initializing the event before dispatchEvent was called.
                   8089:  * Specification of the Event's type as %NULL or an empty string will also
                   8090:  * trigger this exception.
                   8091:  */
                   8092: void
                   8093: gdome_c_subTreeDispatchEvent (GdomeComment *self, GdomeEvent *evt, GdomeException *exc)
                   8094: {
                   8095:  if (self == NULL) {
                   8096:    *exc = GDOME_NULL_POINTER_ERR;
                   8097:    return;
                   8098:  }
                   8099:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8100:    *exc = GDOME_INVALID_STATE_ERR;
                   8101:    return;
                   8102:  }
                   8103:  *exc = 0;
1.2     ! paf      8104:  ((Gdome_xml_Comment *)self)->vtab->super.super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      8105: }
                   8106: /**
                   8107:  * gdome_c_canAppend:
                   8108:  * @self:  Node Object ref
                   8109:  * @newChild:  The Node Object ref of the node to test
                   8110:  * @exc:  Exception Object ref
                   8111:  *
                   8112:  * Tests if a @newChild can be added in the child list of this node.
                   8113:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   8114:  */
                   8115: GdomeBoolean
1.2     ! paf      8116: gdome_c_canAppend (GdomeComment *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      8117: {
                   8118:  if (self == NULL) {
                   8119:    *exc = GDOME_NULL_POINTER_ERR;
                   8120:    return FALSE;
                   8121:  }
                   8122:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8123:    *exc = GDOME_INVALID_STATE_ERR;
                   8124:    return FALSE;
                   8125:  }
                   8126:  *exc = 0;
1.2     ! paf      8127:  return ((Gdome_xml_Comment *)self)->vtab->super.super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      8128: }
                   8129: 
                   8130: /******************************************************************************
                   8131:           GdomeAttr interface API
                   8132:  ******************************************************************************/
                   8133: /**
                   8134:  * gdome_a_name:
                   8135:  * @self:  Attr Object ref
                   8136:  * @exc:  Exception Object ref
                   8137:  *
                   8138:  * Returns: the qualified name of this attribute.
                   8139:  */
                   8140: GdomeDOMString *
                   8141: gdome_a_name (GdomeAttr *self, GdomeException *exc)
                   8142: {
                   8143:  if (self == NULL) {
                   8144:    *exc = GDOME_NULL_POINTER_ERR;
                   8145:    return NULL;
                   8146:  }
                   8147:  if (((Gdome_xml_Attr *)self)->n == NULL) {
                   8148:    *exc = GDOME_INVALID_STATE_ERR;
                   8149:    return NULL;
                   8150:  }
                   8151:  *exc = 0;
                   8152:  return ((Gdome_xml_Attr *)self)->vtab->name (self, exc);
                   8153: }
                   8154: /**
                   8155:  * gdome_a_ownerElement:
                   8156:  * @self:  Attr Object ref
                   8157:  * @exc:  Exception Object ref
                   8158:  *
                   8159:  * Returns: the Element node this attribute is attached to or %NULL if this
                   8160:  * attribute is not in use.
                   8161:  */
                   8162: GdomeElement *
                   8163: gdome_a_ownerElement (GdomeAttr *self, GdomeException *exc)
                   8164: {
                   8165:  if (self == NULL) {
                   8166:    *exc = GDOME_NULL_POINTER_ERR;
                   8167:    return NULL;
                   8168:  }
                   8169:  if (((Gdome_xml_Attr *)self)->n == NULL) {
                   8170:    *exc = GDOME_INVALID_STATE_ERR;
                   8171:    return NULL;
                   8172:  }
                   8173:  *exc = 0;
                   8174:  return ((Gdome_xml_Attr *)self)->vtab->ownerElement (self, exc);
                   8175: }
                   8176: /**
                   8177:  * gdome_a_specified:
                   8178:  * @self:  Attr Object ref
                   8179:  * @exc:  Exception Object ref
                   8180:  *
                   8181:  * NOT IMPLEMENTED
                   8182:  * Returns: %TRUE
                   8183:  */
                   8184: GdomeBoolean
                   8185: gdome_a_specified (GdomeAttr *self, GdomeException *exc)
                   8186: {
                   8187:  if (self == NULL) {
                   8188:    *exc = GDOME_NULL_POINTER_ERR;
                   8189:    return FALSE;
                   8190:  }
                   8191:  if (((Gdome_xml_Attr *)self)->n == NULL) {
                   8192:    *exc = GDOME_INVALID_STATE_ERR;
                   8193:    return FALSE;
                   8194:  }
                   8195:  *exc = 0;
                   8196:  return ((Gdome_xml_Attr *)self)->vtab->specified (self, exc);
                   8197: }
                   8198: /**
                   8199:  * gdome_a_value:
                   8200:  * @self:  Attr Object ref
                   8201:  * @exc:  Exception Object ref
                   8202:  *
                   8203:  * Returns: the value of this attribute.
                   8204:  */
                   8205: GdomeDOMString *
                   8206: gdome_a_value (GdomeAttr *self, GdomeException *exc)
                   8207: {
                   8208:  if (self == NULL) {
                   8209:    *exc = GDOME_NULL_POINTER_ERR;
                   8210:    return NULL;
                   8211:  }
                   8212:  if (((Gdome_xml_Attr *)self)->n == NULL) {
                   8213:    *exc = GDOME_INVALID_STATE_ERR;
                   8214:    return NULL;
                   8215:  }
                   8216:  *exc = 0;
                   8217:  return ((Gdome_xml_Attr *)self)->vtab->value (self, exc);
                   8218: }
                   8219: /**
                   8220:  * gdome_a_set_value:
                   8221:  * @self:  Attr Object ref
                   8222:  * @value:  The new value to set
                   8223:  * @exc:  Exception Object ref
                   8224:  *
                   8225:  * Sets the value of this attribute.
                   8226:  *
                   8227:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   8228:  */
                   8229: void
                   8230: gdome_a_set_value (GdomeAttr *self, GdomeDOMString *value, GdomeException *exc)
                   8231: {
                   8232:  if (self == NULL) {
                   8233:    *exc = GDOME_NULL_POINTER_ERR;
                   8234:    return;
                   8235:  }
                   8236:  if (((Gdome_xml_Attr *)self)->n == NULL) {
                   8237:    *exc = GDOME_INVALID_STATE_ERR;
                   8238:    return;
                   8239:  }
                   8240:  *exc = 0;
                   8241:  ((Gdome_xml_Attr *)self)->vtab->set_value (self, value, exc);
                   8242: }
                   8243: /**
                   8244:  * gdome_a_attributes:
                   8245:  * @self:  Node Object ref
                   8246:  * @exc:  Exception Object ref
                   8247:  *
                   8248:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   8249:  * Element) or %NULL otherwise.
                   8250:  */
                   8251: GdomeNamedNodeMap *
                   8252: gdome_a_attributes (GdomeAttr *self, GdomeException *exc)
                   8253: {
                   8254:  if (self == NULL) {
                   8255:    *exc = GDOME_NULL_POINTER_ERR;
                   8256:    return NULL;
                   8257:  }
                   8258:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8259:    *exc = GDOME_INVALID_STATE_ERR;
                   8260:    return NULL;
                   8261:  }
                   8262:  *exc = 0;
1.2     ! paf      8263:  return ((Gdome_xml_Attr *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      8264: }
                   8265: /**
                   8266:  * gdome_a_childNodes:
                   8267:  * @self:  Node Object ref
                   8268:  * @exc:  Exception Object ref
                   8269:  *
                   8270:  * Returns: a NodeList that contains all children of this node. If there are no
                   8271:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   8272:  * not considered to be children of element nodes - use gdome_n_attributes to
                   8273:  * obtain the attributes.
                   8274:  */
                   8275: GdomeNodeList *
                   8276: gdome_a_childNodes (GdomeAttr *self, GdomeException *exc)
                   8277: {
                   8278:  if (self == NULL) {
                   8279:    *exc = GDOME_NULL_POINTER_ERR;
                   8280:    return NULL;
                   8281:  }
                   8282:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8283:    *exc = GDOME_INVALID_STATE_ERR;
                   8284:    return NULL;
                   8285:  }
                   8286:  *exc = 0;
1.2     ! paf      8287:  return ((Gdome_xml_Attr *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      8288: }
                   8289: /**
                   8290:  * gdome_a_firstChild:
                   8291:  * @self:  Node Object ref
                   8292:  * @exc:  Exception Object ref
                   8293:  * 
                   8294:  * Returns: the first child of this node. If there is no such node,
                   8295:  * this returns %NULL.
                   8296:  */
1.2     ! paf      8297: xmlNode *
1.1       paf      8298: gdome_a_firstChild (GdomeAttr *self, GdomeException *exc)
                   8299: {
                   8300:  if (self == NULL) {
                   8301:    *exc = GDOME_NULL_POINTER_ERR;
                   8302:    return NULL;
                   8303:  }
                   8304:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8305:    *exc = GDOME_INVALID_STATE_ERR;
                   8306:    return NULL;
                   8307:  }
                   8308:  *exc = 0;
1.2     ! paf      8309:  return ((Gdome_xml_Attr *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      8310: }
                   8311: /**
                   8312:  * gdome_a_lastChild:
                   8313:  * @self:  Node Object ref
                   8314:  * @exc:  Exception Object ref
                   8315:  *
                   8316:  * Returns: the last child of this node. If there is no such node,
                   8317:  * this returns %NULL.
                   8318:  */
1.2     ! paf      8319: xmlNode *
1.1       paf      8320: gdome_a_lastChild (GdomeAttr *self, GdomeException *exc)
                   8321: {
                   8322:  if (self == NULL) {
                   8323:    *exc = GDOME_NULL_POINTER_ERR;
                   8324:    return NULL;
                   8325:  }
                   8326:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8327:    *exc = GDOME_INVALID_STATE_ERR;
                   8328:    return NULL;
                   8329:  }
                   8330:  *exc = 0;
1.2     ! paf      8331:  return ((Gdome_xml_Attr *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      8332: }
                   8333: /**
                   8334:  * gdome_a_localName:
                   8335:  * @self:  Node Objects ref
                   8336:  * @exc:  Exception Object ref
                   8337:  *
                   8338:  * Returns: the local part of the qualified name of this node.
                   8339:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   8340:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   8341:  * always %NULL.
                   8342:  */
                   8343: GdomeDOMString *
                   8344: gdome_a_localName (GdomeAttr *self, GdomeException *exc)
                   8345: {
                   8346:  if (self == NULL) {
                   8347:    *exc = GDOME_NULL_POINTER_ERR;
                   8348:    return NULL;
                   8349:  }
                   8350:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8351:    *exc = GDOME_INVALID_STATE_ERR;
                   8352:    return NULL;
                   8353:  }
                   8354:  *exc = 0;
1.2     ! paf      8355:  return ((Gdome_xml_Attr *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      8356: }
                   8357: /**
                   8358:  * gdome_a_namespaceURI:
                   8359:  * @self:  Node Objects ref
                   8360:  * @exc:  Exception Object ref
                   8361:  *
                   8362:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   8363:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   8364:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   8365:  * always %NULL.
                   8366:  */
                   8367: GdomeDOMString *
                   8368: gdome_a_namespaceURI (GdomeAttr *self, GdomeException *exc)
                   8369: {
                   8370:  if (self == NULL) {
                   8371:    *exc = GDOME_NULL_POINTER_ERR;
                   8372:    return NULL;
                   8373:  }
                   8374:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8375:    *exc = GDOME_INVALID_STATE_ERR;
                   8376:    return NULL;
                   8377:  }
                   8378:  *exc = 0;
1.2     ! paf      8379:  return ((Gdome_xml_Attr *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      8380: }
                   8381: /**
                   8382:  * gdome_a_nextSibling:
                   8383:  * @self:  Node Object ref
                   8384:  * @exc:  Exception Object ref
                   8385:  *
                   8386:  * Returns: the node immediately following this node. If there is no such
                   8387:  * node, this returns %NULL.
                   8388:  */
1.2     ! paf      8389: xmlNode *
1.1       paf      8390: gdome_a_nextSibling (GdomeAttr *self, GdomeException *exc)
                   8391: {
                   8392:  if (self == NULL) {
                   8393:    *exc = GDOME_NULL_POINTER_ERR;
                   8394:    return NULL;
                   8395:  }
                   8396:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8397:    *exc = GDOME_INVALID_STATE_ERR;
                   8398:    return NULL;
                   8399:  }
                   8400:  *exc = 0;
1.2     ! paf      8401:  return ((Gdome_xml_Attr *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      8402: }
                   8403: /**
                   8404:  * gdome_a_nodeName:
                   8405:  * @self:  Node Object ref
                   8406:  * @exc:  Exception Object ref
                   8407:  *
                   8408:  * Returns: the name of this node, depending on its type.
                   8409:  */
                   8410: GdomeDOMString *
                   8411: gdome_a_nodeName (GdomeAttr *self, GdomeException *exc)
                   8412: {
                   8413:  if (self == NULL) {
                   8414:    *exc = GDOME_NULL_POINTER_ERR;
                   8415:    return NULL;
                   8416:  }
                   8417:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8418:    *exc = GDOME_INVALID_STATE_ERR;
                   8419:    return NULL;
                   8420:  }
                   8421:  *exc = 0;
1.2     ! paf      8422:  return ((Gdome_xml_Attr *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      8423: }
                   8424: /**
                   8425:  * gdome_a_nodeType:
                   8426:  * @self:  Node Object ref
                   8427:  * @exc:  Exception Object ref
                   8428:  *
                   8429:  * Returns: an integer bigger than %0 representing the type of the underlying
                   8430:  * object or %0 on error.
                   8431:  */
                   8432: unsigned short
                   8433: gdome_a_nodeType (GdomeAttr *self, GdomeException *exc)
                   8434: {
                   8435:  if (self == NULL) {
                   8436:    *exc = GDOME_NULL_POINTER_ERR;
                   8437:    return 0;
                   8438:  }
                   8439:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8440:    *exc = GDOME_INVALID_STATE_ERR;
                   8441:    return 0;
                   8442:  }
                   8443:  *exc = 0;
1.2     ! paf      8444:  return ((Gdome_xml_Attr *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      8445: }
                   8446: /**
                   8447:  * gdome_a_nodeValue:
                   8448:  * @self:  Node Object ref
                   8449:  * @exc:  Exception Object ref
                   8450:  *
                   8451:  * Returns: the value of this node, depending on its type.
                   8452:  */
                   8453: GdomeDOMString *
                   8454: gdome_a_nodeValue (GdomeAttr *self, GdomeException *exc)
                   8455: {
                   8456:  if (self == NULL) {
                   8457:    *exc = GDOME_NULL_POINTER_ERR;
                   8458:    return NULL;
                   8459:  }
                   8460:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8461:    *exc = GDOME_INVALID_STATE_ERR;
                   8462:    return NULL;
                   8463:  }
                   8464:  *exc = 0;
1.2     ! paf      8465:  return ((Gdome_xml_Attr *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      8466: }
                   8467: /**
                   8468:  * gdome_a_set_nodeValue:
                   8469:  * @self:  Node Object ref
                   8470:  * @nodeValue:  The new value for this node.
                   8471:  * @exc:  Exception Object ref
                   8472:  *
                   8473:  * Sets The value of this node, depending on its type.
                   8474:  *
                   8475:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   8476:  */
                   8477: void
                   8478: gdome_a_set_nodeValue (GdomeAttr *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   8479: {
                   8480:  if (self == NULL) {
                   8481:    *exc = GDOME_NULL_POINTER_ERR;
                   8482:    return;
                   8483:  }
                   8484:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8485:    *exc = GDOME_INVALID_STATE_ERR;
                   8486:    return;
                   8487:  }
                   8488:  *exc = 0;
1.2     ! paf      8489:  ((Gdome_xml_Attr *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      8490: }
                   8491: /**
                   8492:  * gdome_a_ownerDocument:
                   8493:  * @self:  Node Objects ref
                   8494:  * @exc:  Exception Object ref
                   8495:  *
                   8496:  * Returns: the documment object associated with this node. This is also the
                   8497:  * Document object used to create new nodes. When this node is a Document or a
                   8498:  * DocumentType which is not used with any Document yet, this is %NULL.
                   8499:  */
                   8500: GdomeDocument *
                   8501: gdome_a_ownerDocument (GdomeAttr *self, GdomeException *exc)
                   8502: {
                   8503:  if (self == NULL) {
                   8504:    *exc = GDOME_NULL_POINTER_ERR;
                   8505:    return NULL;
                   8506:  }
                   8507:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8508:    *exc = GDOME_INVALID_STATE_ERR;
                   8509:    return NULL;
                   8510:  }
                   8511:  *exc = 0;
1.2     ! paf      8512:  return ((Gdome_xml_Attr *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      8513: }
                   8514: /**
                   8515:  * gdome_a_parentNode:
                   8516:  * @self: Node Object ref
                   8517:  * @exc: Exception Object ref
                   8518:  *
                   8519:  * Returns: the parent of this node. All nodes, except Attr,
                   8520:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   8521:  * if a node has just been created and not yet added to the tree, or if it has
                   8522:  * been removed from the tree, this is %NULL.
                   8523:  */
1.2     ! paf      8524: xmlNode *
1.1       paf      8525: gdome_a_parentNode (GdomeAttr *self, GdomeException *exc)
                   8526: {
                   8527:  if (self == NULL) {
                   8528:    *exc = GDOME_NULL_POINTER_ERR;
                   8529:    return NULL;
                   8530:  }
                   8531:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8532:    *exc = GDOME_INVALID_STATE_ERR;
                   8533:    return NULL;
                   8534:  }
                   8535:  *exc = 0;
1.2     ! paf      8536:  return ((Gdome_xml_Attr *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      8537: }
                   8538: /**
                   8539:  * gdome_a_prefix:
                   8540:  * @self:  Node Objects ref
                   8541:  * @exc:  Exception Object ref
                   8542:  *
                   8543:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   8544:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   8545:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   8546:  * always %NULL.
                   8547:  */
                   8548: GdomeDOMString *
                   8549: gdome_a_prefix (GdomeAttr *self, GdomeException *exc)
                   8550: {
                   8551:  if (self == NULL) {
                   8552:    *exc = GDOME_NULL_POINTER_ERR;
                   8553:    return NULL;
                   8554:  }
                   8555:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8556:    *exc = GDOME_INVALID_STATE_ERR;
                   8557:    return NULL;
                   8558:  }
                   8559:  *exc = 0;
1.2     ! paf      8560:  return ((Gdome_xml_Attr *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      8561: }
                   8562: /**
                   8563:  * gdome_a_set_prefix:
                   8564:  * @self:  Node Object ref
                   8565:  * @prefix:  The new prefix for this node.
                   8566:  * @exc:  Exception Object ref
                   8567:  *
                   8568:  * Sets a new nemaspace prefix for this node.
                   8569:  *
                   8570:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   8571:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   8572:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   8573:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   8574:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   8575:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   8576:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   8577:  * an attribute and the qualifiedName of this node is "xmlns".
                   8578:  */
                   8579: void
                   8580: gdome_a_set_prefix (GdomeAttr *self, GdomeDOMString *prefix, GdomeException *exc)
                   8581: {
                   8582:  if (self == NULL) {
                   8583:    *exc = GDOME_NULL_POINTER_ERR;
                   8584:    return;
                   8585:  }
                   8586:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8587:    *exc = GDOME_INVALID_STATE_ERR;
                   8588:    return;
                   8589:  }
                   8590:  *exc = 0;
1.2     ! paf      8591:  ((Gdome_xml_Attr *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      8592: }
                   8593: /**
                   8594:  * gdome_a_previousSibling:
                   8595:  * @self:  Node Object ref
                   8596:  * @exc:  Exception Object ref
                   8597:  *
                   8598:  * Returns: the node immediately preceding this node. If there is no such
                   8599:  * node, this returns %NULL.
                   8600:  */
1.2     ! paf      8601: xmlNode *
1.1       paf      8602: gdome_a_previousSibling (GdomeAttr *self, GdomeException *exc)
                   8603: {
                   8604:  if (self == NULL) {
                   8605:    *exc = GDOME_NULL_POINTER_ERR;
                   8606:    return NULL;
                   8607:  }
                   8608:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8609:    *exc = GDOME_INVALID_STATE_ERR;
                   8610:    return NULL;
                   8611:  }
                   8612:  *exc = 0;
1.2     ! paf      8613:  return ((Gdome_xml_Attr *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      8614: }
                   8615: /**
                   8616:  * gdome_a_ref:
                   8617:  * @self:  Node Object ref
                   8618:  * @exc:  Exception Object ref
                   8619:  *
                   8620:  * Increase the reference count of the specified Node.
                   8621:  */
                   8622: void
                   8623: gdome_a_ref (GdomeAttr *self, GdomeException *exc)
                   8624: {
                   8625:  if (self == NULL) {
                   8626:    *exc = GDOME_NULL_POINTER_ERR;
                   8627:    return;
                   8628:  }
                   8629:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8630:    *exc = GDOME_INVALID_STATE_ERR;
                   8631:    return;
                   8632:  }
                   8633:  *exc = 0;
1.2     ! paf      8634:  ((Gdome_xml_Attr *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      8635: }
                   8636: /**
                   8637:  * gdome_a_unref:
                   8638:  * @self:  Node Object ref
                   8639:  * @exc:  Exception Object ref
                   8640:  *
                   8641:  * Decrease the reference count of the specified Node. Free the Node structure
                   8642:  * if the Node will have zero reference.
                   8643:  */
                   8644: void
                   8645: gdome_a_unref (GdomeAttr *self, GdomeException *exc)
                   8646: {
                   8647:  if (self == NULL) {
                   8648:    *exc = GDOME_NULL_POINTER_ERR;
                   8649:    return;
                   8650:  }
                   8651:  *exc = 0;
                   8652:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8653:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   8654:      ((Gdome_xml_Node *)self)->refcnt--;
                   8655: 
                   8656:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   8657: #ifdef DEBUG_REFCNT
                   8658:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   8659: #endif
                   8660:      g_free (self);
                   8661:    }
                   8662:    return;
                   8663:  }
1.2     ! paf      8664:  ((Gdome_xml_Attr *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      8665: }
                   8666: /**
                   8667:  * gdome_a_query_interface:
                   8668:  * @self:  Node Object ref
                   8669:  * @interface:  interface needed
                   8670:  * @exc:  Exception Object ref
                   8671:  *
                   8672:  * Returns: a reference to this object that implements the @interface needed,
                   8673:  *          or %NULL if the @interface is not supported by this Object.
                   8674:  */
                   8675: gpointer
                   8676: gdome_a_query_interface (GdomeAttr *self, const char *interface, GdomeException *exc)
                   8677: {
                   8678:  if (self == NULL) {
                   8679:    *exc = GDOME_NULL_POINTER_ERR;
                   8680:    return NULL;
                   8681:  }
                   8682:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8683:    *exc = GDOME_INVALID_STATE_ERR;
                   8684:    return NULL;
                   8685:  }
                   8686:  *exc = 0;
1.2     ! paf      8687:  return ((Gdome_xml_Attr *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      8688: }
                   8689: /**
                   8690:  * gdome_a_appendChild:
                   8691:  * @self:  Node Object ref
                   8692:  * @newChild:  The node to add
                   8693:  * @exc:  Exception Object ref
                   8694:  *
                   8695:  * Adds the node @newChild to the end of the list of children of this node.
                   8696:  * If the @newChild is already in the tree, it is first removed. If it is a
                   8697:  * DocumentFragment node, the entire contents of the document fragment are
                   8698:  * moved into the child list of this node
                   8699:  *
                   8700:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   8701:  * allow children of the type of the @newChild node, or if the node to append is
                   8702:  * one of this node's ancestors or this node itself.
                   8703:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   8704:  * document than the one that created this node.
                   8705:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   8706:  * Returns: the node added.
                   8707:  */
1.2     ! paf      8708: xmlNode *
        !          8709: gdome_a_appendChild (GdomeAttr *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      8710: {
                   8711:  if (self == NULL) {
                   8712:    *exc = GDOME_NULL_POINTER_ERR;
                   8713:    return NULL;
                   8714:  }
                   8715:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8716:    *exc = GDOME_INVALID_STATE_ERR;
                   8717:    return NULL;
                   8718:  }
                   8719:  *exc = 0;
1.2     ! paf      8720:  return ((Gdome_xml_Attr *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      8721: }
                   8722: /**
                   8723:  * gdome_a_cloneNode:
                   8724:  * @self:  Node Object ref
                   8725:  * @deep:  If true, recursively clone the subtree under the specified node;
                   8726:  *         if false, clone only the node itself (and its attributes, if it is
                   8727:  *         an Element).
                   8728:  * @exc:  Exception Object ref
                   8729:  *
                   8730:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   8731:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   8732:  * %NULL).
                   8733:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   8734:  * nodes are not supported.
                   8735:  *
                   8736:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   8737:  * supported.
                   8738:  * Returns: the duplicate node.
                   8739:  */
1.2     ! paf      8740: xmlNode *
1.1       paf      8741: gdome_a_cloneNode (GdomeAttr *self, GdomeBoolean deep, GdomeException *exc)
                   8742: {
                   8743:  if (self == NULL) {
                   8744:    *exc = GDOME_NULL_POINTER_ERR;
                   8745:    return NULL;
                   8746:  }
                   8747:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8748:    *exc = GDOME_INVALID_STATE_ERR;
                   8749:    return NULL;
                   8750:  }
                   8751:  *exc = 0;
1.2     ! paf      8752:  return ((Gdome_xml_Attr *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      8753: }
                   8754: /**
                   8755:  * gdome_a_hasAttributes:
                   8756:  * @self:  Node Object ref
                   8757:  * @exc:  Exception Object ref
                   8758:  *
                   8759:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   8760:  */
                   8761: GdomeBoolean
                   8762: gdome_a_hasAttributes (GdomeAttr *self, GdomeException *exc)
                   8763: {
                   8764:  if (self == NULL) {
                   8765:    *exc = GDOME_NULL_POINTER_ERR;
                   8766:    return FALSE;
                   8767:  }
                   8768:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8769:    *exc = GDOME_INVALID_STATE_ERR;
                   8770:    return FALSE;
                   8771:  }
                   8772:  *exc = 0;
1.2     ! paf      8773:  return ((Gdome_xml_Attr *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      8774: }
                   8775: /**
                   8776:  * gdome_a_hasChildNodes:
                   8777:  * @self:  Node Object ref
                   8778:  * @exc:  Exception Object ref
                   8779:  *
                   8780:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   8781:  */
                   8782: GdomeBoolean
                   8783: gdome_a_hasChildNodes (GdomeAttr *self, GdomeException *exc)
                   8784: {
                   8785:  if (self == NULL) {
                   8786:    *exc = GDOME_NULL_POINTER_ERR;
                   8787:    return FALSE;
                   8788:  }
                   8789:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8790:    *exc = GDOME_INVALID_STATE_ERR;
                   8791:    return FALSE;
                   8792:  }
                   8793:  *exc = 0;
1.2     ! paf      8794:  return ((Gdome_xml_Attr *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      8795: }
                   8796: /**
                   8797:  * gdome_a_insertBefore:
                   8798:  * @self:  Node Object ref
                   8799:  * @newChild:  The new node to put in the child list
                   8800:  * @refChild:  the reference node, i.e., the node before which the new node
                   8801:  *             must be inserted.
                   8802:  * @exc:  Exception Object ref
                   8803:  *
                   8804:  * Inserts the node @newChild before the existing child node @refChild. If
                   8805:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   8806:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   8807:  * in the same order, before @refChild. If the @newChild is already in the
                   8808:  * tree, it is first removed.
                   8809:  *
                   8810:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   8811:  * allow children of the type of the @newChild node, or if the node to insert is
                   8812:  * one of this node's ancestors or this node itself.
                   8813:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   8814:  * document than the one that created this node.
                   8815:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   8816:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   8817:  * Returns: the node being inserted.
                   8818:  */
1.2     ! paf      8819: xmlNode *
        !          8820: gdome_a_insertBefore (GdomeAttr *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      8821: {
                   8822:  if (self == NULL) {
                   8823:    *exc = GDOME_NULL_POINTER_ERR;
                   8824:    return NULL;
                   8825:  }
                   8826:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8827:    *exc = GDOME_INVALID_STATE_ERR;
                   8828:    return NULL;
                   8829:  }
                   8830:  *exc = 0;
1.2     ! paf      8831:  return ((Gdome_xml_Attr *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      8832: }
                   8833: /**
                   8834:  * gdome_a_isSupported:
                   8835:  * @self:  Node Object ref
                   8836:  * @feature:  The name of the feature to test.
                   8837:  * @version:  This is the version number of the feature to test. In Level 2,
                   8838:  *            version 1, this is the string "2.0". If the version is not
                   8839:  *            specified, supporting any version of the feature will cause the
                   8840:  *            method to return %TRUE.
                   8841:  * @exc:  Exception Object ref
                   8842:  *
                   8843:  * Tests whether the DOM implementation implements a specific feature and that
                   8844:  * feature is supported by this node.
                   8845:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   8846:  * otherwise.
                   8847:  */
                   8848: GdomeBoolean
                   8849: gdome_a_isSupported (GdomeAttr *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   8850: {
                   8851:  if (self == NULL) {
                   8852:    *exc = GDOME_NULL_POINTER_ERR;
                   8853:    return FALSE;
                   8854:  }
                   8855:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8856:    *exc = GDOME_INVALID_STATE_ERR;
                   8857:    return FALSE;
                   8858:  }
                   8859:  *exc = 0;
1.2     ! paf      8860:  return ((Gdome_xml_Attr *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      8861: }
                   8862: /**
                   8863:  * gdome_a_normalize:
                   8864:  * @self:  Node Object ref
                   8865:  * @exc:  Exception Object ref
                   8866:  *
                   8867:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   8868:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   8869:  * elements, comments, processing instructions, CDATA sections, and entity
                   8870:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   8871:  * nodes nor empty Text nodes.
                   8872:  */
                   8873: void
                   8874: gdome_a_normalize (GdomeAttr *self, GdomeException *exc)
                   8875: {
                   8876:  if (self == NULL) {
                   8877:    *exc = GDOME_NULL_POINTER_ERR;
                   8878:    return;
                   8879:  }
                   8880:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8881:    *exc = GDOME_INVALID_STATE_ERR;
                   8882:    return;
                   8883:  }
                   8884:  *exc = 0;
1.2     ! paf      8885:  ((Gdome_xml_Attr *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      8886: }
                   8887: /**
                   8888:  * gdome_a_removeChild:
                   8889:  * @self:  Node Object ref
                   8890:  * @oldChild:  The node being removed
                   8891:  * @exc:  Exception Object ref
                   8892:  *
                   8893:  * Removes the child node indicated by @oldChild from the list of children, and
                   8894:  * returns it.
                   8895:  *
                   8896:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   8897:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   8898:  * Returns: the node removed.
                   8899:  */
1.2     ! paf      8900: xmlNode *
        !          8901: gdome_a_removeChild (GdomeAttr *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      8902: {
                   8903:  if (self == NULL) {
                   8904:    *exc = GDOME_NULL_POINTER_ERR;
                   8905:    return NULL;
                   8906:  }
                   8907:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8908:    *exc = GDOME_INVALID_STATE_ERR;
                   8909:    return NULL;
                   8910:  }
                   8911:  *exc = 0;
1.2     ! paf      8912:  return ((Gdome_xml_Attr *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      8913: }
                   8914: /**
                   8915:  * gdome_a_replaceChild:
                   8916:  * @self:  Node Object ref
                   8917:  * @newChild:  The new node to put in the child list
                   8918:  * @oldChild:  The node being replaced in the list
                   8919:  * @exc:  Exception Object ref
                   8920:  *
                   8921:  * Replaces the child node @oldChild with @newChild in the list of children,
                   8922:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   8923:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   8924:  * inserted in the same order. If the @newChild is already in the tree, it is
                   8925:  * first removed.
                   8926:  *
                   8927:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   8928:  * not allow children of the type of the @newChild node, or if the node to put
                   8929:  * in is one of this node's ancestors or this node itself.
                   8930:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   8931:  * document than the one that created this node.
                   8932:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   8933:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   8934:  * Returns: the node replaced.
                   8935:  */
1.2     ! paf      8936: xmlNode *
        !          8937: gdome_a_replaceChild (GdomeAttr *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      8938: {
                   8939:  if (self == NULL) {
                   8940:    *exc = GDOME_NULL_POINTER_ERR;
                   8941:    return NULL;
                   8942:  }
                   8943:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8944:    *exc = GDOME_INVALID_STATE_ERR;
                   8945:    return NULL;
                   8946:  }
                   8947:  *exc = 0;
1.2     ! paf      8948:  return ((Gdome_xml_Attr *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      8949: }
                   8950: /**
                   8951:  * gdome_a_addEventListener:
                   8952:  * @self:  Node Object ref
                   8953:  * @type:  the event type for which the user is registering
                   8954:  * @listener:  the listener parameter takes an interface implemented by the
                   8955:  *             user which contains the methods to be called when the event occurs.
                   8956:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   8957:  *               capture. After initiating capture, all events of the specified
                   8958:  *               type will be dispatched to the registered EventListener before
                   8959:  *               being dispatched to any EventTargets beneath them in the tree.
                   8960:  *               Events which are bubbling upward through the tree will not
                   8961:  *               trigger an EventListener designated to use capture.
                   8962:  * @exc:  Exception Object ref
                   8963:  *
                   8964:  * This method allows the registration of event listeners on the event target.
                   8965:  * If an EventListener is added to an EventTarget while it is processing an
                   8966:  * event, it will not be triggered by the current actions but may be triggered
                   8967:  * during a later stage of event flow, such as the bubbling phase.
                   8968:  * If multiple identical EventListeners are registered on the same EventTarget
                   8969:  * with the same parameters the duplicate instances are discarded. They do not
                   8970:  * cause the EventListener to be called twice and since they are discarded
                   8971:  * they do not need to be removed with the removeEventListener method.
                   8972:  */
                   8973: void
                   8974: gdome_a_addEventListener (GdomeAttr *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   8975: {
                   8976:  if (self == NULL) {
                   8977:    *exc = GDOME_NULL_POINTER_ERR;
                   8978:    return;
                   8979:  }
                   8980:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   8981:    *exc = GDOME_INVALID_STATE_ERR;
                   8982:    return;
                   8983:  }
                   8984:  *exc = 0;
1.2     ! paf      8985:  ((Gdome_xml_Attr *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      8986: }
                   8987: /**
                   8988:  * gdome_a_removeEventListener:
                   8989:  * @self:  Node Object ref
                   8990:  * @type:  Specifies the event type of the EventListener being removed.
                   8991:  * @listener:  The EventListener parameter indicates the EventListener to be
                   8992:  *             removed.
                   8993:  * @useCapture:  Specifies whether the EventListener being removed was
                   8994:  *               registered as a capturing listener or not. If a listener was
                   8995:  *               registered twice, one with capture and one without, each must
                   8996:  *               be removed separately. Removal of a capturing listener does
                   8997:  *               not affect a non-capturing version of the same listener, and
                   8998:  *               vice versa.
                   8999:  * @exc:  Exception Object ref
                   9000:  *
                   9001:  * This method allows the removal of event listeners from the event target. If
                   9002:  * an EventListener is removed from an EventTarget while it is processing an
                   9003:  * event, it will not be triggered by the current actions. EventListeners can
                   9004:  * never be invoked after being removed. Calling removeEventListener with
                   9005:  * arguments which do not identify any currently registered EventListener on
                   9006:  * the EventTarget has no effect.
                   9007:  */
                   9008: void
                   9009: gdome_a_removeEventListener (GdomeAttr *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   9010: {
                   9011:  if (self == NULL) {
                   9012:    *exc = GDOME_NULL_POINTER_ERR;
                   9013:    return;
                   9014:  }
                   9015:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9016:    *exc = GDOME_INVALID_STATE_ERR;
                   9017:    return;
                   9018:  }
                   9019:  *exc = 0;
1.2     ! paf      9020:  ((Gdome_xml_Attr *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      9021: }
                   9022: /**
                   9023:  * gdome_a_dispatchEvent:
                   9024:  * @self:  Node Object ref
                   9025:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   9026:  *        used in processing the event.
                   9027:  * @exc:  Exception Object ref
                   9028:  *
                   9029:  * This method allows the dispatch of events into the implementations event
                   9030:  * model. Events dispatched in this manner will have the same capturing and
                   9031:  * bubbling behavior as events dispatched directly by the implementation. The
                   9032:  * target of the event is the EventTarget on which dispatchEvent is called.
                   9033:  *
                   9034:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   9035:  * specified by initializing the event before dispatchEvent was called.
                   9036:  * Specification of the Event's type as %NULL or an empty string will also
                   9037:  * trigger this exception.
                   9038:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   9039:  *          is %TRUE.
                   9040:  */
                   9041: GdomeBoolean
                   9042: gdome_a_dispatchEvent (GdomeAttr *self, GdomeEvent *evt, GdomeException *exc)
                   9043: {
                   9044:  if (self == NULL) {
                   9045:    *exc = GDOME_NULL_POINTER_ERR;
                   9046:    return FALSE;
                   9047:  }
                   9048:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9049:    *exc = GDOME_INVALID_STATE_ERR;
                   9050:    return FALSE;
                   9051:  }
                   9052:  *exc = 0;
1.2     ! paf      9053:  return ((Gdome_xml_Attr *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      9054: }
                   9055: /**
                   9056:  * gdome_a_subTreeDispatchEvent:
                   9057:  * @self:  Node Object ref
                   9058:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   9059:  *        used in processing the event.
                   9060:  * @exc:  Exception Object ref
                   9061:  *
                   9062:  * This method allows the dispatch of events into the implementations event
                   9063:  * model. Events dispatched in this manner will have the same capturing and
                   9064:  * bubbling behavior as events dispatched directly by the implementation. The
                   9065:  * target of the event is any nodes in the subtree of the EventTarget on which
                   9066:  * dispatchEvent is called.
                   9067:  *
                   9068:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   9069:  * specified by initializing the event before dispatchEvent was called.
                   9070:  * Specification of the Event's type as %NULL or an empty string will also
                   9071:  * trigger this exception.
                   9072:  */
                   9073: void
                   9074: gdome_a_subTreeDispatchEvent (GdomeAttr *self, GdomeEvent *evt, GdomeException *exc)
                   9075: {
                   9076:  if (self == NULL) {
                   9077:    *exc = GDOME_NULL_POINTER_ERR;
                   9078:    return;
                   9079:  }
                   9080:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9081:    *exc = GDOME_INVALID_STATE_ERR;
                   9082:    return;
                   9083:  }
                   9084:  *exc = 0;
1.2     ! paf      9085:  ((Gdome_xml_Attr *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      9086: }
                   9087: /**
                   9088:  * gdome_a_canAppend:
                   9089:  * @self:  Node Object ref
                   9090:  * @newChild:  The Node Object ref of the node to test
                   9091:  * @exc:  Exception Object ref
                   9092:  *
                   9093:  * Tests if a @newChild can be added in the child list of this node.
                   9094:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   9095:  */
                   9096: GdomeBoolean
1.2     ! paf      9097: gdome_a_canAppend (GdomeAttr *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      9098: {
                   9099:  if (self == NULL) {
                   9100:    *exc = GDOME_NULL_POINTER_ERR;
                   9101:    return FALSE;
                   9102:  }
                   9103:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9104:    *exc = GDOME_INVALID_STATE_ERR;
                   9105:    return FALSE;
                   9106:  }
                   9107:  *exc = 0;
1.2     ! paf      9108:  return ((Gdome_xml_Attr *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      9109: }
                   9110: 
                   9111: /******************************************************************************
                   9112:           GdomeElement interface API
                   9113:  ******************************************************************************/
                   9114: /**
                   9115:  * gdome_el_tagName:
                   9116:  * @self:  Element Objects ref
                   9117:  * @exc:  Exception Object ref
                   9118:  *
                   9119:  * Returns: the qualified name of the element.
                   9120:  */
                   9121: GdomeDOMString *
                   9122: gdome_el_tagName (GdomeElement *self, GdomeException *exc)
                   9123: {
                   9124:  if (self == NULL) {
                   9125:    *exc = GDOME_NULL_POINTER_ERR;
                   9126:    return NULL;
                   9127:  }
                   9128:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9129:    *exc = GDOME_INVALID_STATE_ERR;
                   9130:    return NULL;
                   9131:  }
                   9132:  *exc = 0;
                   9133:  return ((Gdome_xml_Element *)self)->vtab->tagName (self, exc);
                   9134: }
                   9135: /**
                   9136:  * gdome_el_getAttribute:
                   9137:  * @self:  Element Objects ref
                   9138:  * @name:  The name of attribute of which the value is wanted
                   9139:  * @exc:  Exception Object ref
                   9140:  *
                   9141:  * Retrieves an attribute value by name.
                   9142:  * Returns: the Attr value as a string, or the empty string if that attribute
                   9143:  * does not have a specified or default value.
                   9144:  */
                   9145: GdomeDOMString *
                   9146: gdome_el_getAttribute (GdomeElement *self, GdomeDOMString *name, GdomeException *exc)
                   9147: {
                   9148:  if (self == NULL) {
                   9149:    *exc = GDOME_NULL_POINTER_ERR;
                   9150:    return NULL;
                   9151:  }
                   9152:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9153:    *exc = GDOME_INVALID_STATE_ERR;
                   9154:    return NULL;
                   9155:  }
                   9156:  *exc = 0;
                   9157:  return ((Gdome_xml_Element *)self)->vtab->getAttribute (self, name, exc);
                   9158: }
                   9159: /**
                   9160:  * gdome_el_getAttributeNS:
                   9161:  * @self:  Element Objects ref
                   9162:  * @namespaceURI:  The namespaceURI of attribute to retrieve
                   9163:  * @localName:  The localName of the attribute to retrieve
                   9164:  * @exc:  Exception Object ref
                   9165:  *
                   9166:  * Retrieves an attribute value by local name and namespace URI.
                   9167:  * Returns: the Attr value as a string, or the empty string if that attribute
                   9168:  * does not have a specified or default value.
                   9169:  */
                   9170: GdomeDOMString *
                   9171: gdome_el_getAttributeNS (GdomeElement *self, GdomeDOMString *namespaceURI, GdomeDOMString *localName, GdomeException *exc)
                   9172: {
                   9173:  if (self == NULL) {
                   9174:    *exc = GDOME_NULL_POINTER_ERR;
                   9175:    return NULL;
                   9176:  }
                   9177:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9178:    *exc = GDOME_INVALID_STATE_ERR;
                   9179:    return NULL;
                   9180:  }
                   9181:  *exc = 0;
                   9182:  return ((Gdome_xml_Element *)self)->vtab->getAttributeNS (self, namespaceURI, localName, exc);
                   9183: }
                   9184: /**
                   9185:  * gdome_el_getAttributeNode:
                   9186:  * @self:  Element Objects ref
                   9187:  * @name:  The name of the attribute to retreive
                   9188:  * @exc:  Exception Object ref
                   9189:  *
                   9190:  * Retrieves an attribute node by name.
                   9191:  * To retrieve an attribute node by qualified name and namespace URI, use the
                   9192:  * gdome_el_getAttributeNodeNS() method.
                   9193:  * Returns: the Attr node with the specified @name or %NULL if there is no such
                   9194:  * attribute.
                   9195:  */
                   9196: GdomeAttr *
                   9197: gdome_el_getAttributeNode (GdomeElement *self, GdomeDOMString *name, GdomeException *exc)
                   9198: {
                   9199:  if (self == NULL) {
                   9200:    *exc = GDOME_NULL_POINTER_ERR;
                   9201:    return NULL;
                   9202:  }
                   9203:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9204:    *exc = GDOME_INVALID_STATE_ERR;
                   9205:    return NULL;
                   9206:  }
                   9207:  *exc = 0;
                   9208:  return ((Gdome_xml_Element *)self)->vtab->getAttributeNode (self, name, exc);
                   9209: }
                   9210: /**
                   9211:  * gdome_el_getAttributeNodeNS:
                   9212:  * @self:  Element Objects ref
                   9213:  * @namespaceURI:  The namespace URI of the attribute to retrieve.
                   9214:  * @localName:  The local name of the attribute to retrieve.
                   9215:  * @exc:  Exception Object ref
                   9216:  *
                   9217:  * Retrieves an Attr node by local name and namespace URI.
                   9218:  * Returns: the Attr node with the specified attribute local name and
                   9219:  * namespace URI or %NULL if there is no such attribute.
                   9220:  */
                   9221: GdomeAttr *
                   9222: gdome_el_getAttributeNodeNS (GdomeElement *self, GdomeDOMString *namespaceURI, GdomeDOMString *localName, GdomeException *exc)
                   9223: {
                   9224:  if (self == NULL) {
                   9225:    *exc = GDOME_NULL_POINTER_ERR;
                   9226:    return NULL;
                   9227:  }
                   9228:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9229:    *exc = GDOME_INVALID_STATE_ERR;
                   9230:    return NULL;
                   9231:  }
                   9232:  *exc = 0;
                   9233:  return ((Gdome_xml_Element *)self)->vtab->getAttributeNodeNS (self, namespaceURI, localName, exc);
                   9234: }
                   9235: /**
                   9236:  * gdome_el_getElementsByTagName:
                   9237:  * @self:  Element Objects ref
                   9238:  * @name:  The name of the tag to match on. The special value * matches all
                   9239:  *         tags.
                   9240:  * @exc:  Exception Object ref
                   9241:  *
                   9242:  * Returns: a NodeList of all descendant elements with a given tag name, in the
                   9243:  * order in which they are encountered in a preorder traversal of this Element
                   9244:  * tree.
                   9245:  */
                   9246: GdomeNodeList *
                   9247: gdome_el_getElementsByTagName (GdomeElement *self, GdomeDOMString *name, GdomeException *exc)
                   9248: {
                   9249:  if (self == NULL) {
                   9250:    *exc = GDOME_NULL_POINTER_ERR;
                   9251:    return NULL;
                   9252:  }
                   9253:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9254:    *exc = GDOME_INVALID_STATE_ERR;
                   9255:    return NULL;
                   9256:  }
                   9257:  *exc = 0;
                   9258:  return ((Gdome_xml_Element *)self)->vtab->getElementsByTagName (self, name, exc);
                   9259: }
                   9260: /**
                   9261:  * gdome_el_getElementsByTagNameNS:
                   9262:  * @self:  Element Objects ref
                   9263:  * @namespaceURI:  The namespace URI of the elements to match on. The special
                   9264:  *              value * matches all namespaces.
                   9265:  * @localName:  The local name of the elements to match on. The special value
                   9266:  *              * matches all local names.
                   9267:  * @exc:  Exception Object ref
                   9268:  *
                   9269:  * Returns: a NodeList of all the descendant elements with a given local name
                   9270:  * and namespace URI in the order in which they are encountered in a preorder
                   9271:  * traversal of this Element tree.
                   9272:  */
                   9273: GdomeNodeList *
                   9274: gdome_el_getElementsByTagNameNS (GdomeElement *self, GdomeDOMString *namespaceURI, GdomeDOMString *localName, GdomeException *exc)
                   9275: {
                   9276:  if (self == NULL) {
                   9277:    *exc = GDOME_NULL_POINTER_ERR;
                   9278:    return NULL;
                   9279:  }
                   9280:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9281:    *exc = GDOME_INVALID_STATE_ERR;
                   9282:    return NULL;
                   9283:  }
                   9284:  *exc = 0;
                   9285:  return ((Gdome_xml_Element *)self)->vtab->getElementsByTagNameNS (self, namespaceURI, localName, exc);
                   9286: }
                   9287: /**
                   9288:  * gdome_el_hasAttribute:
                   9289:  * @self:  Element Objects ref
                   9290:  * @name:  The name of the attribute to look for.
                   9291:  * @exc:  Exception Object ref
                   9292:  *
                   9293:  * Returns: %TRUE when an attribute with a given name is specified on this
                   9294:  * element or has a default value, %FALSE otherwise.
                   9295:  */
                   9296: GdomeBoolean
                   9297: gdome_el_hasAttribute (GdomeElement *self, GdomeDOMString *name, GdomeException *exc)
                   9298: {
                   9299:  if (self == NULL) {
                   9300:    *exc = GDOME_NULL_POINTER_ERR;
                   9301:    return FALSE;
                   9302:  }
                   9303:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9304:    *exc = GDOME_INVALID_STATE_ERR;
                   9305:    return FALSE;
                   9306:  }
                   9307:  *exc = 0;
                   9308:  return ((Gdome_xml_Element *)self)->vtab->hasAttribute (self, name, exc);
                   9309: }
                   9310: /**
                   9311:  * gdome_el_hasAttributeNS:
                   9312:  * @self:  Element Objects ref
                   9313:  * @namespaceURI:  The namespaceURI of the attribute to look for.
                   9314:  * @localName:  The localName of the attribute to look for.
                   9315:  * @exc:  Exception Object ref
                   9316:  *
                   9317:  * Returns: %TRUE when an attribute with a given local name and namespace URI
                   9318:  * is specified on this element or has a default value, %FALSE otherwise.
                   9319:  */
                   9320: GdomeBoolean
                   9321: gdome_el_hasAttributeNS (GdomeElement *self, GdomeDOMString *namespaceURI, GdomeDOMString *localName, GdomeException *exc)
                   9322: {
                   9323:  if (self == NULL) {
                   9324:    *exc = GDOME_NULL_POINTER_ERR;
                   9325:    return FALSE;
                   9326:  }
                   9327:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9328:    *exc = GDOME_INVALID_STATE_ERR;
                   9329:    return FALSE;
                   9330:  }
                   9331:  *exc = 0;
                   9332:  return ((Gdome_xml_Element *)self)->vtab->hasAttributeNS (self, namespaceURI, localName, exc);
                   9333: }
                   9334: /**
                   9335:  * gdome_el_removeAttribute:
                   9336:  * @self:  Element Objects ref
                   9337:  * @name:  The name of the attribute to remove
                   9338:  * @exc:  Exception Object ref
                   9339:  *
                   9340:  * Removes an attribute by name. If the removed attribute is known to have a
                   9341:  * default value, an attribute immediately appears containing the default
                   9342:  * value as well as the corresponding namespace URI, local name, and prefix
                   9343:  * when applicable.
                   9344:  * To remove an attribute by local name and namespace URI, use the
                   9345:  * gdome_el_removeAttributeNS() function.
                   9346:  *
                   9347:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
                   9348:  */
                   9349: void
                   9350: gdome_el_removeAttribute (GdomeElement *self, GdomeDOMString *name, GdomeException *exc)
                   9351: {
                   9352:  if (self == NULL) {
                   9353:    *exc = GDOME_NULL_POINTER_ERR;
                   9354:    return;
                   9355:  }
                   9356:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9357:    *exc = GDOME_INVALID_STATE_ERR;
                   9358:    return;
                   9359:  }
                   9360:  *exc = 0;
                   9361:  ((Gdome_xml_Element *)self)->vtab->removeAttribute (self, name, exc);
                   9362: }
                   9363: /**
                   9364:  * gdome_el_removeAttributeNS:
                   9365:  * @self:  Element Objects ref
                   9366:  * @namespaceURI:  The namespaceURI of attribute to remove
                   9367:  * @localName:  The localName of the attribute to remove
                   9368:  * @exc:  Exception Object ref
                   9369:  *
                   9370:  * Removes an attribute by local name and namespace URI. If the removed
                   9371:  * attribute has a default value it is immediately replaced. The replacing
                   9372:  * attribute has the same namespace URI and local name, as well as the
                   9373:  * original prefix.
                   9374:  *
                   9375:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
                   9376:  */
                   9377: void
                   9378: gdome_el_removeAttributeNS (GdomeElement *self, GdomeDOMString *namespaceURI, GdomeDOMString *localName, GdomeException *exc)
                   9379: {
                   9380:  if (self == NULL) {
                   9381:    *exc = GDOME_NULL_POINTER_ERR;
                   9382:    return;
                   9383:  }
                   9384:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9385:    *exc = GDOME_INVALID_STATE_ERR;
                   9386:    return;
                   9387:  }
                   9388:  *exc = 0;
                   9389:  ((Gdome_xml_Element *)self)->vtab->removeAttributeNS (self, namespaceURI, localName, exc);
                   9390: }
                   9391: /**
                   9392:  * gdome_el_removeAttributeNode:
                   9393:  * @self:  Element Objects ref
                   9394:  * @oldAttr:  The Attr node to remove from the attribute list
                   9395:  * @exc:  Exception Object ref
                   9396:  *
                   9397:  * Removes the specified attribute node. If the removed Attr has a default
                   9398:  * value it is immediately replaced. The replacing attribute has the same
                   9399:  * namespace URI and local name, as well as the original prefix, when
                   9400:  * applicable.
                   9401:  *
                   9402:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
                   9403:  * %GDOME_NOT_FOUND_ERR: Raised if @oldAttr is not an attribute of the element.
                   9404:  * Returns: the Attr node that was removed.
                   9405:  */
                   9406: GdomeAttr *
                   9407: gdome_el_removeAttributeNode (GdomeElement *self, GdomeAttr *oldAttr, GdomeException *exc)
                   9408: {
                   9409:  if (self == NULL) {
                   9410:    *exc = GDOME_NULL_POINTER_ERR;
                   9411:    return NULL;
                   9412:  }
                   9413:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9414:    *exc = GDOME_INVALID_STATE_ERR;
                   9415:    return NULL;
                   9416:  }
                   9417:  *exc = 0;
                   9418:  return ((Gdome_xml_Element *)self)->vtab->removeAttributeNode (self, oldAttr, exc);
                   9419: }
                   9420: /**
                   9421:  * gdome_el_setAttribute:
                   9422:  * @self:  Element Objects ref
                   9423:  * @name:  The name of the attribute to create or alter
                   9424:  * @value: Value to set in string form
                   9425:  * @exc:  Exception Object ref
                   9426:  *
                   9427:  * Adds a new attribute. If an attribute with that name is already present in
                   9428:  * the element, its value is changed to be that of the value parameter.
                   9429:  *
                   9430:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
                   9431:  */
                   9432: void
                   9433: gdome_el_setAttribute (GdomeElement *self, GdomeDOMString *name, GdomeDOMString *value, GdomeException *exc)
                   9434: {
                   9435:  if (self == NULL) {
                   9436:    *exc = GDOME_NULL_POINTER_ERR;
                   9437:    return;
                   9438:  }
                   9439:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9440:    *exc = GDOME_INVALID_STATE_ERR;
                   9441:    return;
                   9442:  }
                   9443:  *exc = 0;
                   9444:  ((Gdome_xml_Element *)self)->vtab->setAttribute (self, name, value, exc);
                   9445: }
                   9446: /**
                   9447:  * gdome_el_setAttributeNS:
                   9448:  * @self:  Element Objects ref
                   9449:  * @namespaceURI:  The namespace URI of attribute to create or alter
                   9450:  * @qualifiedName:  The qualifiedName of the attribute to create or alter
                   9451:  * @value: Value to set in string form
                   9452:  * @exc:  Exception Object ref
                   9453:  *
                   9454:  * Adds a new attribute. If an attribute with the same @namespaceURI and
                   9455:  * localName is already present in the element, its value is changed to be
                   9456:  * that of the value parameter.
                   9457:  *
                   9458:  * %GDOME_NAMESPACE_ERR: Raised if the @qualifiedName is malformed, if the
                   9459:  * @qualifiedName has a prefix and the @namespaceURI is %NULL, if the
                   9460:  * @qualifiedName has a prefix that is "xml" and the @namespaceURI is different
                   9461:  * from "http://www.w3.org/XML/1998/namespace", or if the @qualifiedName is
                   9462:  * "xmlns" and the namespaceURI is different from "http://www.w3.org/2000/xmlns/".
                   9463:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
                   9464:  */
                   9465: void
                   9466: gdome_el_setAttributeNS (GdomeElement *self, GdomeDOMString *namespaceURI, GdomeDOMString *qualifiedName, GdomeDOMString *value, GdomeException *exc)
                   9467: {
                   9468:  if (self == NULL) {
                   9469:    *exc = GDOME_NULL_POINTER_ERR;
                   9470:    return;
                   9471:  }
                   9472:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9473:    *exc = GDOME_INVALID_STATE_ERR;
                   9474:    return;
                   9475:  }
                   9476:  *exc = 0;
                   9477:  ((Gdome_xml_Element *)self)->vtab->setAttributeNS (self, namespaceURI, qualifiedName, value, exc);
                   9478: }
                   9479: /**
                   9480:  * gdome_el_setAttributeNode:
                   9481:  * @self:  Element Object ref
                   9482:  * @newAttr:  The Attr node to add to the attribute list
                   9483:  * @exc:  Exception Object ref
                   9484:  *
                   9485:  * Adds a new attribute node. If an attribute with that name is already present
                   9486:  * in the element, it is replaced by the new one.
                   9487:  * To add a new attribute node with a qualified name and namespace URI, use the
                   9488:  * gdome_el_setAttributeNodeNS() method.
                   9489:  *
                   9490:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newAttr was created from a different
                   9491:  * document than the one that created the element.
                   9492:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
                   9493:  * %GDOME_INUSE_ATTRIBUTE_ERR: Raised if @newAttr is already an attribute of
                   9494:  * another Element object. The DOM user must explicitly clone Attr nodes to
                   9495:  * re-use them in other elements.
                   9496:  * Returns: if the @newAttr attribute replaces an existing attribute, the
                   9497:  * replaced Attr node is returned, otherwise %NULL is returned.
                   9498:  */
                   9499: GdomeAttr *
                   9500: gdome_el_setAttributeNode (GdomeElement *self, GdomeAttr *newAttr, GdomeException *exc)
                   9501: {
                   9502:  if (self == NULL) {
                   9503:    *exc = GDOME_NULL_POINTER_ERR;
                   9504:    return NULL;
                   9505:  }
                   9506:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9507:    *exc = GDOME_INVALID_STATE_ERR;
                   9508:    return NULL;
                   9509:  }
                   9510:  *exc = 0;
                   9511:  return ((Gdome_xml_Element *)self)->vtab->setAttributeNode (self, newAttr, exc);
                   9512: }
                   9513: /**
                   9514:  * gdome_el_setAttributeNodeNS:
                   9515:  * @self:  Element Object ref
                   9516:  * @newAttr:  The Attr node to add to the attribute list
                   9517:  * @exc:  Exception Object ref
                   9518:  *
                   9519:  * Adds a new attribute. If an attribute with that local name and that
                   9520:  * namespace URI is already present in the element, it is replaced by the new
                   9521:  * one.
                   9522:  *
                   9523:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newAttr was created from a different
                   9524:  * document than the one that created the element.
                   9525:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
                   9526:  * %GDOME_INUSE_ATTRIBUTE_ERR: Raised if @newAttr is already an attribute of
                   9527:  * another Element object. The DOM user must explicitly clone Attr nodes to
                   9528:  * re-use them in other elements.
                   9529:  * Returns: if the @newAttr attribute replaces an existing attribute with the
                   9530:  * same local name and namespace URI, the replaced Attr node is returned,
                   9531:  * otherwise %NULL is returned.
                   9532:  */
                   9533: GdomeAttr *
                   9534: gdome_el_setAttributeNodeNS (GdomeElement *self, GdomeAttr *newAttr, GdomeException *exc)
                   9535: {
                   9536:  if (self == NULL) {
                   9537:    *exc = GDOME_NULL_POINTER_ERR;
                   9538:    return NULL;
                   9539:  }
                   9540:  if (((Gdome_xml_Element *)self)->n == NULL) {
                   9541:    *exc = GDOME_INVALID_STATE_ERR;
                   9542:    return NULL;
                   9543:  }
                   9544:  *exc = 0;
                   9545:  return ((Gdome_xml_Element *)self)->vtab->setAttributeNodeNS (self, newAttr, exc);
                   9546: }
                   9547: /**
                   9548:  * gdome_el_attributes:
                   9549:  * @self:  Node Object ref
                   9550:  * @exc:  Exception Object ref
                   9551:  *
                   9552:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   9553:  * Element) or %NULL otherwise.
                   9554:  */
                   9555: GdomeNamedNodeMap *
                   9556: gdome_el_attributes (GdomeElement *self, GdomeException *exc)
                   9557: {
                   9558:  if (self == NULL) {
                   9559:    *exc = GDOME_NULL_POINTER_ERR;
                   9560:    return NULL;
                   9561:  }
                   9562:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9563:    *exc = GDOME_INVALID_STATE_ERR;
                   9564:    return NULL;
                   9565:  }
                   9566:  *exc = 0;
1.2     ! paf      9567:  return ((Gdome_xml_Element *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      9568: }
                   9569: /**
                   9570:  * gdome_el_childNodes:
                   9571:  * @self:  Node Object ref
                   9572:  * @exc:  Exception Object ref
                   9573:  *
                   9574:  * Returns: a NodeList that contains all children of this node. If there are no
                   9575:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   9576:  * not considered to be children of element nodes - use gdome_n_attributes to
                   9577:  * obtain the attributes.
                   9578:  */
                   9579: GdomeNodeList *
                   9580: gdome_el_childNodes (GdomeElement *self, GdomeException *exc)
                   9581: {
                   9582:  if (self == NULL) {
                   9583:    *exc = GDOME_NULL_POINTER_ERR;
                   9584:    return NULL;
                   9585:  }
                   9586:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9587:    *exc = GDOME_INVALID_STATE_ERR;
                   9588:    return NULL;
                   9589:  }
                   9590:  *exc = 0;
1.2     ! paf      9591:  return ((Gdome_xml_Element *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      9592: }
                   9593: /**
                   9594:  * gdome_el_firstChild:
                   9595:  * @self:  Node Object ref
                   9596:  * @exc:  Exception Object ref
                   9597:  * 
                   9598:  * Returns: the first child of this node. If there is no such node,
                   9599:  * this returns %NULL.
                   9600:  */
1.2     ! paf      9601: xmlNode *
1.1       paf      9602: gdome_el_firstChild (GdomeElement *self, GdomeException *exc)
                   9603: {
                   9604:  if (self == NULL) {
                   9605:    *exc = GDOME_NULL_POINTER_ERR;
                   9606:    return NULL;
                   9607:  }
                   9608:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9609:    *exc = GDOME_INVALID_STATE_ERR;
                   9610:    return NULL;
                   9611:  }
                   9612:  *exc = 0;
1.2     ! paf      9613:  return ((Gdome_xml_Element *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      9614: }
                   9615: /**
                   9616:  * gdome_el_lastChild:
                   9617:  * @self:  Node Object ref
                   9618:  * @exc:  Exception Object ref
                   9619:  *
                   9620:  * Returns: the last child of this node. If there is no such node,
                   9621:  * this returns %NULL.
                   9622:  */
1.2     ! paf      9623: xmlNode *
1.1       paf      9624: gdome_el_lastChild (GdomeElement *self, GdomeException *exc)
                   9625: {
                   9626:  if (self == NULL) {
                   9627:    *exc = GDOME_NULL_POINTER_ERR;
                   9628:    return NULL;
                   9629:  }
                   9630:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9631:    *exc = GDOME_INVALID_STATE_ERR;
                   9632:    return NULL;
                   9633:  }
                   9634:  *exc = 0;
1.2     ! paf      9635:  return ((Gdome_xml_Element *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      9636: }
                   9637: /**
                   9638:  * gdome_el_localName:
                   9639:  * @self:  Node Objects ref
                   9640:  * @exc:  Exception Object ref
                   9641:  *
                   9642:  * Returns: the local part of the qualified name of this node.
                   9643:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   9644:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   9645:  * always %NULL.
                   9646:  */
                   9647: GdomeDOMString *
                   9648: gdome_el_localName (GdomeElement *self, GdomeException *exc)
                   9649: {
                   9650:  if (self == NULL) {
                   9651:    *exc = GDOME_NULL_POINTER_ERR;
                   9652:    return NULL;
                   9653:  }
                   9654:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9655:    *exc = GDOME_INVALID_STATE_ERR;
                   9656:    return NULL;
                   9657:  }
                   9658:  *exc = 0;
1.2     ! paf      9659:  return ((Gdome_xml_Element *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      9660: }
                   9661: /**
                   9662:  * gdome_el_namespaceURI:
                   9663:  * @self:  Node Objects ref
                   9664:  * @exc:  Exception Object ref
                   9665:  *
                   9666:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   9667:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   9668:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   9669:  * always %NULL.
                   9670:  */
                   9671: GdomeDOMString *
                   9672: gdome_el_namespaceURI (GdomeElement *self, GdomeException *exc)
                   9673: {
                   9674:  if (self == NULL) {
                   9675:    *exc = GDOME_NULL_POINTER_ERR;
                   9676:    return NULL;
                   9677:  }
                   9678:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9679:    *exc = GDOME_INVALID_STATE_ERR;
                   9680:    return NULL;
                   9681:  }
                   9682:  *exc = 0;
1.2     ! paf      9683:  return ((Gdome_xml_Element *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      9684: }
                   9685: /**
                   9686:  * gdome_el_nextSibling:
                   9687:  * @self:  Node Object ref
                   9688:  * @exc:  Exception Object ref
                   9689:  *
                   9690:  * Returns: the node immediately following this node. If there is no such
                   9691:  * node, this returns %NULL.
                   9692:  */
1.2     ! paf      9693: xmlNode *
1.1       paf      9694: gdome_el_nextSibling (GdomeElement *self, GdomeException *exc)
                   9695: {
                   9696:  if (self == NULL) {
                   9697:    *exc = GDOME_NULL_POINTER_ERR;
                   9698:    return NULL;
                   9699:  }
                   9700:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9701:    *exc = GDOME_INVALID_STATE_ERR;
                   9702:    return NULL;
                   9703:  }
                   9704:  *exc = 0;
1.2     ! paf      9705:  return ((Gdome_xml_Element *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      9706: }
                   9707: /**
                   9708:  * gdome_el_nodeName:
                   9709:  * @self:  Node Object ref
                   9710:  * @exc:  Exception Object ref
                   9711:  *
                   9712:  * Returns: the name of this node, depending on its type.
                   9713:  */
                   9714: GdomeDOMString *
                   9715: gdome_el_nodeName (GdomeElement *self, GdomeException *exc)
                   9716: {
                   9717:  if (self == NULL) {
                   9718:    *exc = GDOME_NULL_POINTER_ERR;
                   9719:    return NULL;
                   9720:  }
                   9721:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9722:    *exc = GDOME_INVALID_STATE_ERR;
                   9723:    return NULL;
                   9724:  }
                   9725:  *exc = 0;
1.2     ! paf      9726:  return ((Gdome_xml_Element *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      9727: }
                   9728: /**
                   9729:  * gdome_el_nodeType:
                   9730:  * @self:  Node Object ref
                   9731:  * @exc:  Exception Object ref
                   9732:  *
                   9733:  * Returns: an integer bigger than %0 representing the type of the underlying
                   9734:  * object or %0 on error.
                   9735:  */
                   9736: unsigned short
                   9737: gdome_el_nodeType (GdomeElement *self, GdomeException *exc)
                   9738: {
                   9739:  if (self == NULL) {
                   9740:    *exc = GDOME_NULL_POINTER_ERR;
                   9741:    return 0;
                   9742:  }
                   9743:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9744:    *exc = GDOME_INVALID_STATE_ERR;
                   9745:    return 0;
                   9746:  }
                   9747:  *exc = 0;
1.2     ! paf      9748:  return ((Gdome_xml_Element *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      9749: }
                   9750: /**
                   9751:  * gdome_el_nodeValue:
                   9752:  * @self:  Node Object ref
                   9753:  * @exc:  Exception Object ref
                   9754:  *
                   9755:  * Returns: the value of this node, depending on its type.
                   9756:  */
                   9757: GdomeDOMString *
                   9758: gdome_el_nodeValue (GdomeElement *self, GdomeException *exc)
                   9759: {
                   9760:  if (self == NULL) {
                   9761:    *exc = GDOME_NULL_POINTER_ERR;
                   9762:    return NULL;
                   9763:  }
                   9764:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9765:    *exc = GDOME_INVALID_STATE_ERR;
                   9766:    return NULL;
                   9767:  }
                   9768:  *exc = 0;
1.2     ! paf      9769:  return ((Gdome_xml_Element *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      9770: }
                   9771: /**
                   9772:  * gdome_el_set_nodeValue:
                   9773:  * @self:  Node Object ref
                   9774:  * @nodeValue:  The new value for this node.
                   9775:  * @exc:  Exception Object ref
                   9776:  *
                   9777:  * Sets The value of this node, depending on its type.
                   9778:  *
                   9779:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   9780:  */
                   9781: void
                   9782: gdome_el_set_nodeValue (GdomeElement *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   9783: {
                   9784:  if (self == NULL) {
                   9785:    *exc = GDOME_NULL_POINTER_ERR;
                   9786:    return;
                   9787:  }
                   9788:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9789:    *exc = GDOME_INVALID_STATE_ERR;
                   9790:    return;
                   9791:  }
                   9792:  *exc = 0;
1.2     ! paf      9793:  ((Gdome_xml_Element *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      9794: }
                   9795: /**
                   9796:  * gdome_el_ownerDocument:
                   9797:  * @self:  Node Objects ref
                   9798:  * @exc:  Exception Object ref
                   9799:  *
                   9800:  * Returns: the documment object associated with this node. This is also the
                   9801:  * Document object used to create new nodes. When this node is a Document or a
                   9802:  * DocumentType which is not used with any Document yet, this is %NULL.
                   9803:  */
                   9804: GdomeDocument *
                   9805: gdome_el_ownerDocument (GdomeElement *self, GdomeException *exc)
                   9806: {
                   9807:  if (self == NULL) {
                   9808:    *exc = GDOME_NULL_POINTER_ERR;
                   9809:    return NULL;
                   9810:  }
                   9811:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9812:    *exc = GDOME_INVALID_STATE_ERR;
                   9813:    return NULL;
                   9814:  }
                   9815:  *exc = 0;
1.2     ! paf      9816:  return ((Gdome_xml_Element *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      9817: }
                   9818: /**
                   9819:  * gdome_el_parentNode:
                   9820:  * @self: Node Object ref
                   9821:  * @exc: Exception Object ref
                   9822:  *
                   9823:  * Returns: the parent of this node. All nodes, except Attr,
                   9824:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   9825:  * if a node has just been created and not yet added to the tree, or if it has
                   9826:  * been removed from the tree, this is %NULL.
                   9827:  */
1.2     ! paf      9828: xmlNode *
1.1       paf      9829: gdome_el_parentNode (GdomeElement *self, GdomeException *exc)
                   9830: {
                   9831:  if (self == NULL) {
                   9832:    *exc = GDOME_NULL_POINTER_ERR;
                   9833:    return NULL;
                   9834:  }
                   9835:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9836:    *exc = GDOME_INVALID_STATE_ERR;
                   9837:    return NULL;
                   9838:  }
                   9839:  *exc = 0;
1.2     ! paf      9840:  return ((Gdome_xml_Element *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      9841: }
                   9842: /**
                   9843:  * gdome_el_prefix:
                   9844:  * @self:  Node Objects ref
                   9845:  * @exc:  Exception Object ref
                   9846:  *
                   9847:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   9848:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   9849:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   9850:  * always %NULL.
                   9851:  */
                   9852: GdomeDOMString *
                   9853: gdome_el_prefix (GdomeElement *self, GdomeException *exc)
                   9854: {
                   9855:  if (self == NULL) {
                   9856:    *exc = GDOME_NULL_POINTER_ERR;
                   9857:    return NULL;
                   9858:  }
                   9859:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9860:    *exc = GDOME_INVALID_STATE_ERR;
                   9861:    return NULL;
                   9862:  }
                   9863:  *exc = 0;
1.2     ! paf      9864:  return ((Gdome_xml_Element *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      9865: }
                   9866: /**
                   9867:  * gdome_el_set_prefix:
                   9868:  * @self:  Node Object ref
                   9869:  * @prefix:  The new prefix for this node.
                   9870:  * @exc:  Exception Object ref
                   9871:  *
                   9872:  * Sets a new nemaspace prefix for this node.
                   9873:  *
                   9874:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   9875:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   9876:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   9877:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   9878:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   9879:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   9880:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   9881:  * an attribute and the qualifiedName of this node is "xmlns".
                   9882:  */
                   9883: void
                   9884: gdome_el_set_prefix (GdomeElement *self, GdomeDOMString *prefix, GdomeException *exc)
                   9885: {
                   9886:  if (self == NULL) {
                   9887:    *exc = GDOME_NULL_POINTER_ERR;
                   9888:    return;
                   9889:  }
                   9890:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9891:    *exc = GDOME_INVALID_STATE_ERR;
                   9892:    return;
                   9893:  }
                   9894:  *exc = 0;
1.2     ! paf      9895:  ((Gdome_xml_Element *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      9896: }
                   9897: /**
                   9898:  * gdome_el_previousSibling:
                   9899:  * @self:  Node Object ref
                   9900:  * @exc:  Exception Object ref
                   9901:  *
                   9902:  * Returns: the node immediately preceding this node. If there is no such
                   9903:  * node, this returns %NULL.
                   9904:  */
1.2     ! paf      9905: xmlNode *
1.1       paf      9906: gdome_el_previousSibling (GdomeElement *self, GdomeException *exc)
                   9907: {
                   9908:  if (self == NULL) {
                   9909:    *exc = GDOME_NULL_POINTER_ERR;
                   9910:    return NULL;
                   9911:  }
                   9912:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9913:    *exc = GDOME_INVALID_STATE_ERR;
                   9914:    return NULL;
                   9915:  }
                   9916:  *exc = 0;
1.2     ! paf      9917:  return ((Gdome_xml_Element *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      9918: }
                   9919: /**
                   9920:  * gdome_el_ref:
                   9921:  * @self:  Node Object ref
                   9922:  * @exc:  Exception Object ref
                   9923:  *
                   9924:  * Increase the reference count of the specified Node.
                   9925:  */
                   9926: void
                   9927: gdome_el_ref (GdomeElement *self, GdomeException *exc)
                   9928: {
                   9929:  if (self == NULL) {
                   9930:    *exc = GDOME_NULL_POINTER_ERR;
                   9931:    return;
                   9932:  }
                   9933:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9934:    *exc = GDOME_INVALID_STATE_ERR;
                   9935:    return;
                   9936:  }
                   9937:  *exc = 0;
1.2     ! paf      9938:  ((Gdome_xml_Element *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      9939: }
                   9940: /**
                   9941:  * gdome_el_unref:
                   9942:  * @self:  Node Object ref
                   9943:  * @exc:  Exception Object ref
                   9944:  *
                   9945:  * Decrease the reference count of the specified Node. Free the Node structure
                   9946:  * if the Node will have zero reference.
                   9947:  */
                   9948: void
                   9949: gdome_el_unref (GdomeElement *self, GdomeException *exc)
                   9950: {
                   9951:  if (self == NULL) {
                   9952:    *exc = GDOME_NULL_POINTER_ERR;
                   9953:    return;
                   9954:  }
                   9955:  *exc = 0;
                   9956:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9957:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   9958:      ((Gdome_xml_Node *)self)->refcnt--;
                   9959: 
                   9960:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   9961: #ifdef DEBUG_REFCNT
                   9962:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   9963: #endif
                   9964:      g_free (self);
                   9965:    }
                   9966:    return;
                   9967:  }
1.2     ! paf      9968:  ((Gdome_xml_Element *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      9969: }
                   9970: /**
                   9971:  * gdome_el_query_interface:
                   9972:  * @self:  Node Object ref
                   9973:  * @interface:  interface needed
                   9974:  * @exc:  Exception Object ref
                   9975:  *
                   9976:  * Returns: a reference to this object that implements the @interface needed,
                   9977:  *          or %NULL if the @interface is not supported by this Object.
                   9978:  */
                   9979: gpointer
                   9980: gdome_el_query_interface (GdomeElement *self, const char *interface, GdomeException *exc)
                   9981: {
                   9982:  if (self == NULL) {
                   9983:    *exc = GDOME_NULL_POINTER_ERR;
                   9984:    return NULL;
                   9985:  }
                   9986:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   9987:    *exc = GDOME_INVALID_STATE_ERR;
                   9988:    return NULL;
                   9989:  }
                   9990:  *exc = 0;
1.2     ! paf      9991:  return ((Gdome_xml_Element *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      9992: }
                   9993: /**
                   9994:  * gdome_el_appendChild:
                   9995:  * @self:  Node Object ref
                   9996:  * @newChild:  The node to add
                   9997:  * @exc:  Exception Object ref
                   9998:  *
                   9999:  * Adds the node @newChild to the end of the list of children of this node.
                   10000:  * If the @newChild is already in the tree, it is first removed. If it is a
                   10001:  * DocumentFragment node, the entire contents of the document fragment are
                   10002:  * moved into the child list of this node
                   10003:  *
                   10004:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   10005:  * allow children of the type of the @newChild node, or if the node to append is
                   10006:  * one of this node's ancestors or this node itself.
                   10007:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   10008:  * document than the one that created this node.
                   10009:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   10010:  * Returns: the node added.
                   10011:  */
1.2     ! paf      10012: xmlNode *
        !          10013: gdome_el_appendChild (GdomeElement *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      10014: {
                   10015:  if (self == NULL) {
                   10016:    *exc = GDOME_NULL_POINTER_ERR;
                   10017:    return NULL;
                   10018:  }
                   10019:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10020:    *exc = GDOME_INVALID_STATE_ERR;
                   10021:    return NULL;
                   10022:  }
                   10023:  *exc = 0;
1.2     ! paf      10024:  return ((Gdome_xml_Element *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      10025: }
                   10026: /**
                   10027:  * gdome_el_cloneNode:
                   10028:  * @self:  Node Object ref
                   10029:  * @deep:  If true, recursively clone the subtree under the specified node;
                   10030:  *         if false, clone only the node itself (and its attributes, if it is
                   10031:  *         an Element).
                   10032:  * @exc:  Exception Object ref
                   10033:  *
                   10034:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   10035:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   10036:  * %NULL).
                   10037:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   10038:  * nodes are not supported.
                   10039:  *
                   10040:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   10041:  * supported.
                   10042:  * Returns: the duplicate node.
                   10043:  */
1.2     ! paf      10044: xmlNode *
1.1       paf      10045: gdome_el_cloneNode (GdomeElement *self, GdomeBoolean deep, GdomeException *exc)
                   10046: {
                   10047:  if (self == NULL) {
                   10048:    *exc = GDOME_NULL_POINTER_ERR;
                   10049:    return NULL;
                   10050:  }
                   10051:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10052:    *exc = GDOME_INVALID_STATE_ERR;
                   10053:    return NULL;
                   10054:  }
                   10055:  *exc = 0;
1.2     ! paf      10056:  return ((Gdome_xml_Element *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      10057: }
                   10058: /**
                   10059:  * gdome_el_hasAttributes:
                   10060:  * @self:  Node Object ref
                   10061:  * @exc:  Exception Object ref
                   10062:  *
                   10063:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   10064:  */
                   10065: GdomeBoolean
                   10066: gdome_el_hasAttributes (GdomeElement *self, GdomeException *exc)
                   10067: {
                   10068:  if (self == NULL) {
                   10069:    *exc = GDOME_NULL_POINTER_ERR;
                   10070:    return FALSE;
                   10071:  }
                   10072:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10073:    *exc = GDOME_INVALID_STATE_ERR;
                   10074:    return FALSE;
                   10075:  }
                   10076:  *exc = 0;
1.2     ! paf      10077:  return ((Gdome_xml_Element *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      10078: }
                   10079: /**
                   10080:  * gdome_el_hasChildNodes:
                   10081:  * @self:  Node Object ref
                   10082:  * @exc:  Exception Object ref
                   10083:  *
                   10084:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   10085:  */
                   10086: GdomeBoolean
                   10087: gdome_el_hasChildNodes (GdomeElement *self, GdomeException *exc)
                   10088: {
                   10089:  if (self == NULL) {
                   10090:    *exc = GDOME_NULL_POINTER_ERR;
                   10091:    return FALSE;
                   10092:  }
                   10093:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10094:    *exc = GDOME_INVALID_STATE_ERR;
                   10095:    return FALSE;
                   10096:  }
                   10097:  *exc = 0;
1.2     ! paf      10098:  return ((Gdome_xml_Element *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      10099: }
                   10100: /**
                   10101:  * gdome_el_insertBefore:
                   10102:  * @self:  Node Object ref
                   10103:  * @newChild:  The new node to put in the child list
                   10104:  * @refChild:  the reference node, i.e., the node before which the new node
                   10105:  *             must be inserted.
                   10106:  * @exc:  Exception Object ref
                   10107:  *
                   10108:  * Inserts the node @newChild before the existing child node @refChild. If
                   10109:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   10110:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   10111:  * in the same order, before @refChild. If the @newChild is already in the
                   10112:  * tree, it is first removed.
                   10113:  *
                   10114:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   10115:  * allow children of the type of the @newChild node, or if the node to insert is
                   10116:  * one of this node's ancestors or this node itself.
                   10117:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   10118:  * document than the one that created this node.
                   10119:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   10120:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   10121:  * Returns: the node being inserted.
                   10122:  */
1.2     ! paf      10123: xmlNode *
        !          10124: gdome_el_insertBefore (GdomeElement *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      10125: {
                   10126:  if (self == NULL) {
                   10127:    *exc = GDOME_NULL_POINTER_ERR;
                   10128:    return NULL;
                   10129:  }
                   10130:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10131:    *exc = GDOME_INVALID_STATE_ERR;
                   10132:    return NULL;
                   10133:  }
                   10134:  *exc = 0;
1.2     ! paf      10135:  return ((Gdome_xml_Element *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      10136: }
                   10137: /**
                   10138:  * gdome_el_isSupported:
                   10139:  * @self:  Node Object ref
                   10140:  * @feature:  The name of the feature to test.
                   10141:  * @version:  This is the version number of the feature to test. In Level 2,
                   10142:  *            version 1, this is the string "2.0". If the version is not
                   10143:  *            specified, supporting any version of the feature will cause the
                   10144:  *            method to return %TRUE.
                   10145:  * @exc:  Exception Object ref
                   10146:  *
                   10147:  * Tests whether the DOM implementation implements a specific feature and that
                   10148:  * feature is supported by this node.
                   10149:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   10150:  * otherwise.
                   10151:  */
                   10152: GdomeBoolean
                   10153: gdome_el_isSupported (GdomeElement *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   10154: {
                   10155:  if (self == NULL) {
                   10156:    *exc = GDOME_NULL_POINTER_ERR;
                   10157:    return FALSE;
                   10158:  }
                   10159:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10160:    *exc = GDOME_INVALID_STATE_ERR;
                   10161:    return FALSE;
                   10162:  }
                   10163:  *exc = 0;
1.2     ! paf      10164:  return ((Gdome_xml_Element *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      10165: }
                   10166: /**
                   10167:  * gdome_el_normalize:
                   10168:  * @self:  Node Object ref
                   10169:  * @exc:  Exception Object ref
                   10170:  *
                   10171:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   10172:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   10173:  * elements, comments, processing instructions, CDATA sections, and entity
                   10174:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   10175:  * nodes nor empty Text nodes.
                   10176:  */
                   10177: void
                   10178: gdome_el_normalize (GdomeElement *self, GdomeException *exc)
                   10179: {
                   10180:  if (self == NULL) {
                   10181:    *exc = GDOME_NULL_POINTER_ERR;
                   10182:    return;
                   10183:  }
                   10184:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10185:    *exc = GDOME_INVALID_STATE_ERR;
                   10186:    return;
                   10187:  }
                   10188:  *exc = 0;
1.2     ! paf      10189:  ((Gdome_xml_Element *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      10190: }
                   10191: /**
                   10192:  * gdome_el_removeChild:
                   10193:  * @self:  Node Object ref
                   10194:  * @oldChild:  The node being removed
                   10195:  * @exc:  Exception Object ref
                   10196:  *
                   10197:  * Removes the child node indicated by @oldChild from the list of children, and
                   10198:  * returns it.
                   10199:  *
                   10200:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   10201:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   10202:  * Returns: the node removed.
                   10203:  */
1.2     ! paf      10204: xmlNode *
        !          10205: gdome_el_removeChild (GdomeElement *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      10206: {
                   10207:  if (self == NULL) {
                   10208:    *exc = GDOME_NULL_POINTER_ERR;
                   10209:    return NULL;
                   10210:  }
                   10211:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10212:    *exc = GDOME_INVALID_STATE_ERR;
                   10213:    return NULL;
                   10214:  }
                   10215:  *exc = 0;
1.2     ! paf      10216:  return ((Gdome_xml_Element *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      10217: }
                   10218: /**
                   10219:  * gdome_el_replaceChild:
                   10220:  * @self:  Node Object ref
                   10221:  * @newChild:  The new node to put in the child list
                   10222:  * @oldChild:  The node being replaced in the list
                   10223:  * @exc:  Exception Object ref
                   10224:  *
                   10225:  * Replaces the child node @oldChild with @newChild in the list of children,
                   10226:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   10227:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   10228:  * inserted in the same order. If the @newChild is already in the tree, it is
                   10229:  * first removed.
                   10230:  *
                   10231:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   10232:  * not allow children of the type of the @newChild node, or if the node to put
                   10233:  * in is one of this node's ancestors or this node itself.
                   10234:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   10235:  * document than the one that created this node.
                   10236:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   10237:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   10238:  * Returns: the node replaced.
                   10239:  */
1.2     ! paf      10240: xmlNode *
        !          10241: gdome_el_replaceChild (GdomeElement *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      10242: {
                   10243:  if (self == NULL) {
                   10244:    *exc = GDOME_NULL_POINTER_ERR;
                   10245:    return NULL;
                   10246:  }
                   10247:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10248:    *exc = GDOME_INVALID_STATE_ERR;
                   10249:    return NULL;
                   10250:  }
                   10251:  *exc = 0;
1.2     ! paf      10252:  return ((Gdome_xml_Element *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      10253: }
                   10254: /**
                   10255:  * gdome_el_addEventListener:
                   10256:  * @self:  Node Object ref
                   10257:  * @type:  the event type for which the user is registering
                   10258:  * @listener:  the listener parameter takes an interface implemented by the
                   10259:  *             user which contains the methods to be called when the event occurs.
                   10260:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   10261:  *               capture. After initiating capture, all events of the specified
                   10262:  *               type will be dispatched to the registered EventListener before
                   10263:  *               being dispatched to any EventTargets beneath them in the tree.
                   10264:  *               Events which are bubbling upward through the tree will not
                   10265:  *               trigger an EventListener designated to use capture.
                   10266:  * @exc:  Exception Object ref
                   10267:  *
                   10268:  * This method allows the registration of event listeners on the event target.
                   10269:  * If an EventListener is added to an EventTarget while it is processing an
                   10270:  * event, it will not be triggered by the current actions but may be triggered
                   10271:  * during a later stage of event flow, such as the bubbling phase.
                   10272:  * If multiple identical EventListeners are registered on the same EventTarget
                   10273:  * with the same parameters the duplicate instances are discarded. They do not
                   10274:  * cause the EventListener to be called twice and since they are discarded
                   10275:  * they do not need to be removed with the removeEventListener method.
                   10276:  */
                   10277: void
                   10278: gdome_el_addEventListener (GdomeElement *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   10279: {
                   10280:  if (self == NULL) {
                   10281:    *exc = GDOME_NULL_POINTER_ERR;
                   10282:    return;
                   10283:  }
                   10284:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10285:    *exc = GDOME_INVALID_STATE_ERR;
                   10286:    return;
                   10287:  }
                   10288:  *exc = 0;
1.2     ! paf      10289:  ((Gdome_xml_Element *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      10290: }
                   10291: /**
                   10292:  * gdome_el_removeEventListener:
                   10293:  * @self:  Node Object ref
                   10294:  * @type:  Specifies the event type of the EventListener being removed.
                   10295:  * @listener:  The EventListener parameter indicates the EventListener to be
                   10296:  *             removed.
                   10297:  * @useCapture:  Specifies whether the EventListener being removed was
                   10298:  *               registered as a capturing listener or not. If a listener was
                   10299:  *               registered twice, one with capture and one without, each must
                   10300:  *               be removed separately. Removal of a capturing listener does
                   10301:  *               not affect a non-capturing version of the same listener, and
                   10302:  *               vice versa.
                   10303:  * @exc:  Exception Object ref
                   10304:  *
                   10305:  * This method allows the removal of event listeners from the event target. If
                   10306:  * an EventListener is removed from an EventTarget while it is processing an
                   10307:  * event, it will not be triggered by the current actions. EventListeners can
                   10308:  * never be invoked after being removed. Calling removeEventListener with
                   10309:  * arguments which do not identify any currently registered EventListener on
                   10310:  * the EventTarget has no effect.
                   10311:  */
                   10312: void
                   10313: gdome_el_removeEventListener (GdomeElement *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   10314: {
                   10315:  if (self == NULL) {
                   10316:    *exc = GDOME_NULL_POINTER_ERR;
                   10317:    return;
                   10318:  }
                   10319:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10320:    *exc = GDOME_INVALID_STATE_ERR;
                   10321:    return;
                   10322:  }
                   10323:  *exc = 0;
1.2     ! paf      10324:  ((Gdome_xml_Element *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      10325: }
                   10326: /**
                   10327:  * gdome_el_dispatchEvent:
                   10328:  * @self:  Node Object ref
                   10329:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   10330:  *        used in processing the event.
                   10331:  * @exc:  Exception Object ref
                   10332:  *
                   10333:  * This method allows the dispatch of events into the implementations event
                   10334:  * model. Events dispatched in this manner will have the same capturing and
                   10335:  * bubbling behavior as events dispatched directly by the implementation. The
                   10336:  * target of the event is the EventTarget on which dispatchEvent is called.
                   10337:  *
                   10338:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   10339:  * specified by initializing the event before dispatchEvent was called.
                   10340:  * Specification of the Event's type as %NULL or an empty string will also
                   10341:  * trigger this exception.
                   10342:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   10343:  *          is %TRUE.
                   10344:  */
                   10345: GdomeBoolean
                   10346: gdome_el_dispatchEvent (GdomeElement *self, GdomeEvent *evt, GdomeException *exc)
                   10347: {
                   10348:  if (self == NULL) {
                   10349:    *exc = GDOME_NULL_POINTER_ERR;
                   10350:    return FALSE;
                   10351:  }
                   10352:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10353:    *exc = GDOME_INVALID_STATE_ERR;
                   10354:    return FALSE;
                   10355:  }
                   10356:  *exc = 0;
1.2     ! paf      10357:  return ((Gdome_xml_Element *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      10358: }
                   10359: /**
                   10360:  * gdome_el_subTreeDispatchEvent:
                   10361:  * @self:  Node Object ref
                   10362:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   10363:  *        used in processing the event.
                   10364:  * @exc:  Exception Object ref
                   10365:  *
                   10366:  * This method allows the dispatch of events into the implementations event
                   10367:  * model. Events dispatched in this manner will have the same capturing and
                   10368:  * bubbling behavior as events dispatched directly by the implementation. The
                   10369:  * target of the event is any nodes in the subtree of the EventTarget on which
                   10370:  * dispatchEvent is called.
                   10371:  *
                   10372:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   10373:  * specified by initializing the event before dispatchEvent was called.
                   10374:  * Specification of the Event's type as %NULL or an empty string will also
                   10375:  * trigger this exception.
                   10376:  */
                   10377: void
                   10378: gdome_el_subTreeDispatchEvent (GdomeElement *self, GdomeEvent *evt, GdomeException *exc)
                   10379: {
                   10380:  if (self == NULL) {
                   10381:    *exc = GDOME_NULL_POINTER_ERR;
                   10382:    return;
                   10383:  }
                   10384:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10385:    *exc = GDOME_INVALID_STATE_ERR;
                   10386:    return;
                   10387:  }
                   10388:  *exc = 0;
1.2     ! paf      10389:  ((Gdome_xml_Element *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      10390: }
                   10391: /**
                   10392:  * gdome_el_canAppend:
                   10393:  * @self:  Node Object ref
                   10394:  * @newChild:  The Node Object ref of the node to test
                   10395:  * @exc:  Exception Object ref
                   10396:  *
                   10397:  * Tests if a @newChild can be added in the child list of this node.
                   10398:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   10399:  */
                   10400: GdomeBoolean
1.2     ! paf      10401: gdome_el_canAppend (GdomeElement *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      10402: {
                   10403:  if (self == NULL) {
                   10404:    *exc = GDOME_NULL_POINTER_ERR;
                   10405:    return FALSE;
                   10406:  }
                   10407:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10408:    *exc = GDOME_INVALID_STATE_ERR;
                   10409:    return FALSE;
                   10410:  }
                   10411:  *exc = 0;
1.2     ! paf      10412:  return ((Gdome_xml_Element *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      10413: }
                   10414: 
                   10415: /******************************************************************************
                   10416:           GdomeDocumentType interface API
                   10417:  ******************************************************************************/
                   10418: /**
                   10419:  * gdome_dt_entities:
                   10420:  * @self:  DocumentType Object ref
                   10421:  * @exc:  Exception Object ref
                   10422:  *
                   10423:  * Returns: a NamedNodeMap containing the general entities, both external and
                   10424:  * internal, declared in the DTD. Parameter entities are not contained.
                   10425:  * Duplicates are discarded.
                   10426:  */
                   10427: GdomeNamedNodeMap *
                   10428: gdome_dt_entities (GdomeDocumentType *self, GdomeException *exc)
                   10429: {
                   10430:  if (self == NULL) {
                   10431:    *exc = GDOME_NULL_POINTER_ERR;
                   10432:    return NULL;
                   10433:  }
                   10434:  if (((Gdome_xml_DocumentType *)self)->n == NULL) {
                   10435:    *exc = GDOME_INVALID_STATE_ERR;
                   10436:    return NULL;
                   10437:  }
                   10438:  *exc = 0;
                   10439:  return ((Gdome_xml_DocumentType *)self)->vtab->entities (self, exc);
                   10440: }
                   10441: /**
                   10442:  * gdome_dt_internalSubset:
                   10443:  * @self:  DocumentType Object ref
                   10444:  * @exc:  Exception Object ref
                   10445:  *
                   10446:  * Returns: The internal subset as a string, or %NULL if there is none or on
                   10447:  * error.
                   10448:  */
                   10449: GdomeDOMString *
                   10450: gdome_dt_internalSubset (GdomeDocumentType *self, GdomeException *exc)
                   10451: {
                   10452:  if (self == NULL) {
                   10453:    *exc = GDOME_NULL_POINTER_ERR;
                   10454:    return NULL;
                   10455:  }
                   10456:  if (((Gdome_xml_DocumentType *)self)->n == NULL) {
                   10457:    *exc = GDOME_INVALID_STATE_ERR;
                   10458:    return NULL;
                   10459:  }
                   10460:  *exc = 0;
                   10461:  return ((Gdome_xml_DocumentType *)self)->vtab->internalSubset (self, exc);
                   10462: }
                   10463: /**
                   10464:  * gdome_dt_name:
                   10465:  * @self:  DocumentType Object ref
                   10466:  * @exc:  Exception Object ref
                   10467:  *
                   10468:  * Returns: the name of DTD; i.e., the name immediately following the %DOCTYPE
                   10469:  * keyword.
                   10470:  */
                   10471: GdomeDOMString *
                   10472: gdome_dt_name (GdomeDocumentType *self, GdomeException *exc)
                   10473: {
                   10474:  if (self == NULL) {
                   10475:    *exc = GDOME_NULL_POINTER_ERR;
                   10476:    return NULL;
                   10477:  }
                   10478:  if (((Gdome_xml_DocumentType *)self)->n == NULL) {
                   10479:    *exc = GDOME_INVALID_STATE_ERR;
                   10480:    return NULL;
                   10481:  }
                   10482:  *exc = 0;
                   10483:  return ((Gdome_xml_DocumentType *)self)->vtab->name (self, exc);
                   10484: }
                   10485: /**
                   10486:  * gdome_dt_notations:
                   10487:  * @self:  DocumentType Object ref
                   10488:  * @exc:  Exception Object ref
                   10489:  *
                   10490:  * Returns: a NamedNodeMap containing the notations declared in the DTD.
                   10491:  * Duplicates are discarded. Every node in this map also implements the
                   10492:  * Notation interface.
                   10493:  */
                   10494: GdomeNamedNodeMap *
                   10495: gdome_dt_notations (GdomeDocumentType *self, GdomeException *exc)
                   10496: {
                   10497:  if (self == NULL) {
                   10498:    *exc = GDOME_NULL_POINTER_ERR;
                   10499:    return NULL;
                   10500:  }
                   10501:  if (((Gdome_xml_DocumentType *)self)->n == NULL) {
                   10502:    *exc = GDOME_INVALID_STATE_ERR;
                   10503:    return NULL;
                   10504:  }
                   10505:  *exc = 0;
                   10506:  return ((Gdome_xml_DocumentType *)self)->vtab->notations (self, exc);
                   10507: }
                   10508: /**
                   10509:  * gdome_dt_publicId:
                   10510:  * @self:  DocumentType Object ref
                   10511:  * @exc:  Exception Object ref
                   10512:  *
                   10513:  * Returns: the public identifier of the external subset.
                   10514:  */
                   10515: GdomeDOMString *
                   10516: gdome_dt_publicId (GdomeDocumentType *self, GdomeException *exc)
                   10517: {
                   10518:  if (self == NULL) {
                   10519:    *exc = GDOME_NULL_POINTER_ERR;
                   10520:    return NULL;
                   10521:  }
                   10522:  if (((Gdome_xml_DocumentType *)self)->n == NULL) {
                   10523:    *exc = GDOME_INVALID_STATE_ERR;
                   10524:    return NULL;
                   10525:  }
                   10526:  *exc = 0;
                   10527:  return ((Gdome_xml_DocumentType *)self)->vtab->publicId (self, exc);
                   10528: }
                   10529: /**
                   10530:  * gdome_dt_systemId:
                   10531:  * @self:  DocumentType Object ref
                   10532:  * @exc:  Exception Object ref
                   10533:  *
                   10534:  * Returns: the public identifier of the external subset.
                   10535:  */
                   10536: GdomeDOMString *
                   10537: gdome_dt_systemId (GdomeDocumentType *self, GdomeException *exc)
                   10538: {
                   10539:  if (self == NULL) {
                   10540:    *exc = GDOME_NULL_POINTER_ERR;
                   10541:    return NULL;
                   10542:  }
                   10543:  if (((Gdome_xml_DocumentType *)self)->n == NULL) {
                   10544:    *exc = GDOME_INVALID_STATE_ERR;
                   10545:    return NULL;
                   10546:  }
                   10547:  *exc = 0;
                   10548:  return ((Gdome_xml_DocumentType *)self)->vtab->systemId (self, exc);
                   10549: }
                   10550: /**
                   10551:  * gdome_dt_attributes:
                   10552:  * @self:  Node Object ref
                   10553:  * @exc:  Exception Object ref
                   10554:  *
                   10555:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   10556:  * Element) or %NULL otherwise.
                   10557:  */
                   10558: GdomeNamedNodeMap *
                   10559: gdome_dt_attributes (GdomeDocumentType *self, GdomeException *exc)
                   10560: {
                   10561:  if (self == NULL) {
                   10562:    *exc = GDOME_NULL_POINTER_ERR;
                   10563:    return NULL;
                   10564:  }
                   10565:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10566:    *exc = GDOME_INVALID_STATE_ERR;
                   10567:    return NULL;
                   10568:  }
                   10569:  *exc = 0;
1.2     ! paf      10570:  return ((Gdome_xml_DocumentType *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      10571: }
                   10572: /**
                   10573:  * gdome_dt_childNodes:
                   10574:  * @self:  Node Object ref
                   10575:  * @exc:  Exception Object ref
                   10576:  *
                   10577:  * Returns: a NodeList that contains all children of this node. If there are no
                   10578:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   10579:  * not considered to be children of element nodes - use gdome_n_attributes to
                   10580:  * obtain the attributes.
                   10581:  */
                   10582: GdomeNodeList *
                   10583: gdome_dt_childNodes (GdomeDocumentType *self, GdomeException *exc)
                   10584: {
                   10585:  if (self == NULL) {
                   10586:    *exc = GDOME_NULL_POINTER_ERR;
                   10587:    return NULL;
                   10588:  }
                   10589:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10590:    *exc = GDOME_INVALID_STATE_ERR;
                   10591:    return NULL;
                   10592:  }
                   10593:  *exc = 0;
1.2     ! paf      10594:  return ((Gdome_xml_DocumentType *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      10595: }
                   10596: /**
                   10597:  * gdome_dt_firstChild:
                   10598:  * @self:  Node Object ref
                   10599:  * @exc:  Exception Object ref
                   10600:  * 
                   10601:  * Returns: the first child of this node. If there is no such node,
                   10602:  * this returns %NULL.
                   10603:  */
1.2     ! paf      10604: xmlNode *
1.1       paf      10605: gdome_dt_firstChild (GdomeDocumentType *self, GdomeException *exc)
                   10606: {
                   10607:  if (self == NULL) {
                   10608:    *exc = GDOME_NULL_POINTER_ERR;
                   10609:    return NULL;
                   10610:  }
                   10611:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10612:    *exc = GDOME_INVALID_STATE_ERR;
                   10613:    return NULL;
                   10614:  }
                   10615:  *exc = 0;
1.2     ! paf      10616:  return ((Gdome_xml_DocumentType *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      10617: }
                   10618: /**
                   10619:  * gdome_dt_lastChild:
                   10620:  * @self:  Node Object ref
                   10621:  * @exc:  Exception Object ref
                   10622:  *
                   10623:  * Returns: the last child of this node. If there is no such node,
                   10624:  * this returns %NULL.
                   10625:  */
1.2     ! paf      10626: xmlNode *
1.1       paf      10627: gdome_dt_lastChild (GdomeDocumentType *self, GdomeException *exc)
                   10628: {
                   10629:  if (self == NULL) {
                   10630:    *exc = GDOME_NULL_POINTER_ERR;
                   10631:    return NULL;
                   10632:  }
                   10633:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10634:    *exc = GDOME_INVALID_STATE_ERR;
                   10635:    return NULL;
                   10636:  }
                   10637:  *exc = 0;
1.2     ! paf      10638:  return ((Gdome_xml_DocumentType *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      10639: }
                   10640: /**
                   10641:  * gdome_dt_localName:
                   10642:  * @self:  Node Objects ref
                   10643:  * @exc:  Exception Object ref
                   10644:  *
                   10645:  * Returns: the local part of the qualified name of this node.
                   10646:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   10647:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   10648:  * always %NULL.
                   10649:  */
                   10650: GdomeDOMString *
                   10651: gdome_dt_localName (GdomeDocumentType *self, GdomeException *exc)
                   10652: {
                   10653:  if (self == NULL) {
                   10654:    *exc = GDOME_NULL_POINTER_ERR;
                   10655:    return NULL;
                   10656:  }
                   10657:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10658:    *exc = GDOME_INVALID_STATE_ERR;
                   10659:    return NULL;
                   10660:  }
                   10661:  *exc = 0;
1.2     ! paf      10662:  return ((Gdome_xml_DocumentType *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      10663: }
                   10664: /**
                   10665:  * gdome_dt_namespaceURI:
                   10666:  * @self:  Node Objects ref
                   10667:  * @exc:  Exception Object ref
                   10668:  *
                   10669:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   10670:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   10671:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   10672:  * always %NULL.
                   10673:  */
                   10674: GdomeDOMString *
                   10675: gdome_dt_namespaceURI (GdomeDocumentType *self, GdomeException *exc)
                   10676: {
                   10677:  if (self == NULL) {
                   10678:    *exc = GDOME_NULL_POINTER_ERR;
                   10679:    return NULL;
                   10680:  }
                   10681:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10682:    *exc = GDOME_INVALID_STATE_ERR;
                   10683:    return NULL;
                   10684:  }
                   10685:  *exc = 0;
1.2     ! paf      10686:  return ((Gdome_xml_DocumentType *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      10687: }
                   10688: /**
                   10689:  * gdome_dt_nextSibling:
                   10690:  * @self:  Node Object ref
                   10691:  * @exc:  Exception Object ref
                   10692:  *
                   10693:  * Returns: the node immediately following this node. If there is no such
                   10694:  * node, this returns %NULL.
                   10695:  */
1.2     ! paf      10696: xmlNode *
1.1       paf      10697: gdome_dt_nextSibling (GdomeDocumentType *self, GdomeException *exc)
                   10698: {
                   10699:  if (self == NULL) {
                   10700:    *exc = GDOME_NULL_POINTER_ERR;
                   10701:    return NULL;
                   10702:  }
                   10703:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10704:    *exc = GDOME_INVALID_STATE_ERR;
                   10705:    return NULL;
                   10706:  }
                   10707:  *exc = 0;
1.2     ! paf      10708:  return ((Gdome_xml_DocumentType *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      10709: }
                   10710: /**
                   10711:  * gdome_dt_nodeName:
                   10712:  * @self:  Node Object ref
                   10713:  * @exc:  Exception Object ref
                   10714:  *
                   10715:  * Returns: the name of this node, depending on its type.
                   10716:  */
                   10717: GdomeDOMString *
                   10718: gdome_dt_nodeName (GdomeDocumentType *self, GdomeException *exc)
                   10719: {
                   10720:  if (self == NULL) {
                   10721:    *exc = GDOME_NULL_POINTER_ERR;
                   10722:    return NULL;
                   10723:  }
                   10724:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10725:    *exc = GDOME_INVALID_STATE_ERR;
                   10726:    return NULL;
                   10727:  }
                   10728:  *exc = 0;
1.2     ! paf      10729:  return ((Gdome_xml_DocumentType *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      10730: }
                   10731: /**
                   10732:  * gdome_dt_nodeType:
                   10733:  * @self:  Node Object ref
                   10734:  * @exc:  Exception Object ref
                   10735:  *
                   10736:  * Returns: an integer bigger than %0 representing the type of the underlying
                   10737:  * object or %0 on error.
                   10738:  */
                   10739: unsigned short
                   10740: gdome_dt_nodeType (GdomeDocumentType *self, GdomeException *exc)
                   10741: {
                   10742:  if (self == NULL) {
                   10743:    *exc = GDOME_NULL_POINTER_ERR;
                   10744:    return 0;
                   10745:  }
                   10746:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10747:    *exc = GDOME_INVALID_STATE_ERR;
                   10748:    return 0;
                   10749:  }
                   10750:  *exc = 0;
1.2     ! paf      10751:  return ((Gdome_xml_DocumentType *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      10752: }
                   10753: /**
                   10754:  * gdome_dt_nodeValue:
                   10755:  * @self:  Node Object ref
                   10756:  * @exc:  Exception Object ref
                   10757:  *
                   10758:  * Returns: the value of this node, depending on its type.
                   10759:  */
                   10760: GdomeDOMString *
                   10761: gdome_dt_nodeValue (GdomeDocumentType *self, GdomeException *exc)
                   10762: {
                   10763:  if (self == NULL) {
                   10764:    *exc = GDOME_NULL_POINTER_ERR;
                   10765:    return NULL;
                   10766:  }
                   10767:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10768:    *exc = GDOME_INVALID_STATE_ERR;
                   10769:    return NULL;
                   10770:  }
                   10771:  *exc = 0;
1.2     ! paf      10772:  return ((Gdome_xml_DocumentType *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      10773: }
                   10774: /**
                   10775:  * gdome_dt_set_nodeValue:
                   10776:  * @self:  Node Object ref
                   10777:  * @nodeValue:  The new value for this node.
                   10778:  * @exc:  Exception Object ref
                   10779:  *
                   10780:  * Sets The value of this node, depending on its type.
                   10781:  *
                   10782:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   10783:  */
                   10784: void
                   10785: gdome_dt_set_nodeValue (GdomeDocumentType *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   10786: {
                   10787:  if (self == NULL) {
                   10788:    *exc = GDOME_NULL_POINTER_ERR;
                   10789:    return;
                   10790:  }
                   10791:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10792:    *exc = GDOME_INVALID_STATE_ERR;
                   10793:    return;
                   10794:  }
                   10795:  *exc = 0;
1.2     ! paf      10796:  ((Gdome_xml_DocumentType *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      10797: }
                   10798: /**
                   10799:  * gdome_dt_ownerDocument:
                   10800:  * @self:  Node Objects ref
                   10801:  * @exc:  Exception Object ref
                   10802:  *
                   10803:  * Returns: the documment object associated with this node. This is also the
                   10804:  * Document object used to create new nodes. When this node is a Document or a
                   10805:  * DocumentType which is not used with any Document yet, this is %NULL.
                   10806:  */
                   10807: GdomeDocument *
                   10808: gdome_dt_ownerDocument (GdomeDocumentType *self, GdomeException *exc)
                   10809: {
                   10810:  if (self == NULL) {
                   10811:    *exc = GDOME_NULL_POINTER_ERR;
                   10812:    return NULL;
                   10813:  }
                   10814:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10815:    *exc = GDOME_INVALID_STATE_ERR;
                   10816:    return NULL;
                   10817:  }
                   10818:  *exc = 0;
1.2     ! paf      10819:  return ((Gdome_xml_DocumentType *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      10820: }
                   10821: /**
                   10822:  * gdome_dt_parentNode:
                   10823:  * @self: Node Object ref
                   10824:  * @exc: Exception Object ref
                   10825:  *
                   10826:  * Returns: the parent of this node. All nodes, except Attr,
                   10827:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   10828:  * if a node has just been created and not yet added to the tree, or if it has
                   10829:  * been removed from the tree, this is %NULL.
                   10830:  */
1.2     ! paf      10831: xmlNode *
1.1       paf      10832: gdome_dt_parentNode (GdomeDocumentType *self, GdomeException *exc)
                   10833: {
                   10834:  if (self == NULL) {
                   10835:    *exc = GDOME_NULL_POINTER_ERR;
                   10836:    return NULL;
                   10837:  }
                   10838:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10839:    *exc = GDOME_INVALID_STATE_ERR;
                   10840:    return NULL;
                   10841:  }
                   10842:  *exc = 0;
1.2     ! paf      10843:  return ((Gdome_xml_DocumentType *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      10844: }
                   10845: /**
                   10846:  * gdome_dt_prefix:
                   10847:  * @self:  Node Objects ref
                   10848:  * @exc:  Exception Object ref
                   10849:  *
                   10850:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   10851:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   10852:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   10853:  * always %NULL.
                   10854:  */
                   10855: GdomeDOMString *
                   10856: gdome_dt_prefix (GdomeDocumentType *self, GdomeException *exc)
                   10857: {
                   10858:  if (self == NULL) {
                   10859:    *exc = GDOME_NULL_POINTER_ERR;
                   10860:    return NULL;
                   10861:  }
                   10862:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10863:    *exc = GDOME_INVALID_STATE_ERR;
                   10864:    return NULL;
                   10865:  }
                   10866:  *exc = 0;
1.2     ! paf      10867:  return ((Gdome_xml_DocumentType *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      10868: }
                   10869: /**
                   10870:  * gdome_dt_set_prefix:
                   10871:  * @self:  Node Object ref
                   10872:  * @prefix:  The new prefix for this node.
                   10873:  * @exc:  Exception Object ref
                   10874:  *
                   10875:  * Sets a new nemaspace prefix for this node.
                   10876:  *
                   10877:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   10878:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   10879:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   10880:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   10881:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   10882:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   10883:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   10884:  * an attribute and the qualifiedName of this node is "xmlns".
                   10885:  */
                   10886: void
                   10887: gdome_dt_set_prefix (GdomeDocumentType *self, GdomeDOMString *prefix, GdomeException *exc)
                   10888: {
                   10889:  if (self == NULL) {
                   10890:    *exc = GDOME_NULL_POINTER_ERR;
                   10891:    return;
                   10892:  }
                   10893:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10894:    *exc = GDOME_INVALID_STATE_ERR;
                   10895:    return;
                   10896:  }
                   10897:  *exc = 0;
1.2     ! paf      10898:  ((Gdome_xml_DocumentType *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      10899: }
                   10900: /**
                   10901:  * gdome_dt_previousSibling:
                   10902:  * @self:  Node Object ref
                   10903:  * @exc:  Exception Object ref
                   10904:  *
                   10905:  * Returns: the node immediately preceding this node. If there is no such
                   10906:  * node, this returns %NULL.
                   10907:  */
1.2     ! paf      10908: xmlNode *
1.1       paf      10909: gdome_dt_previousSibling (GdomeDocumentType *self, GdomeException *exc)
                   10910: {
                   10911:  if (self == NULL) {
                   10912:    *exc = GDOME_NULL_POINTER_ERR;
                   10913:    return NULL;
                   10914:  }
                   10915:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10916:    *exc = GDOME_INVALID_STATE_ERR;
                   10917:    return NULL;
                   10918:  }
                   10919:  *exc = 0;
1.2     ! paf      10920:  return ((Gdome_xml_DocumentType *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      10921: }
                   10922: /**
                   10923:  * gdome_dt_ref:
                   10924:  * @self:  Node Object ref
                   10925:  * @exc:  Exception Object ref
                   10926:  *
                   10927:  * Increase the reference count of the specified Node.
                   10928:  */
                   10929: void
                   10930: gdome_dt_ref (GdomeDocumentType *self, GdomeException *exc)
                   10931: {
                   10932:  if (self == NULL) {
                   10933:    *exc = GDOME_NULL_POINTER_ERR;
                   10934:    return;
                   10935:  }
                   10936:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10937:    *exc = GDOME_INVALID_STATE_ERR;
                   10938:    return;
                   10939:  }
                   10940:  *exc = 0;
1.2     ! paf      10941:  ((Gdome_xml_DocumentType *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      10942: }
                   10943: /**
                   10944:  * gdome_dt_unref:
                   10945:  * @self:  Node Object ref
                   10946:  * @exc:  Exception Object ref
                   10947:  *
                   10948:  * Decrease the reference count of the specified Node. Free the Node structure
                   10949:  * if the Node will have zero reference.
                   10950:  */
                   10951: void
                   10952: gdome_dt_unref (GdomeDocumentType *self, GdomeException *exc)
                   10953: {
                   10954:  if (self == NULL) {
                   10955:    *exc = GDOME_NULL_POINTER_ERR;
                   10956:    return;
                   10957:  }
                   10958:  *exc = 0;
                   10959:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10960:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   10961:      ((Gdome_xml_Node *)self)->refcnt--;
                   10962: 
                   10963:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   10964: #ifdef DEBUG_REFCNT
                   10965:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   10966: #endif
                   10967:      g_free (self);
                   10968:    }
                   10969:    return;
                   10970:  }
1.2     ! paf      10971:  ((Gdome_xml_DocumentType *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      10972: }
                   10973: /**
                   10974:  * gdome_dt_query_interface:
                   10975:  * @self:  Node Object ref
                   10976:  * @interface:  interface needed
                   10977:  * @exc:  Exception Object ref
                   10978:  *
                   10979:  * Returns: a reference to this object that implements the @interface needed,
                   10980:  *          or %NULL if the @interface is not supported by this Object.
                   10981:  */
                   10982: gpointer
                   10983: gdome_dt_query_interface (GdomeDocumentType *self, const char *interface, GdomeException *exc)
                   10984: {
                   10985:  if (self == NULL) {
                   10986:    *exc = GDOME_NULL_POINTER_ERR;
                   10987:    return NULL;
                   10988:  }
                   10989:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   10990:    *exc = GDOME_INVALID_STATE_ERR;
                   10991:    return NULL;
                   10992:  }
                   10993:  *exc = 0;
1.2     ! paf      10994:  return ((Gdome_xml_DocumentType *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      10995: }
                   10996: /**
                   10997:  * gdome_dt_appendChild:
                   10998:  * @self:  Node Object ref
                   10999:  * @newChild:  The node to add
                   11000:  * @exc:  Exception Object ref
                   11001:  *
                   11002:  * Adds the node @newChild to the end of the list of children of this node.
                   11003:  * If the @newChild is already in the tree, it is first removed. If it is a
                   11004:  * DocumentFragment node, the entire contents of the document fragment are
                   11005:  * moved into the child list of this node
                   11006:  *
                   11007:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   11008:  * allow children of the type of the @newChild node, or if the node to append is
                   11009:  * one of this node's ancestors or this node itself.
                   11010:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   11011:  * document than the one that created this node.
                   11012:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   11013:  * Returns: the node added.
                   11014:  */
1.2     ! paf      11015: xmlNode *
        !          11016: gdome_dt_appendChild (GdomeDocumentType *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      11017: {
                   11018:  if (self == NULL) {
                   11019:    *exc = GDOME_NULL_POINTER_ERR;
                   11020:    return NULL;
                   11021:  }
                   11022:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11023:    *exc = GDOME_INVALID_STATE_ERR;
                   11024:    return NULL;
                   11025:  }
                   11026:  *exc = 0;
1.2     ! paf      11027:  return ((Gdome_xml_DocumentType *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      11028: }
                   11029: /**
                   11030:  * gdome_dt_cloneNode:
                   11031:  * @self:  Node Object ref
                   11032:  * @deep:  If true, recursively clone the subtree under the specified node;
                   11033:  *         if false, clone only the node itself (and its attributes, if it is
                   11034:  *         an Element).
                   11035:  * @exc:  Exception Object ref
                   11036:  *
                   11037:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   11038:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   11039:  * %NULL).
                   11040:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   11041:  * nodes are not supported.
                   11042:  *
                   11043:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   11044:  * supported.
                   11045:  * Returns: the duplicate node.
                   11046:  */
1.2     ! paf      11047: xmlNode *
1.1       paf      11048: gdome_dt_cloneNode (GdomeDocumentType *self, GdomeBoolean deep, GdomeException *exc)
                   11049: {
                   11050:  if (self == NULL) {
                   11051:    *exc = GDOME_NULL_POINTER_ERR;
                   11052:    return NULL;
                   11053:  }
                   11054:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11055:    *exc = GDOME_INVALID_STATE_ERR;
                   11056:    return NULL;
                   11057:  }
                   11058:  *exc = 0;
1.2     ! paf      11059:  return ((Gdome_xml_DocumentType *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      11060: }
                   11061: /**
                   11062:  * gdome_dt_hasAttributes:
                   11063:  * @self:  Node Object ref
                   11064:  * @exc:  Exception Object ref
                   11065:  *
                   11066:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   11067:  */
                   11068: GdomeBoolean
                   11069: gdome_dt_hasAttributes (GdomeDocumentType *self, GdomeException *exc)
                   11070: {
                   11071:  if (self == NULL) {
                   11072:    *exc = GDOME_NULL_POINTER_ERR;
                   11073:    return FALSE;
                   11074:  }
                   11075:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11076:    *exc = GDOME_INVALID_STATE_ERR;
                   11077:    return FALSE;
                   11078:  }
                   11079:  *exc = 0;
1.2     ! paf      11080:  return ((Gdome_xml_DocumentType *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      11081: }
                   11082: /**
                   11083:  * gdome_dt_hasChildNodes:
                   11084:  * @self:  Node Object ref
                   11085:  * @exc:  Exception Object ref
                   11086:  *
                   11087:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   11088:  */
                   11089: GdomeBoolean
                   11090: gdome_dt_hasChildNodes (GdomeDocumentType *self, GdomeException *exc)
                   11091: {
                   11092:  if (self == NULL) {
                   11093:    *exc = GDOME_NULL_POINTER_ERR;
                   11094:    return FALSE;
                   11095:  }
                   11096:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11097:    *exc = GDOME_INVALID_STATE_ERR;
                   11098:    return FALSE;
                   11099:  }
                   11100:  *exc = 0;
1.2     ! paf      11101:  return ((Gdome_xml_DocumentType *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      11102: }
                   11103: /**
                   11104:  * gdome_dt_insertBefore:
                   11105:  * @self:  Node Object ref
                   11106:  * @newChild:  The new node to put in the child list
                   11107:  * @refChild:  the reference node, i.e., the node before which the new node
                   11108:  *             must be inserted.
                   11109:  * @exc:  Exception Object ref
                   11110:  *
                   11111:  * Inserts the node @newChild before the existing child node @refChild. If
                   11112:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   11113:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   11114:  * in the same order, before @refChild. If the @newChild is already in the
                   11115:  * tree, it is first removed.
                   11116:  *
                   11117:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   11118:  * allow children of the type of the @newChild node, or if the node to insert is
                   11119:  * one of this node's ancestors or this node itself.
                   11120:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   11121:  * document than the one that created this node.
                   11122:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   11123:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   11124:  * Returns: the node being inserted.
                   11125:  */
1.2     ! paf      11126: xmlNode *
        !          11127: gdome_dt_insertBefore (GdomeDocumentType *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      11128: {
                   11129:  if (self == NULL) {
                   11130:    *exc = GDOME_NULL_POINTER_ERR;
                   11131:    return NULL;
                   11132:  }
                   11133:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11134:    *exc = GDOME_INVALID_STATE_ERR;
                   11135:    return NULL;
                   11136:  }
                   11137:  *exc = 0;
1.2     ! paf      11138:  return ((Gdome_xml_DocumentType *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      11139: }
                   11140: /**
                   11141:  * gdome_dt_isSupported:
                   11142:  * @self:  Node Object ref
                   11143:  * @feature:  The name of the feature to test.
                   11144:  * @version:  This is the version number of the feature to test. In Level 2,
                   11145:  *            version 1, this is the string "2.0". If the version is not
                   11146:  *            specified, supporting any version of the feature will cause the
                   11147:  *            method to return %TRUE.
                   11148:  * @exc:  Exception Object ref
                   11149:  *
                   11150:  * Tests whether the DOM implementation implements a specific feature and that
                   11151:  * feature is supported by this node.
                   11152:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   11153:  * otherwise.
                   11154:  */
                   11155: GdomeBoolean
                   11156: gdome_dt_isSupported (GdomeDocumentType *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   11157: {
                   11158:  if (self == NULL) {
                   11159:    *exc = GDOME_NULL_POINTER_ERR;
                   11160:    return FALSE;
                   11161:  }
                   11162:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11163:    *exc = GDOME_INVALID_STATE_ERR;
                   11164:    return FALSE;
                   11165:  }
                   11166:  *exc = 0;
1.2     ! paf      11167:  return ((Gdome_xml_DocumentType *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      11168: }
                   11169: /**
                   11170:  * gdome_dt_normalize:
                   11171:  * @self:  Node Object ref
                   11172:  * @exc:  Exception Object ref
                   11173:  *
                   11174:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   11175:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   11176:  * elements, comments, processing instructions, CDATA sections, and entity
                   11177:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   11178:  * nodes nor empty Text nodes.
                   11179:  */
                   11180: void
                   11181: gdome_dt_normalize (GdomeDocumentType *self, GdomeException *exc)
                   11182: {
                   11183:  if (self == NULL) {
                   11184:    *exc = GDOME_NULL_POINTER_ERR;
                   11185:    return;
                   11186:  }
                   11187:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11188:    *exc = GDOME_INVALID_STATE_ERR;
                   11189:    return;
                   11190:  }
                   11191:  *exc = 0;
1.2     ! paf      11192:  ((Gdome_xml_DocumentType *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      11193: }
                   11194: /**
                   11195:  * gdome_dt_removeChild:
                   11196:  * @self:  Node Object ref
                   11197:  * @oldChild:  The node being removed
                   11198:  * @exc:  Exception Object ref
                   11199:  *
                   11200:  * Removes the child node indicated by @oldChild from the list of children, and
                   11201:  * returns it.
                   11202:  *
                   11203:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   11204:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   11205:  * Returns: the node removed.
                   11206:  */
1.2     ! paf      11207: xmlNode *
        !          11208: gdome_dt_removeChild (GdomeDocumentType *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      11209: {
                   11210:  if (self == NULL) {
                   11211:    *exc = GDOME_NULL_POINTER_ERR;
                   11212:    return NULL;
                   11213:  }
                   11214:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11215:    *exc = GDOME_INVALID_STATE_ERR;
                   11216:    return NULL;
                   11217:  }
                   11218:  *exc = 0;
1.2     ! paf      11219:  return ((Gdome_xml_DocumentType *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      11220: }
                   11221: /**
                   11222:  * gdome_dt_replaceChild:
                   11223:  * @self:  Node Object ref
                   11224:  * @newChild:  The new node to put in the child list
                   11225:  * @oldChild:  The node being replaced in the list
                   11226:  * @exc:  Exception Object ref
                   11227:  *
                   11228:  * Replaces the child node @oldChild with @newChild in the list of children,
                   11229:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   11230:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   11231:  * inserted in the same order. If the @newChild is already in the tree, it is
                   11232:  * first removed.
                   11233:  *
                   11234:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   11235:  * not allow children of the type of the @newChild node, or if the node to put
                   11236:  * in is one of this node's ancestors or this node itself.
                   11237:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   11238:  * document than the one that created this node.
                   11239:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   11240:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   11241:  * Returns: the node replaced.
                   11242:  */
1.2     ! paf      11243: xmlNode *
        !          11244: gdome_dt_replaceChild (GdomeDocumentType *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      11245: {
                   11246:  if (self == NULL) {
                   11247:    *exc = GDOME_NULL_POINTER_ERR;
                   11248:    return NULL;
                   11249:  }
                   11250:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11251:    *exc = GDOME_INVALID_STATE_ERR;
                   11252:    return NULL;
                   11253:  }
                   11254:  *exc = 0;
1.2     ! paf      11255:  return ((Gdome_xml_DocumentType *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      11256: }
                   11257: /**
                   11258:  * gdome_dt_addEventListener:
                   11259:  * @self:  Node Object ref
                   11260:  * @type:  the event type for which the user is registering
                   11261:  * @listener:  the listener parameter takes an interface implemented by the
                   11262:  *             user which contains the methods to be called when the event occurs.
                   11263:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   11264:  *               capture. After initiating capture, all events of the specified
                   11265:  *               type will be dispatched to the registered EventListener before
                   11266:  *               being dispatched to any EventTargets beneath them in the tree.
                   11267:  *               Events which are bubbling upward through the tree will not
                   11268:  *               trigger an EventListener designated to use capture.
                   11269:  * @exc:  Exception Object ref
                   11270:  *
                   11271:  * This method allows the registration of event listeners on the event target.
                   11272:  * If an EventListener is added to an EventTarget while it is processing an
                   11273:  * event, it will not be triggered by the current actions but may be triggered
                   11274:  * during a later stage of event flow, such as the bubbling phase.
                   11275:  * If multiple identical EventListeners are registered on the same EventTarget
                   11276:  * with the same parameters the duplicate instances are discarded. They do not
                   11277:  * cause the EventListener to be called twice and since they are discarded
                   11278:  * they do not need to be removed with the removeEventListener method.
                   11279:  */
                   11280: void
                   11281: gdome_dt_addEventListener (GdomeDocumentType *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   11282: {
                   11283:  if (self == NULL) {
                   11284:    *exc = GDOME_NULL_POINTER_ERR;
                   11285:    return;
                   11286:  }
                   11287:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11288:    *exc = GDOME_INVALID_STATE_ERR;
                   11289:    return;
                   11290:  }
                   11291:  *exc = 0;
1.2     ! paf      11292:  ((Gdome_xml_DocumentType *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      11293: }
                   11294: /**
                   11295:  * gdome_dt_removeEventListener:
                   11296:  * @self:  Node Object ref
                   11297:  * @type:  Specifies the event type of the EventListener being removed.
                   11298:  * @listener:  The EventListener parameter indicates the EventListener to be
                   11299:  *             removed.
                   11300:  * @useCapture:  Specifies whether the EventListener being removed was
                   11301:  *               registered as a capturing listener or not. If a listener was
                   11302:  *               registered twice, one with capture and one without, each must
                   11303:  *               be removed separately. Removal of a capturing listener does
                   11304:  *               not affect a non-capturing version of the same listener, and
                   11305:  *               vice versa.
                   11306:  * @exc:  Exception Object ref
                   11307:  *
                   11308:  * This method allows the removal of event listeners from the event target. If
                   11309:  * an EventListener is removed from an EventTarget while it is processing an
                   11310:  * event, it will not be triggered by the current actions. EventListeners can
                   11311:  * never be invoked after being removed. Calling removeEventListener with
                   11312:  * arguments which do not identify any currently registered EventListener on
                   11313:  * the EventTarget has no effect.
                   11314:  */
                   11315: void
                   11316: gdome_dt_removeEventListener (GdomeDocumentType *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   11317: {
                   11318:  if (self == NULL) {
                   11319:    *exc = GDOME_NULL_POINTER_ERR;
                   11320:    return;
                   11321:  }
                   11322:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11323:    *exc = GDOME_INVALID_STATE_ERR;
                   11324:    return;
                   11325:  }
                   11326:  *exc = 0;
1.2     ! paf      11327:  ((Gdome_xml_DocumentType *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      11328: }
                   11329: /**
                   11330:  * gdome_dt_dispatchEvent:
                   11331:  * @self:  Node Object ref
                   11332:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   11333:  *        used in processing the event.
                   11334:  * @exc:  Exception Object ref
                   11335:  *
                   11336:  * This method allows the dispatch of events into the implementations event
                   11337:  * model. Events dispatched in this manner will have the same capturing and
                   11338:  * bubbling behavior as events dispatched directly by the implementation. The
                   11339:  * target of the event is the EventTarget on which dispatchEvent is called.
                   11340:  *
                   11341:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   11342:  * specified by initializing the event before dispatchEvent was called.
                   11343:  * Specification of the Event's type as %NULL or an empty string will also
                   11344:  * trigger this exception.
                   11345:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   11346:  *          is %TRUE.
                   11347:  */
                   11348: GdomeBoolean
                   11349: gdome_dt_dispatchEvent (GdomeDocumentType *self, GdomeEvent *evt, GdomeException *exc)
                   11350: {
                   11351:  if (self == NULL) {
                   11352:    *exc = GDOME_NULL_POINTER_ERR;
                   11353:    return FALSE;
                   11354:  }
                   11355:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11356:    *exc = GDOME_INVALID_STATE_ERR;
                   11357:    return FALSE;
                   11358:  }
                   11359:  *exc = 0;
1.2     ! paf      11360:  return ((Gdome_xml_DocumentType *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      11361: }
                   11362: /**
                   11363:  * gdome_dt_subTreeDispatchEvent:
                   11364:  * @self:  Node Object ref
                   11365:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   11366:  *        used in processing the event.
                   11367:  * @exc:  Exception Object ref
                   11368:  *
                   11369:  * This method allows the dispatch of events into the implementations event
                   11370:  * model. Events dispatched in this manner will have the same capturing and
                   11371:  * bubbling behavior as events dispatched directly by the implementation. The
                   11372:  * target of the event is any nodes in the subtree of the EventTarget on which
                   11373:  * dispatchEvent is called.
                   11374:  *
                   11375:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   11376:  * specified by initializing the event before dispatchEvent was called.
                   11377:  * Specification of the Event's type as %NULL or an empty string will also
                   11378:  * trigger this exception.
                   11379:  */
                   11380: void
                   11381: gdome_dt_subTreeDispatchEvent (GdomeDocumentType *self, GdomeEvent *evt, GdomeException *exc)
                   11382: {
                   11383:  if (self == NULL) {
                   11384:    *exc = GDOME_NULL_POINTER_ERR;
                   11385:    return;
                   11386:  }
                   11387:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11388:    *exc = GDOME_INVALID_STATE_ERR;
                   11389:    return;
                   11390:  }
                   11391:  *exc = 0;
1.2     ! paf      11392:  ((Gdome_xml_DocumentType *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      11393: }
                   11394: /**
                   11395:  * gdome_dt_canAppend:
                   11396:  * @self:  Node Object ref
                   11397:  * @newChild:  The Node Object ref of the node to test
                   11398:  * @exc:  Exception Object ref
                   11399:  *
                   11400:  * Tests if a @newChild can be added in the child list of this node.
                   11401:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   11402:  */
                   11403: GdomeBoolean
1.2     ! paf      11404: gdome_dt_canAppend (GdomeDocumentType *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      11405: {
                   11406:  if (self == NULL) {
                   11407:    *exc = GDOME_NULL_POINTER_ERR;
                   11408:    return FALSE;
                   11409:  }
                   11410:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11411:    *exc = GDOME_INVALID_STATE_ERR;
                   11412:    return FALSE;
                   11413:  }
                   11414:  *exc = 0;
1.2     ! paf      11415:  return ((Gdome_xml_DocumentType *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      11416: }
                   11417: 
                   11418: /******************************************************************************
                   11419:           GdomeNotation interface API
                   11420:  ******************************************************************************/
                   11421: /**
                   11422:  * gdome_not_publicId:
                   11423:  * @self:  Notations Object ref
                   11424:  * @exc:   Exception Object ref
                   11425:  *
                   11426:  * Returns: the public identifier of this notation. If the public identifier
                   11427:  * was not specified, this is NULL.
                   11428:  */
                   11429: GdomeDOMString *
                   11430: gdome_not_publicId (GdomeNotation *self, GdomeException *exc)
                   11431: {
                   11432:  if (self == NULL) {
                   11433:    *exc = GDOME_NULL_POINTER_ERR;
                   11434:    return NULL;
                   11435:  }
                   11436:  if (((Gdome_xml_Notation *)self)->n == NULL) {
                   11437:    *exc = GDOME_INVALID_STATE_ERR;
                   11438:    return NULL;
                   11439:  }
                   11440:  *exc = 0;
                   11441:  return ((Gdome_xml_Notation *)self)->vtab->publicId (self, exc);
                   11442: }
                   11443: /**
                   11444:  * gdome_not_systemId:
                   11445:  * @self:  Notations Object ref
                   11446:  * @exc:   Exception Object ref
                   11447:  *
                   11448:  * Returns: the system identifier of this notation. If the system identifier
                   11449:  * was not specified, this is NULL.
                   11450:  */
                   11451: GdomeDOMString *
                   11452: gdome_not_systemId (GdomeNotation *self, GdomeException *exc)
                   11453: {
                   11454:  if (self == NULL) {
                   11455:    *exc = GDOME_NULL_POINTER_ERR;
                   11456:    return NULL;
                   11457:  }
                   11458:  if (((Gdome_xml_Notation *)self)->n == NULL) {
                   11459:    *exc = GDOME_INVALID_STATE_ERR;
                   11460:    return NULL;
                   11461:  }
                   11462:  *exc = 0;
                   11463:  return ((Gdome_xml_Notation *)self)->vtab->systemId (self, exc);
                   11464: }
                   11465: /**
                   11466:  * gdome_not_attributes:
                   11467:  * @self:  Node Object ref
                   11468:  * @exc:  Exception Object ref
                   11469:  *
                   11470:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   11471:  * Element) or %NULL otherwise.
                   11472:  */
                   11473: GdomeNamedNodeMap *
                   11474: gdome_not_attributes (GdomeNotation *self, GdomeException *exc)
                   11475: {
                   11476:  if (self == NULL) {
                   11477:    *exc = GDOME_NULL_POINTER_ERR;
                   11478:    return NULL;
                   11479:  }
                   11480:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11481:    *exc = GDOME_INVALID_STATE_ERR;
                   11482:    return NULL;
                   11483:  }
                   11484:  *exc = 0;
1.2     ! paf      11485:  return ((Gdome_xml_Notation *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      11486: }
                   11487: /**
                   11488:  * gdome_not_childNodes:
                   11489:  * @self:  Node Object ref
                   11490:  * @exc:  Exception Object ref
                   11491:  *
                   11492:  * Returns: a NodeList that contains all children of this node. If there are no
                   11493:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   11494:  * not considered to be children of element nodes - use gdome_n_attributes to
                   11495:  * obtain the attributes.
                   11496:  */
                   11497: GdomeNodeList *
                   11498: gdome_not_childNodes (GdomeNotation *self, GdomeException *exc)
                   11499: {
                   11500:  if (self == NULL) {
                   11501:    *exc = GDOME_NULL_POINTER_ERR;
                   11502:    return NULL;
                   11503:  }
                   11504:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11505:    *exc = GDOME_INVALID_STATE_ERR;
                   11506:    return NULL;
                   11507:  }
                   11508:  *exc = 0;
1.2     ! paf      11509:  return ((Gdome_xml_Notation *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      11510: }
                   11511: /**
                   11512:  * gdome_not_firstChild:
                   11513:  * @self:  Node Object ref
                   11514:  * @exc:  Exception Object ref
                   11515:  * 
                   11516:  * Returns: the first child of this node. If there is no such node,
                   11517:  * this returns %NULL.
                   11518:  */
1.2     ! paf      11519: xmlNode *
1.1       paf      11520: gdome_not_firstChild (GdomeNotation *self, GdomeException *exc)
                   11521: {
                   11522:  if (self == NULL) {
                   11523:    *exc = GDOME_NULL_POINTER_ERR;
                   11524:    return NULL;
                   11525:  }
                   11526:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11527:    *exc = GDOME_INVALID_STATE_ERR;
                   11528:    return NULL;
                   11529:  }
                   11530:  *exc = 0;
1.2     ! paf      11531:  return ((Gdome_xml_Notation *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      11532: }
                   11533: /**
                   11534:  * gdome_not_lastChild:
                   11535:  * @self:  Node Object ref
                   11536:  * @exc:  Exception Object ref
                   11537:  *
                   11538:  * Returns: the last child of this node. If there is no such node,
                   11539:  * this returns %NULL.
                   11540:  */
1.2     ! paf      11541: xmlNode *
1.1       paf      11542: gdome_not_lastChild (GdomeNotation *self, GdomeException *exc)
                   11543: {
                   11544:  if (self == NULL) {
                   11545:    *exc = GDOME_NULL_POINTER_ERR;
                   11546:    return NULL;
                   11547:  }
                   11548:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11549:    *exc = GDOME_INVALID_STATE_ERR;
                   11550:    return NULL;
                   11551:  }
                   11552:  *exc = 0;
1.2     ! paf      11553:  return ((Gdome_xml_Notation *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      11554: }
                   11555: /**
                   11556:  * gdome_not_localName:
                   11557:  * @self:  Node Objects ref
                   11558:  * @exc:  Exception Object ref
                   11559:  *
                   11560:  * Returns: the local part of the qualified name of this node.
                   11561:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   11562:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   11563:  * always %NULL.
                   11564:  */
                   11565: GdomeDOMString *
                   11566: gdome_not_localName (GdomeNotation *self, GdomeException *exc)
                   11567: {
                   11568:  if (self == NULL) {
                   11569:    *exc = GDOME_NULL_POINTER_ERR;
                   11570:    return NULL;
                   11571:  }
                   11572:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11573:    *exc = GDOME_INVALID_STATE_ERR;
                   11574:    return NULL;
                   11575:  }
                   11576:  *exc = 0;
1.2     ! paf      11577:  return ((Gdome_xml_Notation *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      11578: }
                   11579: /**
                   11580:  * gdome_not_namespaceURI:
                   11581:  * @self:  Node Objects ref
                   11582:  * @exc:  Exception Object ref
                   11583:  *
                   11584:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   11585:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   11586:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   11587:  * always %NULL.
                   11588:  */
                   11589: GdomeDOMString *
                   11590: gdome_not_namespaceURI (GdomeNotation *self, GdomeException *exc)
                   11591: {
                   11592:  if (self == NULL) {
                   11593:    *exc = GDOME_NULL_POINTER_ERR;
                   11594:    return NULL;
                   11595:  }
                   11596:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11597:    *exc = GDOME_INVALID_STATE_ERR;
                   11598:    return NULL;
                   11599:  }
                   11600:  *exc = 0;
1.2     ! paf      11601:  return ((Gdome_xml_Notation *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      11602: }
                   11603: /**
                   11604:  * gdome_not_nextSibling:
                   11605:  * @self:  Node Object ref
                   11606:  * @exc:  Exception Object ref
                   11607:  *
                   11608:  * Returns: the node immediately following this node. If there is no such
                   11609:  * node, this returns %NULL.
                   11610:  */
1.2     ! paf      11611: xmlNode *
1.1       paf      11612: gdome_not_nextSibling (GdomeNotation *self, GdomeException *exc)
                   11613: {
                   11614:  if (self == NULL) {
                   11615:    *exc = GDOME_NULL_POINTER_ERR;
                   11616:    return NULL;
                   11617:  }
                   11618:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11619:    *exc = GDOME_INVALID_STATE_ERR;
                   11620:    return NULL;
                   11621:  }
                   11622:  *exc = 0;
1.2     ! paf      11623:  return ((Gdome_xml_Notation *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      11624: }
                   11625: /**
                   11626:  * gdome_not_nodeName:
                   11627:  * @self:  Node Object ref
                   11628:  * @exc:  Exception Object ref
                   11629:  *
                   11630:  * Returns: the name of this node, depending on its type.
                   11631:  */
                   11632: GdomeDOMString *
                   11633: gdome_not_nodeName (GdomeNotation *self, GdomeException *exc)
                   11634: {
                   11635:  if (self == NULL) {
                   11636:    *exc = GDOME_NULL_POINTER_ERR;
                   11637:    return NULL;
                   11638:  }
                   11639:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11640:    *exc = GDOME_INVALID_STATE_ERR;
                   11641:    return NULL;
                   11642:  }
                   11643:  *exc = 0;
1.2     ! paf      11644:  return ((Gdome_xml_Notation *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      11645: }
                   11646: /**
                   11647:  * gdome_not_nodeType:
                   11648:  * @self:  Node Object ref
                   11649:  * @exc:  Exception Object ref
                   11650:  *
                   11651:  * Returns: an integer bigger than %0 representing the type of the underlying
                   11652:  * object or %0 on error.
                   11653:  */
                   11654: unsigned short
                   11655: gdome_not_nodeType (GdomeNotation *self, GdomeException *exc)
                   11656: {
                   11657:  if (self == NULL) {
                   11658:    *exc = GDOME_NULL_POINTER_ERR;
                   11659:    return 0;
                   11660:  }
                   11661:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11662:    *exc = GDOME_INVALID_STATE_ERR;
                   11663:    return 0;
                   11664:  }
                   11665:  *exc = 0;
1.2     ! paf      11666:  return ((Gdome_xml_Notation *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      11667: }
                   11668: /**
                   11669:  * gdome_not_nodeValue:
                   11670:  * @self:  Node Object ref
                   11671:  * @exc:  Exception Object ref
                   11672:  *
                   11673:  * Returns: the value of this node, depending on its type.
                   11674:  */
                   11675: GdomeDOMString *
                   11676: gdome_not_nodeValue (GdomeNotation *self, GdomeException *exc)
                   11677: {
                   11678:  if (self == NULL) {
                   11679:    *exc = GDOME_NULL_POINTER_ERR;
                   11680:    return NULL;
                   11681:  }
                   11682:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11683:    *exc = GDOME_INVALID_STATE_ERR;
                   11684:    return NULL;
                   11685:  }
                   11686:  *exc = 0;
1.2     ! paf      11687:  return ((Gdome_xml_Notation *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      11688: }
                   11689: /**
                   11690:  * gdome_not_set_nodeValue:
                   11691:  * @self:  Node Object ref
                   11692:  * @nodeValue:  The new value for this node.
                   11693:  * @exc:  Exception Object ref
                   11694:  *
                   11695:  * Sets The value of this node, depending on its type.
                   11696:  *
                   11697:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   11698:  */
                   11699: void
                   11700: gdome_not_set_nodeValue (GdomeNotation *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   11701: {
                   11702:  if (self == NULL) {
                   11703:    *exc = GDOME_NULL_POINTER_ERR;
                   11704:    return;
                   11705:  }
                   11706:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11707:    *exc = GDOME_INVALID_STATE_ERR;
                   11708:    return;
                   11709:  }
                   11710:  *exc = 0;
1.2     ! paf      11711:  ((Gdome_xml_Notation *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      11712: }
                   11713: /**
                   11714:  * gdome_not_ownerDocument:
                   11715:  * @self:  Node Objects ref
                   11716:  * @exc:  Exception Object ref
                   11717:  *
                   11718:  * Returns: the documment object associated with this node. This is also the
                   11719:  * Document object used to create new nodes. When this node is a Document or a
                   11720:  * DocumentType which is not used with any Document yet, this is %NULL.
                   11721:  */
                   11722: GdomeDocument *
                   11723: gdome_not_ownerDocument (GdomeNotation *self, GdomeException *exc)
                   11724: {
                   11725:  if (self == NULL) {
                   11726:    *exc = GDOME_NULL_POINTER_ERR;
                   11727:    return NULL;
                   11728:  }
                   11729:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11730:    *exc = GDOME_INVALID_STATE_ERR;
                   11731:    return NULL;
                   11732:  }
                   11733:  *exc = 0;
1.2     ! paf      11734:  return ((Gdome_xml_Notation *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      11735: }
                   11736: /**
                   11737:  * gdome_not_parentNode:
                   11738:  * @self: Node Object ref
                   11739:  * @exc: Exception Object ref
                   11740:  *
                   11741:  * Returns: the parent of this node. All nodes, except Attr,
                   11742:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   11743:  * if a node has just been created and not yet added to the tree, or if it has
                   11744:  * been removed from the tree, this is %NULL.
                   11745:  */
1.2     ! paf      11746: xmlNode *
1.1       paf      11747: gdome_not_parentNode (GdomeNotation *self, GdomeException *exc)
                   11748: {
                   11749:  if (self == NULL) {
                   11750:    *exc = GDOME_NULL_POINTER_ERR;
                   11751:    return NULL;
                   11752:  }
                   11753:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11754:    *exc = GDOME_INVALID_STATE_ERR;
                   11755:    return NULL;
                   11756:  }
                   11757:  *exc = 0;
1.2     ! paf      11758:  return ((Gdome_xml_Notation *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      11759: }
                   11760: /**
                   11761:  * gdome_not_prefix:
                   11762:  * @self:  Node Objects ref
                   11763:  * @exc:  Exception Object ref
                   11764:  *
                   11765:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   11766:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   11767:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   11768:  * always %NULL.
                   11769:  */
                   11770: GdomeDOMString *
                   11771: gdome_not_prefix (GdomeNotation *self, GdomeException *exc)
                   11772: {
                   11773:  if (self == NULL) {
                   11774:    *exc = GDOME_NULL_POINTER_ERR;
                   11775:    return NULL;
                   11776:  }
                   11777:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11778:    *exc = GDOME_INVALID_STATE_ERR;
                   11779:    return NULL;
                   11780:  }
                   11781:  *exc = 0;
1.2     ! paf      11782:  return ((Gdome_xml_Notation *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      11783: }
                   11784: /**
                   11785:  * gdome_not_set_prefix:
                   11786:  * @self:  Node Object ref
                   11787:  * @prefix:  The new prefix for this node.
                   11788:  * @exc:  Exception Object ref
                   11789:  *
                   11790:  * Sets a new nemaspace prefix for this node.
                   11791:  *
                   11792:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   11793:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   11794:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   11795:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   11796:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   11797:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   11798:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   11799:  * an attribute and the qualifiedName of this node is "xmlns".
                   11800:  */
                   11801: void
                   11802: gdome_not_set_prefix (GdomeNotation *self, GdomeDOMString *prefix, GdomeException *exc)
                   11803: {
                   11804:  if (self == NULL) {
                   11805:    *exc = GDOME_NULL_POINTER_ERR;
                   11806:    return;
                   11807:  }
                   11808:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11809:    *exc = GDOME_INVALID_STATE_ERR;
                   11810:    return;
                   11811:  }
                   11812:  *exc = 0;
1.2     ! paf      11813:  ((Gdome_xml_Notation *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      11814: }
                   11815: /**
                   11816:  * gdome_not_previousSibling:
                   11817:  * @self:  Node Object ref
                   11818:  * @exc:  Exception Object ref
                   11819:  *
                   11820:  * Returns: the node immediately preceding this node. If there is no such
                   11821:  * node, this returns %NULL.
                   11822:  */
1.2     ! paf      11823: xmlNode *
1.1       paf      11824: gdome_not_previousSibling (GdomeNotation *self, GdomeException *exc)
                   11825: {
                   11826:  if (self == NULL) {
                   11827:    *exc = GDOME_NULL_POINTER_ERR;
                   11828:    return NULL;
                   11829:  }
                   11830:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11831:    *exc = GDOME_INVALID_STATE_ERR;
                   11832:    return NULL;
                   11833:  }
                   11834:  *exc = 0;
1.2     ! paf      11835:  return ((Gdome_xml_Notation *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      11836: }
                   11837: /**
                   11838:  * gdome_not_ref:
                   11839:  * @self:  Node Object ref
                   11840:  * @exc:  Exception Object ref
                   11841:  *
                   11842:  * Increase the reference count of the specified Node.
                   11843:  */
                   11844: void
                   11845: gdome_not_ref (GdomeNotation *self, GdomeException *exc)
                   11846: {
                   11847:  if (self == NULL) {
                   11848:    *exc = GDOME_NULL_POINTER_ERR;
                   11849:    return;
                   11850:  }
                   11851:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11852:    *exc = GDOME_INVALID_STATE_ERR;
                   11853:    return;
                   11854:  }
                   11855:  *exc = 0;
1.2     ! paf      11856:  ((Gdome_xml_Notation *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      11857: }
                   11858: /**
                   11859:  * gdome_not_unref:
                   11860:  * @self:  Node Object ref
                   11861:  * @exc:  Exception Object ref
                   11862:  *
                   11863:  * Decrease the reference count of the specified Node. Free the Node structure
                   11864:  * if the Node will have zero reference.
                   11865:  */
                   11866: void
                   11867: gdome_not_unref (GdomeNotation *self, GdomeException *exc)
                   11868: {
                   11869:  if (self == NULL) {
                   11870:    *exc = GDOME_NULL_POINTER_ERR;
                   11871:    return;
                   11872:  }
                   11873:  *exc = 0;
                   11874:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11875:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   11876:      ((Gdome_xml_Node *)self)->refcnt--;
                   11877: 
                   11878:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   11879: #ifdef DEBUG_REFCNT
                   11880:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   11881: #endif
                   11882:      g_free (self);
                   11883:    }
                   11884:    return;
                   11885:  }
1.2     ! paf      11886:  ((Gdome_xml_Notation *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      11887: }
                   11888: /**
                   11889:  * gdome_not_query_interface:
                   11890:  * @self:  Node Object ref
                   11891:  * @interface:  interface needed
                   11892:  * @exc:  Exception Object ref
                   11893:  *
                   11894:  * Returns: a reference to this object that implements the @interface needed,
                   11895:  *          or %NULL if the @interface is not supported by this Object.
                   11896:  */
                   11897: gpointer
                   11898: gdome_not_query_interface (GdomeNotation *self, const char *interface, GdomeException *exc)
                   11899: {
                   11900:  if (self == NULL) {
                   11901:    *exc = GDOME_NULL_POINTER_ERR;
                   11902:    return NULL;
                   11903:  }
                   11904:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11905:    *exc = GDOME_INVALID_STATE_ERR;
                   11906:    return NULL;
                   11907:  }
                   11908:  *exc = 0;
1.2     ! paf      11909:  return ((Gdome_xml_Notation *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      11910: }
                   11911: /**
                   11912:  * gdome_not_appendChild:
                   11913:  * @self:  Node Object ref
                   11914:  * @newChild:  The node to add
                   11915:  * @exc:  Exception Object ref
                   11916:  *
                   11917:  * Adds the node @newChild to the end of the list of children of this node.
                   11918:  * If the @newChild is already in the tree, it is first removed. If it is a
                   11919:  * DocumentFragment node, the entire contents of the document fragment are
                   11920:  * moved into the child list of this node
                   11921:  *
                   11922:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   11923:  * allow children of the type of the @newChild node, or if the node to append is
                   11924:  * one of this node's ancestors or this node itself.
                   11925:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   11926:  * document than the one that created this node.
                   11927:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   11928:  * Returns: the node added.
                   11929:  */
1.2     ! paf      11930: xmlNode *
        !          11931: gdome_not_appendChild (GdomeNotation *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      11932: {
                   11933:  if (self == NULL) {
                   11934:    *exc = GDOME_NULL_POINTER_ERR;
                   11935:    return NULL;
                   11936:  }
                   11937:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11938:    *exc = GDOME_INVALID_STATE_ERR;
                   11939:    return NULL;
                   11940:  }
                   11941:  *exc = 0;
1.2     ! paf      11942:  return ((Gdome_xml_Notation *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      11943: }
                   11944: /**
                   11945:  * gdome_not_cloneNode:
                   11946:  * @self:  Node Object ref
                   11947:  * @deep:  If true, recursively clone the subtree under the specified node;
                   11948:  *         if false, clone only the node itself (and its attributes, if it is
                   11949:  *         an Element).
                   11950:  * @exc:  Exception Object ref
                   11951:  *
                   11952:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   11953:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   11954:  * %NULL).
                   11955:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   11956:  * nodes are not supported.
                   11957:  *
                   11958:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   11959:  * supported.
                   11960:  * Returns: the duplicate node.
                   11961:  */
1.2     ! paf      11962: xmlNode *
1.1       paf      11963: gdome_not_cloneNode (GdomeNotation *self, GdomeBoolean deep, GdomeException *exc)
                   11964: {
                   11965:  if (self == NULL) {
                   11966:    *exc = GDOME_NULL_POINTER_ERR;
                   11967:    return NULL;
                   11968:  }
                   11969:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11970:    *exc = GDOME_INVALID_STATE_ERR;
                   11971:    return NULL;
                   11972:  }
                   11973:  *exc = 0;
1.2     ! paf      11974:  return ((Gdome_xml_Notation *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      11975: }
                   11976: /**
                   11977:  * gdome_not_hasAttributes:
                   11978:  * @self:  Node Object ref
                   11979:  * @exc:  Exception Object ref
                   11980:  *
                   11981:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   11982:  */
                   11983: GdomeBoolean
                   11984: gdome_not_hasAttributes (GdomeNotation *self, GdomeException *exc)
                   11985: {
                   11986:  if (self == NULL) {
                   11987:    *exc = GDOME_NULL_POINTER_ERR;
                   11988:    return FALSE;
                   11989:  }
                   11990:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   11991:    *exc = GDOME_INVALID_STATE_ERR;
                   11992:    return FALSE;
                   11993:  }
                   11994:  *exc = 0;
1.2     ! paf      11995:  return ((Gdome_xml_Notation *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      11996: }
                   11997: /**
                   11998:  * gdome_not_hasChildNodes:
                   11999:  * @self:  Node Object ref
                   12000:  * @exc:  Exception Object ref
                   12001:  *
                   12002:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   12003:  */
                   12004: GdomeBoolean
                   12005: gdome_not_hasChildNodes (GdomeNotation *self, GdomeException *exc)
                   12006: {
                   12007:  if (self == NULL) {
                   12008:    *exc = GDOME_NULL_POINTER_ERR;
                   12009:    return FALSE;
                   12010:  }
                   12011:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12012:    *exc = GDOME_INVALID_STATE_ERR;
                   12013:    return FALSE;
                   12014:  }
                   12015:  *exc = 0;
1.2     ! paf      12016:  return ((Gdome_xml_Notation *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      12017: }
                   12018: /**
                   12019:  * gdome_not_insertBefore:
                   12020:  * @self:  Node Object ref
                   12021:  * @newChild:  The new node to put in the child list
                   12022:  * @refChild:  the reference node, i.e., the node before which the new node
                   12023:  *             must be inserted.
                   12024:  * @exc:  Exception Object ref
                   12025:  *
                   12026:  * Inserts the node @newChild before the existing child node @refChild. If
                   12027:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   12028:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   12029:  * in the same order, before @refChild. If the @newChild is already in the
                   12030:  * tree, it is first removed.
                   12031:  *
                   12032:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   12033:  * allow children of the type of the @newChild node, or if the node to insert is
                   12034:  * one of this node's ancestors or this node itself.
                   12035:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   12036:  * document than the one that created this node.
                   12037:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   12038:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   12039:  * Returns: the node being inserted.
                   12040:  */
1.2     ! paf      12041: xmlNode *
        !          12042: gdome_not_insertBefore (GdomeNotation *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      12043: {
                   12044:  if (self == NULL) {
                   12045:    *exc = GDOME_NULL_POINTER_ERR;
                   12046:    return NULL;
                   12047:  }
                   12048:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12049:    *exc = GDOME_INVALID_STATE_ERR;
                   12050:    return NULL;
                   12051:  }
                   12052:  *exc = 0;
1.2     ! paf      12053:  return ((Gdome_xml_Notation *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      12054: }
                   12055: /**
                   12056:  * gdome_not_isSupported:
                   12057:  * @self:  Node Object ref
                   12058:  * @feature:  The name of the feature to test.
                   12059:  * @version:  This is the version number of the feature to test. In Level 2,
                   12060:  *            version 1, this is the string "2.0". If the version is not
                   12061:  *            specified, supporting any version of the feature will cause the
                   12062:  *            method to return %TRUE.
                   12063:  * @exc:  Exception Object ref
                   12064:  *
                   12065:  * Tests whether the DOM implementation implements a specific feature and that
                   12066:  * feature is supported by this node.
                   12067:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   12068:  * otherwise.
                   12069:  */
                   12070: GdomeBoolean
                   12071: gdome_not_isSupported (GdomeNotation *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   12072: {
                   12073:  if (self == NULL) {
                   12074:    *exc = GDOME_NULL_POINTER_ERR;
                   12075:    return FALSE;
                   12076:  }
                   12077:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12078:    *exc = GDOME_INVALID_STATE_ERR;
                   12079:    return FALSE;
                   12080:  }
                   12081:  *exc = 0;
1.2     ! paf      12082:  return ((Gdome_xml_Notation *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      12083: }
                   12084: /**
                   12085:  * gdome_not_normalize:
                   12086:  * @self:  Node Object ref
                   12087:  * @exc:  Exception Object ref
                   12088:  *
                   12089:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   12090:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   12091:  * elements, comments, processing instructions, CDATA sections, and entity
                   12092:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   12093:  * nodes nor empty Text nodes.
                   12094:  */
                   12095: void
                   12096: gdome_not_normalize (GdomeNotation *self, GdomeException *exc)
                   12097: {
                   12098:  if (self == NULL) {
                   12099:    *exc = GDOME_NULL_POINTER_ERR;
                   12100:    return;
                   12101:  }
                   12102:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12103:    *exc = GDOME_INVALID_STATE_ERR;
                   12104:    return;
                   12105:  }
                   12106:  *exc = 0;
1.2     ! paf      12107:  ((Gdome_xml_Notation *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      12108: }
                   12109: /**
                   12110:  * gdome_not_removeChild:
                   12111:  * @self:  Node Object ref
                   12112:  * @oldChild:  The node being removed
                   12113:  * @exc:  Exception Object ref
                   12114:  *
                   12115:  * Removes the child node indicated by @oldChild from the list of children, and
                   12116:  * returns it.
                   12117:  *
                   12118:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   12119:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   12120:  * Returns: the node removed.
                   12121:  */
1.2     ! paf      12122: xmlNode *
        !          12123: gdome_not_removeChild (GdomeNotation *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      12124: {
                   12125:  if (self == NULL) {
                   12126:    *exc = GDOME_NULL_POINTER_ERR;
                   12127:    return NULL;
                   12128:  }
                   12129:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12130:    *exc = GDOME_INVALID_STATE_ERR;
                   12131:    return NULL;
                   12132:  }
                   12133:  *exc = 0;
1.2     ! paf      12134:  return ((Gdome_xml_Notation *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      12135: }
                   12136: /**
                   12137:  * gdome_not_replaceChild:
                   12138:  * @self:  Node Object ref
                   12139:  * @newChild:  The new node to put in the child list
                   12140:  * @oldChild:  The node being replaced in the list
                   12141:  * @exc:  Exception Object ref
                   12142:  *
                   12143:  * Replaces the child node @oldChild with @newChild in the list of children,
                   12144:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   12145:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   12146:  * inserted in the same order. If the @newChild is already in the tree, it is
                   12147:  * first removed.
                   12148:  *
                   12149:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   12150:  * not allow children of the type of the @newChild node, or if the node to put
                   12151:  * in is one of this node's ancestors or this node itself.
                   12152:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   12153:  * document than the one that created this node.
                   12154:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   12155:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   12156:  * Returns: the node replaced.
                   12157:  */
1.2     ! paf      12158: xmlNode *
        !          12159: gdome_not_replaceChild (GdomeNotation *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      12160: {
                   12161:  if (self == NULL) {
                   12162:    *exc = GDOME_NULL_POINTER_ERR;
                   12163:    return NULL;
                   12164:  }
                   12165:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12166:    *exc = GDOME_INVALID_STATE_ERR;
                   12167:    return NULL;
                   12168:  }
                   12169:  *exc = 0;
1.2     ! paf      12170:  return ((Gdome_xml_Notation *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      12171: }
                   12172: /**
                   12173:  * gdome_not_addEventListener:
                   12174:  * @self:  Node Object ref
                   12175:  * @type:  the event type for which the user is registering
                   12176:  * @listener:  the listener parameter takes an interface implemented by the
                   12177:  *             user which contains the methods to be called when the event occurs.
                   12178:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   12179:  *               capture. After initiating capture, all events of the specified
                   12180:  *               type will be dispatched to the registered EventListener before
                   12181:  *               being dispatched to any EventTargets beneath them in the tree.
                   12182:  *               Events which are bubbling upward through the tree will not
                   12183:  *               trigger an EventListener designated to use capture.
                   12184:  * @exc:  Exception Object ref
                   12185:  *
                   12186:  * This method allows the registration of event listeners on the event target.
                   12187:  * If an EventListener is added to an EventTarget while it is processing an
                   12188:  * event, it will not be triggered by the current actions but may be triggered
                   12189:  * during a later stage of event flow, such as the bubbling phase.
                   12190:  * If multiple identical EventListeners are registered on the same EventTarget
                   12191:  * with the same parameters the duplicate instances are discarded. They do not
                   12192:  * cause the EventListener to be called twice and since they are discarded
                   12193:  * they do not need to be removed with the removeEventListener method.
                   12194:  */
                   12195: void
                   12196: gdome_not_addEventListener (GdomeNotation *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   12197: {
                   12198:  if (self == NULL) {
                   12199:    *exc = GDOME_NULL_POINTER_ERR;
                   12200:    return;
                   12201:  }
                   12202:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12203:    *exc = GDOME_INVALID_STATE_ERR;
                   12204:    return;
                   12205:  }
                   12206:  *exc = 0;
1.2     ! paf      12207:  ((Gdome_xml_Notation *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      12208: }
                   12209: /**
                   12210:  * gdome_not_removeEventListener:
                   12211:  * @self:  Node Object ref
                   12212:  * @type:  Specifies the event type of the EventListener being removed.
                   12213:  * @listener:  The EventListener parameter indicates the EventListener to be
                   12214:  *             removed.
                   12215:  * @useCapture:  Specifies whether the EventListener being removed was
                   12216:  *               registered as a capturing listener or not. If a listener was
                   12217:  *               registered twice, one with capture and one without, each must
                   12218:  *               be removed separately. Removal of a capturing listener does
                   12219:  *               not affect a non-capturing version of the same listener, and
                   12220:  *               vice versa.
                   12221:  * @exc:  Exception Object ref
                   12222:  *
                   12223:  * This method allows the removal of event listeners from the event target. If
                   12224:  * an EventListener is removed from an EventTarget while it is processing an
                   12225:  * event, it will not be triggered by the current actions. EventListeners can
                   12226:  * never be invoked after being removed. Calling removeEventListener with
                   12227:  * arguments which do not identify any currently registered EventListener on
                   12228:  * the EventTarget has no effect.
                   12229:  */
                   12230: void
                   12231: gdome_not_removeEventListener (GdomeNotation *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   12232: {
                   12233:  if (self == NULL) {
                   12234:    *exc = GDOME_NULL_POINTER_ERR;
                   12235:    return;
                   12236:  }
                   12237:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12238:    *exc = GDOME_INVALID_STATE_ERR;
                   12239:    return;
                   12240:  }
                   12241:  *exc = 0;
1.2     ! paf      12242:  ((Gdome_xml_Notation *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      12243: }
                   12244: /**
                   12245:  * gdome_not_dispatchEvent:
                   12246:  * @self:  Node Object ref
                   12247:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   12248:  *        used in processing the event.
                   12249:  * @exc:  Exception Object ref
                   12250:  *
                   12251:  * This method allows the dispatch of events into the implementations event
                   12252:  * model. Events dispatched in this manner will have the same capturing and
                   12253:  * bubbling behavior as events dispatched directly by the implementation. The
                   12254:  * target of the event is the EventTarget on which dispatchEvent is called.
                   12255:  *
                   12256:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   12257:  * specified by initializing the event before dispatchEvent was called.
                   12258:  * Specification of the Event's type as %NULL or an empty string will also
                   12259:  * trigger this exception.
                   12260:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   12261:  *          is %TRUE.
                   12262:  */
                   12263: GdomeBoolean
                   12264: gdome_not_dispatchEvent (GdomeNotation *self, GdomeEvent *evt, GdomeException *exc)
                   12265: {
                   12266:  if (self == NULL) {
                   12267:    *exc = GDOME_NULL_POINTER_ERR;
                   12268:    return FALSE;
                   12269:  }
                   12270:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12271:    *exc = GDOME_INVALID_STATE_ERR;
                   12272:    return FALSE;
                   12273:  }
                   12274:  *exc = 0;
1.2     ! paf      12275:  return ((Gdome_xml_Notation *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      12276: }
                   12277: /**
                   12278:  * gdome_not_subTreeDispatchEvent:
                   12279:  * @self:  Node Object ref
                   12280:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   12281:  *        used in processing the event.
                   12282:  * @exc:  Exception Object ref
                   12283:  *
                   12284:  * This method allows the dispatch of events into the implementations event
                   12285:  * model. Events dispatched in this manner will have the same capturing and
                   12286:  * bubbling behavior as events dispatched directly by the implementation. The
                   12287:  * target of the event is any nodes in the subtree of the EventTarget on which
                   12288:  * dispatchEvent is called.
                   12289:  *
                   12290:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   12291:  * specified by initializing the event before dispatchEvent was called.
                   12292:  * Specification of the Event's type as %NULL or an empty string will also
                   12293:  * trigger this exception.
                   12294:  */
                   12295: void
                   12296: gdome_not_subTreeDispatchEvent (GdomeNotation *self, GdomeEvent *evt, GdomeException *exc)
                   12297: {
                   12298:  if (self == NULL) {
                   12299:    *exc = GDOME_NULL_POINTER_ERR;
                   12300:    return;
                   12301:  }
                   12302:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12303:    *exc = GDOME_INVALID_STATE_ERR;
                   12304:    return;
                   12305:  }
                   12306:  *exc = 0;
1.2     ! paf      12307:  ((Gdome_xml_Notation *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      12308: }
                   12309: /**
                   12310:  * gdome_not_canAppend:
                   12311:  * @self:  Node Object ref
                   12312:  * @newChild:  The Node Object ref of the node to test
                   12313:  * @exc:  Exception Object ref
                   12314:  *
                   12315:  * Tests if a @newChild can be added in the child list of this node.
                   12316:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   12317:  */
                   12318: GdomeBoolean
1.2     ! paf      12319: gdome_not_canAppend (GdomeNotation *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      12320: {
                   12321:  if (self == NULL) {
                   12322:    *exc = GDOME_NULL_POINTER_ERR;
                   12323:    return FALSE;
                   12324:  }
                   12325:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12326:    *exc = GDOME_INVALID_STATE_ERR;
                   12327:    return FALSE;
                   12328:  }
                   12329:  *exc = 0;
1.2     ! paf      12330:  return ((Gdome_xml_Notation *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      12331: }
                   12332: 
                   12333: /******************************************************************************
                   12334:           GdomeEntity interface API
                   12335:  ******************************************************************************/
                   12336: /**
                   12337:  * gdome_ent_publicId:
                   12338:  * @self:  The Entity Object ref
                   12339:  * @exc:  The Exception Object ref
                   12340:  *
                   12341:  * Returns: the public identifier associated with the entity, if specified.
                   12342:  * If the public identifier was not specified, this is %NULL.
                   12343:  */
                   12344: GdomeDOMString *
                   12345: gdome_ent_publicId (GdomeEntity *self, GdomeException *exc)
                   12346: {
                   12347:  if (self == NULL) {
                   12348:    *exc = GDOME_NULL_POINTER_ERR;
                   12349:    return NULL;
                   12350:  }
                   12351:  if (((Gdome_xml_Entity *)self)->n == NULL) {
                   12352:    *exc = GDOME_INVALID_STATE_ERR;
                   12353:    return NULL;
                   12354:  }
                   12355:  *exc = 0;
                   12356:  return ((Gdome_xml_Entity *)self)->vtab->publicId (self, exc);
                   12357: }
                   12358: /**
                   12359:  * gdome_ent_systemId:
                   12360:  * @self:  The Entity Object ref
                   12361:  * @exc:  The Exception Object ref
                   12362:  *
                   12363:  * Returns: the system identifier associated with the entity, if specified.
                   12364:  * If the system identifier was not specified, this is %NULL.
                   12365:  */
                   12366: GdomeDOMString *
                   12367: gdome_ent_systemId (GdomeEntity *self, GdomeException *exc)
                   12368: {
                   12369:  if (self == NULL) {
                   12370:    *exc = GDOME_NULL_POINTER_ERR;
                   12371:    return NULL;
                   12372:  }
                   12373:  if (((Gdome_xml_Entity *)self)->n == NULL) {
                   12374:    *exc = GDOME_INVALID_STATE_ERR;
                   12375:    return NULL;
                   12376:  }
                   12377:  *exc = 0;
                   12378:  return ((Gdome_xml_Entity *)self)->vtab->systemId (self, exc);
                   12379: }
                   12380: /**
                   12381:  * gdome_ent_notationName:
                   12382:  * @self:  The Entity Object ref
                   12383:  * @exc:  The Exception Object ref
                   12384:  *
                   12385:  * Returns: for unparsed entities, the name of the notation for the entity.
                   12386:  * For parsed entities, this is %NULL.
                   12387:  */
                   12388: GdomeDOMString *
                   12389: gdome_ent_notationName (GdomeEntity *self, GdomeException *exc)
                   12390: {
                   12391:  if (self == NULL) {
                   12392:    *exc = GDOME_NULL_POINTER_ERR;
                   12393:    return NULL;
                   12394:  }
                   12395:  if (((Gdome_xml_Entity *)self)->n == NULL) {
                   12396:    *exc = GDOME_INVALID_STATE_ERR;
                   12397:    return NULL;
                   12398:  }
                   12399:  *exc = 0;
                   12400:  return ((Gdome_xml_Entity *)self)->vtab->notationName (self, exc);
                   12401: }
                   12402: /**
                   12403:  * gdome_ent_attributes:
                   12404:  * @self:  Node Object ref
                   12405:  * @exc:  Exception Object ref
                   12406:  *
                   12407:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   12408:  * Element) or %NULL otherwise.
                   12409:  */
                   12410: GdomeNamedNodeMap *
                   12411: gdome_ent_attributes (GdomeEntity *self, GdomeException *exc)
                   12412: {
                   12413:  if (self == NULL) {
                   12414:    *exc = GDOME_NULL_POINTER_ERR;
                   12415:    return NULL;
                   12416:  }
                   12417:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12418:    *exc = GDOME_INVALID_STATE_ERR;
                   12419:    return NULL;
                   12420:  }
                   12421:  *exc = 0;
1.2     ! paf      12422:  return ((Gdome_xml_Entity *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      12423: }
                   12424: /**
                   12425:  * gdome_ent_childNodes:
                   12426:  * @self:  Node Object ref
                   12427:  * @exc:  Exception Object ref
                   12428:  *
                   12429:  * Returns: a NodeList that contains all children of this node. If there are no
                   12430:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   12431:  * not considered to be children of element nodes - use gdome_n_attributes to
                   12432:  * obtain the attributes.
                   12433:  */
                   12434: GdomeNodeList *
                   12435: gdome_ent_childNodes (GdomeEntity *self, GdomeException *exc)
                   12436: {
                   12437:  if (self == NULL) {
                   12438:    *exc = GDOME_NULL_POINTER_ERR;
                   12439:    return NULL;
                   12440:  }
                   12441:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12442:    *exc = GDOME_INVALID_STATE_ERR;
                   12443:    return NULL;
                   12444:  }
                   12445:  *exc = 0;
1.2     ! paf      12446:  return ((Gdome_xml_Entity *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      12447: }
                   12448: /**
                   12449:  * gdome_ent_firstChild:
                   12450:  * @self:  Node Object ref
                   12451:  * @exc:  Exception Object ref
                   12452:  * 
                   12453:  * Returns: the first child of this node. If there is no such node,
                   12454:  * this returns %NULL.
                   12455:  */
1.2     ! paf      12456: xmlNode *
1.1       paf      12457: gdome_ent_firstChild (GdomeEntity *self, GdomeException *exc)
                   12458: {
                   12459:  if (self == NULL) {
                   12460:    *exc = GDOME_NULL_POINTER_ERR;
                   12461:    return NULL;
                   12462:  }
                   12463:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12464:    *exc = GDOME_INVALID_STATE_ERR;
                   12465:    return NULL;
                   12466:  }
                   12467:  *exc = 0;
1.2     ! paf      12468:  return ((Gdome_xml_Entity *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      12469: }
                   12470: /**
                   12471:  * gdome_ent_lastChild:
                   12472:  * @self:  Node Object ref
                   12473:  * @exc:  Exception Object ref
                   12474:  *
                   12475:  * Returns: the last child of this node. If there is no such node,
                   12476:  * this returns %NULL.
                   12477:  */
1.2     ! paf      12478: xmlNode *
1.1       paf      12479: gdome_ent_lastChild (GdomeEntity *self, GdomeException *exc)
                   12480: {
                   12481:  if (self == NULL) {
                   12482:    *exc = GDOME_NULL_POINTER_ERR;
                   12483:    return NULL;
                   12484:  }
                   12485:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12486:    *exc = GDOME_INVALID_STATE_ERR;
                   12487:    return NULL;
                   12488:  }
                   12489:  *exc = 0;
1.2     ! paf      12490:  return ((Gdome_xml_Entity *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      12491: }
                   12492: /**
                   12493:  * gdome_ent_localName:
                   12494:  * @self:  Node Objects ref
                   12495:  * @exc:  Exception Object ref
                   12496:  *
                   12497:  * Returns: the local part of the qualified name of this node.
                   12498:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   12499:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   12500:  * always %NULL.
                   12501:  */
                   12502: GdomeDOMString *
                   12503: gdome_ent_localName (GdomeEntity *self, GdomeException *exc)
                   12504: {
                   12505:  if (self == NULL) {
                   12506:    *exc = GDOME_NULL_POINTER_ERR;
                   12507:    return NULL;
                   12508:  }
                   12509:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12510:    *exc = GDOME_INVALID_STATE_ERR;
                   12511:    return NULL;
                   12512:  }
                   12513:  *exc = 0;
1.2     ! paf      12514:  return ((Gdome_xml_Entity *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      12515: }
                   12516: /**
                   12517:  * gdome_ent_namespaceURI:
                   12518:  * @self:  Node Objects ref
                   12519:  * @exc:  Exception Object ref
                   12520:  *
                   12521:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   12522:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   12523:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   12524:  * always %NULL.
                   12525:  */
                   12526: GdomeDOMString *
                   12527: gdome_ent_namespaceURI (GdomeEntity *self, GdomeException *exc)
                   12528: {
                   12529:  if (self == NULL) {
                   12530:    *exc = GDOME_NULL_POINTER_ERR;
                   12531:    return NULL;
                   12532:  }
                   12533:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12534:    *exc = GDOME_INVALID_STATE_ERR;
                   12535:    return NULL;
                   12536:  }
                   12537:  *exc = 0;
1.2     ! paf      12538:  return ((Gdome_xml_Entity *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      12539: }
                   12540: /**
                   12541:  * gdome_ent_nextSibling:
                   12542:  * @self:  Node Object ref
                   12543:  * @exc:  Exception Object ref
                   12544:  *
                   12545:  * Returns: the node immediately following this node. If there is no such
                   12546:  * node, this returns %NULL.
                   12547:  */
1.2     ! paf      12548: xmlNode *
1.1       paf      12549: gdome_ent_nextSibling (GdomeEntity *self, GdomeException *exc)
                   12550: {
                   12551:  if (self == NULL) {
                   12552:    *exc = GDOME_NULL_POINTER_ERR;
                   12553:    return NULL;
                   12554:  }
                   12555:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12556:    *exc = GDOME_INVALID_STATE_ERR;
                   12557:    return NULL;
                   12558:  }
                   12559:  *exc = 0;
1.2     ! paf      12560:  return ((Gdome_xml_Entity *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      12561: }
                   12562: /**
                   12563:  * gdome_ent_nodeName:
                   12564:  * @self:  Node Object ref
                   12565:  * @exc:  Exception Object ref
                   12566:  *
                   12567:  * Returns: the name of this node, depending on its type.
                   12568:  */
                   12569: GdomeDOMString *
                   12570: gdome_ent_nodeName (GdomeEntity *self, GdomeException *exc)
                   12571: {
                   12572:  if (self == NULL) {
                   12573:    *exc = GDOME_NULL_POINTER_ERR;
                   12574:    return NULL;
                   12575:  }
                   12576:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12577:    *exc = GDOME_INVALID_STATE_ERR;
                   12578:    return NULL;
                   12579:  }
                   12580:  *exc = 0;
1.2     ! paf      12581:  return ((Gdome_xml_Entity *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      12582: }
                   12583: /**
                   12584:  * gdome_ent_nodeType:
                   12585:  * @self:  Node Object ref
                   12586:  * @exc:  Exception Object ref
                   12587:  *
                   12588:  * Returns: an integer bigger than %0 representing the type of the underlying
                   12589:  * object or %0 on error.
                   12590:  */
                   12591: unsigned short
                   12592: gdome_ent_nodeType (GdomeEntity *self, GdomeException *exc)
                   12593: {
                   12594:  if (self == NULL) {
                   12595:    *exc = GDOME_NULL_POINTER_ERR;
                   12596:    return 0;
                   12597:  }
                   12598:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12599:    *exc = GDOME_INVALID_STATE_ERR;
                   12600:    return 0;
                   12601:  }
                   12602:  *exc = 0;
1.2     ! paf      12603:  return ((Gdome_xml_Entity *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      12604: }
                   12605: /**
                   12606:  * gdome_ent_nodeValue:
                   12607:  * @self:  Node Object ref
                   12608:  * @exc:  Exception Object ref
                   12609:  *
                   12610:  * Returns: the value of this node, depending on its type.
                   12611:  */
                   12612: GdomeDOMString *
                   12613: gdome_ent_nodeValue (GdomeEntity *self, GdomeException *exc)
                   12614: {
                   12615:  if (self == NULL) {
                   12616:    *exc = GDOME_NULL_POINTER_ERR;
                   12617:    return NULL;
                   12618:  }
                   12619:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12620:    *exc = GDOME_INVALID_STATE_ERR;
                   12621:    return NULL;
                   12622:  }
                   12623:  *exc = 0;
1.2     ! paf      12624:  return ((Gdome_xml_Entity *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      12625: }
                   12626: /**
                   12627:  * gdome_ent_set_nodeValue:
                   12628:  * @self:  Node Object ref
                   12629:  * @nodeValue:  The new value for this node.
                   12630:  * @exc:  Exception Object ref
                   12631:  *
                   12632:  * Sets The value of this node, depending on its type.
                   12633:  *
                   12634:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   12635:  */
                   12636: void
                   12637: gdome_ent_set_nodeValue (GdomeEntity *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   12638: {
                   12639:  if (self == NULL) {
                   12640:    *exc = GDOME_NULL_POINTER_ERR;
                   12641:    return;
                   12642:  }
                   12643:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12644:    *exc = GDOME_INVALID_STATE_ERR;
                   12645:    return;
                   12646:  }
                   12647:  *exc = 0;
1.2     ! paf      12648:  ((Gdome_xml_Entity *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      12649: }
                   12650: /**
                   12651:  * gdome_ent_ownerDocument:
                   12652:  * @self:  Node Objects ref
                   12653:  * @exc:  Exception Object ref
                   12654:  *
                   12655:  * Returns: the documment object associated with this node. This is also the
                   12656:  * Document object used to create new nodes. When this node is a Document or a
                   12657:  * DocumentType which is not used with any Document yet, this is %NULL.
                   12658:  */
                   12659: GdomeDocument *
                   12660: gdome_ent_ownerDocument (GdomeEntity *self, GdomeException *exc)
                   12661: {
                   12662:  if (self == NULL) {
                   12663:    *exc = GDOME_NULL_POINTER_ERR;
                   12664:    return NULL;
                   12665:  }
                   12666:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12667:    *exc = GDOME_INVALID_STATE_ERR;
                   12668:    return NULL;
                   12669:  }
                   12670:  *exc = 0;
1.2     ! paf      12671:  return ((Gdome_xml_Entity *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      12672: }
                   12673: /**
                   12674:  * gdome_ent_parentNode:
                   12675:  * @self: Node Object ref
                   12676:  * @exc: Exception Object ref
                   12677:  *
                   12678:  * Returns: the parent of this node. All nodes, except Attr,
                   12679:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   12680:  * if a node has just been created and not yet added to the tree, or if it has
                   12681:  * been removed from the tree, this is %NULL.
                   12682:  */
1.2     ! paf      12683: xmlNode *
1.1       paf      12684: gdome_ent_parentNode (GdomeEntity *self, GdomeException *exc)
                   12685: {
                   12686:  if (self == NULL) {
                   12687:    *exc = GDOME_NULL_POINTER_ERR;
                   12688:    return NULL;
                   12689:  }
                   12690:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12691:    *exc = GDOME_INVALID_STATE_ERR;
                   12692:    return NULL;
                   12693:  }
                   12694:  *exc = 0;
1.2     ! paf      12695:  return ((Gdome_xml_Entity *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      12696: }
                   12697: /**
                   12698:  * gdome_ent_prefix:
                   12699:  * @self:  Node Objects ref
                   12700:  * @exc:  Exception Object ref
                   12701:  *
                   12702:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   12703:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   12704:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   12705:  * always %NULL.
                   12706:  */
                   12707: GdomeDOMString *
                   12708: gdome_ent_prefix (GdomeEntity *self, GdomeException *exc)
                   12709: {
                   12710:  if (self == NULL) {
                   12711:    *exc = GDOME_NULL_POINTER_ERR;
                   12712:    return NULL;
                   12713:  }
                   12714:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12715:    *exc = GDOME_INVALID_STATE_ERR;
                   12716:    return NULL;
                   12717:  }
                   12718:  *exc = 0;
1.2     ! paf      12719:  return ((Gdome_xml_Entity *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      12720: }
                   12721: /**
                   12722:  * gdome_ent_set_prefix:
                   12723:  * @self:  Node Object ref
                   12724:  * @prefix:  The new prefix for this node.
                   12725:  * @exc:  Exception Object ref
                   12726:  *
                   12727:  * Sets a new nemaspace prefix for this node.
                   12728:  *
                   12729:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   12730:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   12731:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   12732:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   12733:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   12734:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   12735:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   12736:  * an attribute and the qualifiedName of this node is "xmlns".
                   12737:  */
                   12738: void
                   12739: gdome_ent_set_prefix (GdomeEntity *self, GdomeDOMString *prefix, GdomeException *exc)
                   12740: {
                   12741:  if (self == NULL) {
                   12742:    *exc = GDOME_NULL_POINTER_ERR;
                   12743:    return;
                   12744:  }
                   12745:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12746:    *exc = GDOME_INVALID_STATE_ERR;
                   12747:    return;
                   12748:  }
                   12749:  *exc = 0;
1.2     ! paf      12750:  ((Gdome_xml_Entity *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      12751: }
                   12752: /**
                   12753:  * gdome_ent_previousSibling:
                   12754:  * @self:  Node Object ref
                   12755:  * @exc:  Exception Object ref
                   12756:  *
                   12757:  * Returns: the node immediately preceding this node. If there is no such
                   12758:  * node, this returns %NULL.
                   12759:  */
1.2     ! paf      12760: xmlNode *
1.1       paf      12761: gdome_ent_previousSibling (GdomeEntity *self, GdomeException *exc)
                   12762: {
                   12763:  if (self == NULL) {
                   12764:    *exc = GDOME_NULL_POINTER_ERR;
                   12765:    return NULL;
                   12766:  }
                   12767:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12768:    *exc = GDOME_INVALID_STATE_ERR;
                   12769:    return NULL;
                   12770:  }
                   12771:  *exc = 0;
1.2     ! paf      12772:  return ((Gdome_xml_Entity *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      12773: }
                   12774: /**
                   12775:  * gdome_ent_ref:
                   12776:  * @self:  Node Object ref
                   12777:  * @exc:  Exception Object ref
                   12778:  *
                   12779:  * Increase the reference count of the specified Node.
                   12780:  */
                   12781: void
                   12782: gdome_ent_ref (GdomeEntity *self, GdomeException *exc)
                   12783: {
                   12784:  if (self == NULL) {
                   12785:    *exc = GDOME_NULL_POINTER_ERR;
                   12786:    return;
                   12787:  }
                   12788:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12789:    *exc = GDOME_INVALID_STATE_ERR;
                   12790:    return;
                   12791:  }
                   12792:  *exc = 0;
1.2     ! paf      12793:  ((Gdome_xml_Entity *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      12794: }
                   12795: /**
                   12796:  * gdome_ent_unref:
                   12797:  * @self:  Node Object ref
                   12798:  * @exc:  Exception Object ref
                   12799:  *
                   12800:  * Decrease the reference count of the specified Node. Free the Node structure
                   12801:  * if the Node will have zero reference.
                   12802:  */
                   12803: void
                   12804: gdome_ent_unref (GdomeEntity *self, GdomeException *exc)
                   12805: {
                   12806:  if (self == NULL) {
                   12807:    *exc = GDOME_NULL_POINTER_ERR;
                   12808:    return;
                   12809:  }
                   12810:  *exc = 0;
                   12811:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12812:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   12813:      ((Gdome_xml_Node *)self)->refcnt--;
                   12814: 
                   12815:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   12816: #ifdef DEBUG_REFCNT
                   12817:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   12818: #endif
                   12819:      g_free (self);
                   12820:    }
                   12821:    return;
                   12822:  }
1.2     ! paf      12823:  ((Gdome_xml_Entity *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      12824: }
                   12825: /**
                   12826:  * gdome_ent_query_interface:
                   12827:  * @self:  Node Object ref
                   12828:  * @interface:  interface needed
                   12829:  * @exc:  Exception Object ref
                   12830:  *
                   12831:  * Returns: a reference to this object that implements the @interface needed,
                   12832:  *          or %NULL if the @interface is not supported by this Object.
                   12833:  */
                   12834: gpointer
                   12835: gdome_ent_query_interface (GdomeEntity *self, const char *interface, GdomeException *exc)
                   12836: {
                   12837:  if (self == NULL) {
                   12838:    *exc = GDOME_NULL_POINTER_ERR;
                   12839:    return NULL;
                   12840:  }
                   12841:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12842:    *exc = GDOME_INVALID_STATE_ERR;
                   12843:    return NULL;
                   12844:  }
                   12845:  *exc = 0;
1.2     ! paf      12846:  return ((Gdome_xml_Entity *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      12847: }
                   12848: /**
                   12849:  * gdome_ent_appendChild:
                   12850:  * @self:  Node Object ref
                   12851:  * @newChild:  The node to add
                   12852:  * @exc:  Exception Object ref
                   12853:  *
                   12854:  * Adds the node @newChild to the end of the list of children of this node.
                   12855:  * If the @newChild is already in the tree, it is first removed. If it is a
                   12856:  * DocumentFragment node, the entire contents of the document fragment are
                   12857:  * moved into the child list of this node
                   12858:  *
                   12859:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   12860:  * allow children of the type of the @newChild node, or if the node to append is
                   12861:  * one of this node's ancestors or this node itself.
                   12862:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   12863:  * document than the one that created this node.
                   12864:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   12865:  * Returns: the node added.
                   12866:  */
1.2     ! paf      12867: xmlNode *
        !          12868: gdome_ent_appendChild (GdomeEntity *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      12869: {
                   12870:  if (self == NULL) {
                   12871:    *exc = GDOME_NULL_POINTER_ERR;
                   12872:    return NULL;
                   12873:  }
                   12874:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12875:    *exc = GDOME_INVALID_STATE_ERR;
                   12876:    return NULL;
                   12877:  }
                   12878:  *exc = 0;
1.2     ! paf      12879:  return ((Gdome_xml_Entity *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      12880: }
                   12881: /**
                   12882:  * gdome_ent_cloneNode:
                   12883:  * @self:  Node Object ref
                   12884:  * @deep:  If true, recursively clone the subtree under the specified node;
                   12885:  *         if false, clone only the node itself (and its attributes, if it is
                   12886:  *         an Element).
                   12887:  * @exc:  Exception Object ref
                   12888:  *
                   12889:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   12890:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   12891:  * %NULL).
                   12892:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   12893:  * nodes are not supported.
                   12894:  *
                   12895:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   12896:  * supported.
                   12897:  * Returns: the duplicate node.
                   12898:  */
1.2     ! paf      12899: xmlNode *
1.1       paf      12900: gdome_ent_cloneNode (GdomeEntity *self, GdomeBoolean deep, GdomeException *exc)
                   12901: {
                   12902:  if (self == NULL) {
                   12903:    *exc = GDOME_NULL_POINTER_ERR;
                   12904:    return NULL;
                   12905:  }
                   12906:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12907:    *exc = GDOME_INVALID_STATE_ERR;
                   12908:    return NULL;
                   12909:  }
                   12910:  *exc = 0;
1.2     ! paf      12911:  return ((Gdome_xml_Entity *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      12912: }
                   12913: /**
                   12914:  * gdome_ent_hasAttributes:
                   12915:  * @self:  Node Object ref
                   12916:  * @exc:  Exception Object ref
                   12917:  *
                   12918:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   12919:  */
                   12920: GdomeBoolean
                   12921: gdome_ent_hasAttributes (GdomeEntity *self, GdomeException *exc)
                   12922: {
                   12923:  if (self == NULL) {
                   12924:    *exc = GDOME_NULL_POINTER_ERR;
                   12925:    return FALSE;
                   12926:  }
                   12927:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12928:    *exc = GDOME_INVALID_STATE_ERR;
                   12929:    return FALSE;
                   12930:  }
                   12931:  *exc = 0;
1.2     ! paf      12932:  return ((Gdome_xml_Entity *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      12933: }
                   12934: /**
                   12935:  * gdome_ent_hasChildNodes:
                   12936:  * @self:  Node Object ref
                   12937:  * @exc:  Exception Object ref
                   12938:  *
                   12939:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   12940:  */
                   12941: GdomeBoolean
                   12942: gdome_ent_hasChildNodes (GdomeEntity *self, GdomeException *exc)
                   12943: {
                   12944:  if (self == NULL) {
                   12945:    *exc = GDOME_NULL_POINTER_ERR;
                   12946:    return FALSE;
                   12947:  }
                   12948:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12949:    *exc = GDOME_INVALID_STATE_ERR;
                   12950:    return FALSE;
                   12951:  }
                   12952:  *exc = 0;
1.2     ! paf      12953:  return ((Gdome_xml_Entity *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      12954: }
                   12955: /**
                   12956:  * gdome_ent_insertBefore:
                   12957:  * @self:  Node Object ref
                   12958:  * @newChild:  The new node to put in the child list
                   12959:  * @refChild:  the reference node, i.e., the node before which the new node
                   12960:  *             must be inserted.
                   12961:  * @exc:  Exception Object ref
                   12962:  *
                   12963:  * Inserts the node @newChild before the existing child node @refChild. If
                   12964:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   12965:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   12966:  * in the same order, before @refChild. If the @newChild is already in the
                   12967:  * tree, it is first removed.
                   12968:  *
                   12969:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   12970:  * allow children of the type of the @newChild node, or if the node to insert is
                   12971:  * one of this node's ancestors or this node itself.
                   12972:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   12973:  * document than the one that created this node.
                   12974:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   12975:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   12976:  * Returns: the node being inserted.
                   12977:  */
1.2     ! paf      12978: xmlNode *
        !          12979: gdome_ent_insertBefore (GdomeEntity *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      12980: {
                   12981:  if (self == NULL) {
                   12982:    *exc = GDOME_NULL_POINTER_ERR;
                   12983:    return NULL;
                   12984:  }
                   12985:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   12986:    *exc = GDOME_INVALID_STATE_ERR;
                   12987:    return NULL;
                   12988:  }
                   12989:  *exc = 0;
1.2     ! paf      12990:  return ((Gdome_xml_Entity *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      12991: }
                   12992: /**
                   12993:  * gdome_ent_isSupported:
                   12994:  * @self:  Node Object ref
                   12995:  * @feature:  The name of the feature to test.
                   12996:  * @version:  This is the version number of the feature to test. In Level 2,
                   12997:  *            version 1, this is the string "2.0". If the version is not
                   12998:  *            specified, supporting any version of the feature will cause the
                   12999:  *            method to return %TRUE.
                   13000:  * @exc:  Exception Object ref
                   13001:  *
                   13002:  * Tests whether the DOM implementation implements a specific feature and that
                   13003:  * feature is supported by this node.
                   13004:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   13005:  * otherwise.
                   13006:  */
                   13007: GdomeBoolean
                   13008: gdome_ent_isSupported (GdomeEntity *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   13009: {
                   13010:  if (self == NULL) {
                   13011:    *exc = GDOME_NULL_POINTER_ERR;
                   13012:    return FALSE;
                   13013:  }
                   13014:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13015:    *exc = GDOME_INVALID_STATE_ERR;
                   13016:    return FALSE;
                   13017:  }
                   13018:  *exc = 0;
1.2     ! paf      13019:  return ((Gdome_xml_Entity *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      13020: }
                   13021: /**
                   13022:  * gdome_ent_normalize:
                   13023:  * @self:  Node Object ref
                   13024:  * @exc:  Exception Object ref
                   13025:  *
                   13026:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   13027:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   13028:  * elements, comments, processing instructions, CDATA sections, and entity
                   13029:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   13030:  * nodes nor empty Text nodes.
                   13031:  */
                   13032: void
                   13033: gdome_ent_normalize (GdomeEntity *self, GdomeException *exc)
                   13034: {
                   13035:  if (self == NULL) {
                   13036:    *exc = GDOME_NULL_POINTER_ERR;
                   13037:    return;
                   13038:  }
                   13039:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13040:    *exc = GDOME_INVALID_STATE_ERR;
                   13041:    return;
                   13042:  }
                   13043:  *exc = 0;
1.2     ! paf      13044:  ((Gdome_xml_Entity *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      13045: }
                   13046: /**
                   13047:  * gdome_ent_removeChild:
                   13048:  * @self:  Node Object ref
                   13049:  * @oldChild:  The node being removed
                   13050:  * @exc:  Exception Object ref
                   13051:  *
                   13052:  * Removes the child node indicated by @oldChild from the list of children, and
                   13053:  * returns it.
                   13054:  *
                   13055:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   13056:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   13057:  * Returns: the node removed.
                   13058:  */
1.2     ! paf      13059: xmlNode *
        !          13060: gdome_ent_removeChild (GdomeEntity *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      13061: {
                   13062:  if (self == NULL) {
                   13063:    *exc = GDOME_NULL_POINTER_ERR;
                   13064:    return NULL;
                   13065:  }
                   13066:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13067:    *exc = GDOME_INVALID_STATE_ERR;
                   13068:    return NULL;
                   13069:  }
                   13070:  *exc = 0;
1.2     ! paf      13071:  return ((Gdome_xml_Entity *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      13072: }
                   13073: /**
                   13074:  * gdome_ent_replaceChild:
                   13075:  * @self:  Node Object ref
                   13076:  * @newChild:  The new node to put in the child list
                   13077:  * @oldChild:  The node being replaced in the list
                   13078:  * @exc:  Exception Object ref
                   13079:  *
                   13080:  * Replaces the child node @oldChild with @newChild in the list of children,
                   13081:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   13082:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   13083:  * inserted in the same order. If the @newChild is already in the tree, it is
                   13084:  * first removed.
                   13085:  *
                   13086:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   13087:  * not allow children of the type of the @newChild node, or if the node to put
                   13088:  * in is one of this node's ancestors or this node itself.
                   13089:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   13090:  * document than the one that created this node.
                   13091:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   13092:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   13093:  * Returns: the node replaced.
                   13094:  */
1.2     ! paf      13095: xmlNode *
        !          13096: gdome_ent_replaceChild (GdomeEntity *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      13097: {
                   13098:  if (self == NULL) {
                   13099:    *exc = GDOME_NULL_POINTER_ERR;
                   13100:    return NULL;
                   13101:  }
                   13102:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13103:    *exc = GDOME_INVALID_STATE_ERR;
                   13104:    return NULL;
                   13105:  }
                   13106:  *exc = 0;
1.2     ! paf      13107:  return ((Gdome_xml_Entity *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      13108: }
                   13109: /**
                   13110:  * gdome_ent_addEventListener:
                   13111:  * @self:  Node Object ref
                   13112:  * @type:  the event type for which the user is registering
                   13113:  * @listener:  the listener parameter takes an interface implemented by the
                   13114:  *             user which contains the methods to be called when the event occurs.
                   13115:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   13116:  *               capture. After initiating capture, all events of the specified
                   13117:  *               type will be dispatched to the registered EventListener before
                   13118:  *               being dispatched to any EventTargets beneath them in the tree.
                   13119:  *               Events which are bubbling upward through the tree will not
                   13120:  *               trigger an EventListener designated to use capture.
                   13121:  * @exc:  Exception Object ref
                   13122:  *
                   13123:  * This method allows the registration of event listeners on the event target.
                   13124:  * If an EventListener is added to an EventTarget while it is processing an
                   13125:  * event, it will not be triggered by the current actions but may be triggered
                   13126:  * during a later stage of event flow, such as the bubbling phase.
                   13127:  * If multiple identical EventListeners are registered on the same EventTarget
                   13128:  * with the same parameters the duplicate instances are discarded. They do not
                   13129:  * cause the EventListener to be called twice and since they are discarded
                   13130:  * they do not need to be removed with the removeEventListener method.
                   13131:  */
                   13132: void
                   13133: gdome_ent_addEventListener (GdomeEntity *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   13134: {
                   13135:  if (self == NULL) {
                   13136:    *exc = GDOME_NULL_POINTER_ERR;
                   13137:    return;
                   13138:  }
                   13139:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13140:    *exc = GDOME_INVALID_STATE_ERR;
                   13141:    return;
                   13142:  }
                   13143:  *exc = 0;
1.2     ! paf      13144:  ((Gdome_xml_Entity *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      13145: }
                   13146: /**
                   13147:  * gdome_ent_removeEventListener:
                   13148:  * @self:  Node Object ref
                   13149:  * @type:  Specifies the event type of the EventListener being removed.
                   13150:  * @listener:  The EventListener parameter indicates the EventListener to be
                   13151:  *             removed.
                   13152:  * @useCapture:  Specifies whether the EventListener being removed was
                   13153:  *               registered as a capturing listener or not. If a listener was
                   13154:  *               registered twice, one with capture and one without, each must
                   13155:  *               be removed separately. Removal of a capturing listener does
                   13156:  *               not affect a non-capturing version of the same listener, and
                   13157:  *               vice versa.
                   13158:  * @exc:  Exception Object ref
                   13159:  *
                   13160:  * This method allows the removal of event listeners from the event target. If
                   13161:  * an EventListener is removed from an EventTarget while it is processing an
                   13162:  * event, it will not be triggered by the current actions. EventListeners can
                   13163:  * never be invoked after being removed. Calling removeEventListener with
                   13164:  * arguments which do not identify any currently registered EventListener on
                   13165:  * the EventTarget has no effect.
                   13166:  */
                   13167: void
                   13168: gdome_ent_removeEventListener (GdomeEntity *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   13169: {
                   13170:  if (self == NULL) {
                   13171:    *exc = GDOME_NULL_POINTER_ERR;
                   13172:    return;
                   13173:  }
                   13174:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13175:    *exc = GDOME_INVALID_STATE_ERR;
                   13176:    return;
                   13177:  }
                   13178:  *exc = 0;
1.2     ! paf      13179:  ((Gdome_xml_Entity *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      13180: }
                   13181: /**
                   13182:  * gdome_ent_dispatchEvent:
                   13183:  * @self:  Node Object ref
                   13184:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   13185:  *        used in processing the event.
                   13186:  * @exc:  Exception Object ref
                   13187:  *
                   13188:  * This method allows the dispatch of events into the implementations event
                   13189:  * model. Events dispatched in this manner will have the same capturing and
                   13190:  * bubbling behavior as events dispatched directly by the implementation. The
                   13191:  * target of the event is the EventTarget on which dispatchEvent is called.
                   13192:  *
                   13193:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   13194:  * specified by initializing the event before dispatchEvent was called.
                   13195:  * Specification of the Event's type as %NULL or an empty string will also
                   13196:  * trigger this exception.
                   13197:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   13198:  *          is %TRUE.
                   13199:  */
                   13200: GdomeBoolean
                   13201: gdome_ent_dispatchEvent (GdomeEntity *self, GdomeEvent *evt, GdomeException *exc)
                   13202: {
                   13203:  if (self == NULL) {
                   13204:    *exc = GDOME_NULL_POINTER_ERR;
                   13205:    return FALSE;
                   13206:  }
                   13207:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13208:    *exc = GDOME_INVALID_STATE_ERR;
                   13209:    return FALSE;
                   13210:  }
                   13211:  *exc = 0;
1.2     ! paf      13212:  return ((Gdome_xml_Entity *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      13213: }
                   13214: /**
                   13215:  * gdome_ent_subTreeDispatchEvent:
                   13216:  * @self:  Node Object ref
                   13217:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   13218:  *        used in processing the event.
                   13219:  * @exc:  Exception Object ref
                   13220:  *
                   13221:  * This method allows the dispatch of events into the implementations event
                   13222:  * model. Events dispatched in this manner will have the same capturing and
                   13223:  * bubbling behavior as events dispatched directly by the implementation. The
                   13224:  * target of the event is any nodes in the subtree of the EventTarget on which
                   13225:  * dispatchEvent is called.
                   13226:  *
                   13227:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   13228:  * specified by initializing the event before dispatchEvent was called.
                   13229:  * Specification of the Event's type as %NULL or an empty string will also
                   13230:  * trigger this exception.
                   13231:  */
                   13232: void
                   13233: gdome_ent_subTreeDispatchEvent (GdomeEntity *self, GdomeEvent *evt, GdomeException *exc)
                   13234: {
                   13235:  if (self == NULL) {
                   13236:    *exc = GDOME_NULL_POINTER_ERR;
                   13237:    return;
                   13238:  }
                   13239:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13240:    *exc = GDOME_INVALID_STATE_ERR;
                   13241:    return;
                   13242:  }
                   13243:  *exc = 0;
1.2     ! paf      13244:  ((Gdome_xml_Entity *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      13245: }
                   13246: /**
                   13247:  * gdome_ent_canAppend:
                   13248:  * @self:  Node Object ref
                   13249:  * @newChild:  The Node Object ref of the node to test
                   13250:  * @exc:  Exception Object ref
                   13251:  *
                   13252:  * Tests if a @newChild can be added in the child list of this node.
                   13253:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   13254:  */
                   13255: GdomeBoolean
1.2     ! paf      13256: gdome_ent_canAppend (GdomeEntity *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      13257: {
                   13258:  if (self == NULL) {
                   13259:    *exc = GDOME_NULL_POINTER_ERR;
                   13260:    return FALSE;
                   13261:  }
                   13262:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13263:    *exc = GDOME_INVALID_STATE_ERR;
                   13264:    return FALSE;
                   13265:  }
                   13266:  *exc = 0;
1.2     ! paf      13267:  return ((Gdome_xml_Entity *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      13268: }
                   13269: 
                   13270: /******************************************************************************
                   13271:           GdomeEntityReference interface API
                   13272:  ******************************************************************************/
                   13273: /**
                   13274:  * gdome_er_attributes:
                   13275:  * @self:  Node Object ref
                   13276:  * @exc:  Exception Object ref
                   13277:  *
                   13278:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   13279:  * Element) or %NULL otherwise.
                   13280:  */
                   13281: GdomeNamedNodeMap *
                   13282: gdome_er_attributes (GdomeEntityReference *self, GdomeException *exc)
                   13283: {
                   13284:  if (self == NULL) {
                   13285:    *exc = GDOME_NULL_POINTER_ERR;
                   13286:    return NULL;
                   13287:  }
                   13288:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13289:    *exc = GDOME_INVALID_STATE_ERR;
                   13290:    return NULL;
                   13291:  }
                   13292:  *exc = 0;
1.2     ! paf      13293:  return ((Gdome_xml_EntityReference *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      13294: }
                   13295: /**
                   13296:  * gdome_er_childNodes:
                   13297:  * @self:  Node Object ref
                   13298:  * @exc:  Exception Object ref
                   13299:  *
                   13300:  * Returns: a NodeList that contains all children of this node. If there are no
                   13301:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   13302:  * not considered to be children of element nodes - use gdome_n_attributes to
                   13303:  * obtain the attributes.
                   13304:  */
                   13305: GdomeNodeList *
                   13306: gdome_er_childNodes (GdomeEntityReference *self, GdomeException *exc)
                   13307: {
                   13308:  if (self == NULL) {
                   13309:    *exc = GDOME_NULL_POINTER_ERR;
                   13310:    return NULL;
                   13311:  }
                   13312:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13313:    *exc = GDOME_INVALID_STATE_ERR;
                   13314:    return NULL;
                   13315:  }
                   13316:  *exc = 0;
1.2     ! paf      13317:  return ((Gdome_xml_EntityReference *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      13318: }
                   13319: /**
                   13320:  * gdome_er_firstChild:
                   13321:  * @self:  Node Object ref
                   13322:  * @exc:  Exception Object ref
                   13323:  * 
                   13324:  * Returns: the first child of this node. If there is no such node,
                   13325:  * this returns %NULL.
                   13326:  */
1.2     ! paf      13327: xmlNode *
1.1       paf      13328: gdome_er_firstChild (GdomeEntityReference *self, GdomeException *exc)
                   13329: {
                   13330:  if (self == NULL) {
                   13331:    *exc = GDOME_NULL_POINTER_ERR;
                   13332:    return NULL;
                   13333:  }
                   13334:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13335:    *exc = GDOME_INVALID_STATE_ERR;
                   13336:    return NULL;
                   13337:  }
                   13338:  *exc = 0;
1.2     ! paf      13339:  return ((Gdome_xml_EntityReference *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      13340: }
                   13341: /**
                   13342:  * gdome_er_lastChild:
                   13343:  * @self:  Node Object ref
                   13344:  * @exc:  Exception Object ref
                   13345:  *
                   13346:  * Returns: the last child of this node. If there is no such node,
                   13347:  * this returns %NULL.
                   13348:  */
1.2     ! paf      13349: xmlNode *
1.1       paf      13350: gdome_er_lastChild (GdomeEntityReference *self, GdomeException *exc)
                   13351: {
                   13352:  if (self == NULL) {
                   13353:    *exc = GDOME_NULL_POINTER_ERR;
                   13354:    return NULL;
                   13355:  }
                   13356:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13357:    *exc = GDOME_INVALID_STATE_ERR;
                   13358:    return NULL;
                   13359:  }
                   13360:  *exc = 0;
1.2     ! paf      13361:  return ((Gdome_xml_EntityReference *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      13362: }
                   13363: /**
                   13364:  * gdome_er_localName:
                   13365:  * @self:  Node Objects ref
                   13366:  * @exc:  Exception Object ref
                   13367:  *
                   13368:  * Returns: the local part of the qualified name of this node.
                   13369:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   13370:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   13371:  * always %NULL.
                   13372:  */
                   13373: GdomeDOMString *
                   13374: gdome_er_localName (GdomeEntityReference *self, GdomeException *exc)
                   13375: {
                   13376:  if (self == NULL) {
                   13377:    *exc = GDOME_NULL_POINTER_ERR;
                   13378:    return NULL;
                   13379:  }
                   13380:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13381:    *exc = GDOME_INVALID_STATE_ERR;
                   13382:    return NULL;
                   13383:  }
                   13384:  *exc = 0;
1.2     ! paf      13385:  return ((Gdome_xml_EntityReference *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      13386: }
                   13387: /**
                   13388:  * gdome_er_namespaceURI:
                   13389:  * @self:  Node Objects ref
                   13390:  * @exc:  Exception Object ref
                   13391:  *
                   13392:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   13393:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   13394:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   13395:  * always %NULL.
                   13396:  */
                   13397: GdomeDOMString *
                   13398: gdome_er_namespaceURI (GdomeEntityReference *self, GdomeException *exc)
                   13399: {
                   13400:  if (self == NULL) {
                   13401:    *exc = GDOME_NULL_POINTER_ERR;
                   13402:    return NULL;
                   13403:  }
                   13404:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13405:    *exc = GDOME_INVALID_STATE_ERR;
                   13406:    return NULL;
                   13407:  }
                   13408:  *exc = 0;
1.2     ! paf      13409:  return ((Gdome_xml_EntityReference *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      13410: }
                   13411: /**
                   13412:  * gdome_er_nextSibling:
                   13413:  * @self:  Node Object ref
                   13414:  * @exc:  Exception Object ref
                   13415:  *
                   13416:  * Returns: the node immediately following this node. If there is no such
                   13417:  * node, this returns %NULL.
                   13418:  */
1.2     ! paf      13419: xmlNode *
1.1       paf      13420: gdome_er_nextSibling (GdomeEntityReference *self, GdomeException *exc)
                   13421: {
                   13422:  if (self == NULL) {
                   13423:    *exc = GDOME_NULL_POINTER_ERR;
                   13424:    return NULL;
                   13425:  }
                   13426:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13427:    *exc = GDOME_INVALID_STATE_ERR;
                   13428:    return NULL;
                   13429:  }
                   13430:  *exc = 0;
1.2     ! paf      13431:  return ((Gdome_xml_EntityReference *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      13432: }
                   13433: /**
                   13434:  * gdome_er_nodeName:
                   13435:  * @self:  Node Object ref
                   13436:  * @exc:  Exception Object ref
                   13437:  *
                   13438:  * Returns: the name of this node, depending on its type.
                   13439:  */
                   13440: GdomeDOMString *
                   13441: gdome_er_nodeName (GdomeEntityReference *self, GdomeException *exc)
                   13442: {
                   13443:  if (self == NULL) {
                   13444:    *exc = GDOME_NULL_POINTER_ERR;
                   13445:    return NULL;
                   13446:  }
                   13447:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13448:    *exc = GDOME_INVALID_STATE_ERR;
                   13449:    return NULL;
                   13450:  }
                   13451:  *exc = 0;
1.2     ! paf      13452:  return ((Gdome_xml_EntityReference *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      13453: }
                   13454: /**
                   13455:  * gdome_er_nodeType:
                   13456:  * @self:  Node Object ref
                   13457:  * @exc:  Exception Object ref
                   13458:  *
                   13459:  * Returns: an integer bigger than %0 representing the type of the underlying
                   13460:  * object or %0 on error.
                   13461:  */
                   13462: unsigned short
                   13463: gdome_er_nodeType (GdomeEntityReference *self, GdomeException *exc)
                   13464: {
                   13465:  if (self == NULL) {
                   13466:    *exc = GDOME_NULL_POINTER_ERR;
                   13467:    return 0;
                   13468:  }
                   13469:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13470:    *exc = GDOME_INVALID_STATE_ERR;
                   13471:    return 0;
                   13472:  }
                   13473:  *exc = 0;
1.2     ! paf      13474:  return ((Gdome_xml_EntityReference *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      13475: }
                   13476: /**
                   13477:  * gdome_er_nodeValue:
                   13478:  * @self:  Node Object ref
                   13479:  * @exc:  Exception Object ref
                   13480:  *
                   13481:  * Returns: the value of this node, depending on its type.
                   13482:  */
                   13483: GdomeDOMString *
                   13484: gdome_er_nodeValue (GdomeEntityReference *self, GdomeException *exc)
                   13485: {
                   13486:  if (self == NULL) {
                   13487:    *exc = GDOME_NULL_POINTER_ERR;
                   13488:    return NULL;
                   13489:  }
                   13490:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13491:    *exc = GDOME_INVALID_STATE_ERR;
                   13492:    return NULL;
                   13493:  }
                   13494:  *exc = 0;
1.2     ! paf      13495:  return ((Gdome_xml_EntityReference *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      13496: }
                   13497: /**
                   13498:  * gdome_er_set_nodeValue:
                   13499:  * @self:  Node Object ref
                   13500:  * @nodeValue:  The new value for this node.
                   13501:  * @exc:  Exception Object ref
                   13502:  *
                   13503:  * Sets The value of this node, depending on its type.
                   13504:  *
                   13505:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   13506:  */
                   13507: void
                   13508: gdome_er_set_nodeValue (GdomeEntityReference *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   13509: {
                   13510:  if (self == NULL) {
                   13511:    *exc = GDOME_NULL_POINTER_ERR;
                   13512:    return;
                   13513:  }
                   13514:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13515:    *exc = GDOME_INVALID_STATE_ERR;
                   13516:    return;
                   13517:  }
                   13518:  *exc = 0;
1.2     ! paf      13519:  ((Gdome_xml_EntityReference *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      13520: }
                   13521: /**
                   13522:  * gdome_er_ownerDocument:
                   13523:  * @self:  Node Objects ref
                   13524:  * @exc:  Exception Object ref
                   13525:  *
                   13526:  * Returns: the documment object associated with this node. This is also the
                   13527:  * Document object used to create new nodes. When this node is a Document or a
                   13528:  * DocumentType which is not used with any Document yet, this is %NULL.
                   13529:  */
                   13530: GdomeDocument *
                   13531: gdome_er_ownerDocument (GdomeEntityReference *self, GdomeException *exc)
                   13532: {
                   13533:  if (self == NULL) {
                   13534:    *exc = GDOME_NULL_POINTER_ERR;
                   13535:    return NULL;
                   13536:  }
                   13537:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13538:    *exc = GDOME_INVALID_STATE_ERR;
                   13539:    return NULL;
                   13540:  }
                   13541:  *exc = 0;
1.2     ! paf      13542:  return ((Gdome_xml_EntityReference *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      13543: }
                   13544: /**
                   13545:  * gdome_er_parentNode:
                   13546:  * @self: Node Object ref
                   13547:  * @exc: Exception Object ref
                   13548:  *
                   13549:  * Returns: the parent of this node. All nodes, except Attr,
                   13550:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   13551:  * if a node has just been created and not yet added to the tree, or if it has
                   13552:  * been removed from the tree, this is %NULL.
                   13553:  */
1.2     ! paf      13554: xmlNode *
1.1       paf      13555: gdome_er_parentNode (GdomeEntityReference *self, GdomeException *exc)
                   13556: {
                   13557:  if (self == NULL) {
                   13558:    *exc = GDOME_NULL_POINTER_ERR;
                   13559:    return NULL;
                   13560:  }
                   13561:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13562:    *exc = GDOME_INVALID_STATE_ERR;
                   13563:    return NULL;
                   13564:  }
                   13565:  *exc = 0;
1.2     ! paf      13566:  return ((Gdome_xml_EntityReference *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      13567: }
                   13568: /**
                   13569:  * gdome_er_prefix:
                   13570:  * @self:  Node Objects ref
                   13571:  * @exc:  Exception Object ref
                   13572:  *
                   13573:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   13574:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   13575:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   13576:  * always %NULL.
                   13577:  */
                   13578: GdomeDOMString *
                   13579: gdome_er_prefix (GdomeEntityReference *self, GdomeException *exc)
                   13580: {
                   13581:  if (self == NULL) {
                   13582:    *exc = GDOME_NULL_POINTER_ERR;
                   13583:    return NULL;
                   13584:  }
                   13585:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13586:    *exc = GDOME_INVALID_STATE_ERR;
                   13587:    return NULL;
                   13588:  }
                   13589:  *exc = 0;
1.2     ! paf      13590:  return ((Gdome_xml_EntityReference *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      13591: }
                   13592: /**
                   13593:  * gdome_er_set_prefix:
                   13594:  * @self:  Node Object ref
                   13595:  * @prefix:  The new prefix for this node.
                   13596:  * @exc:  Exception Object ref
                   13597:  *
                   13598:  * Sets a new nemaspace prefix for this node.
                   13599:  *
                   13600:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   13601:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   13602:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   13603:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   13604:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   13605:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   13606:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   13607:  * an attribute and the qualifiedName of this node is "xmlns".
                   13608:  */
                   13609: void
                   13610: gdome_er_set_prefix (GdomeEntityReference *self, GdomeDOMString *prefix, GdomeException *exc)
                   13611: {
                   13612:  if (self == NULL) {
                   13613:    *exc = GDOME_NULL_POINTER_ERR;
                   13614:    return;
                   13615:  }
                   13616:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13617:    *exc = GDOME_INVALID_STATE_ERR;
                   13618:    return;
                   13619:  }
                   13620:  *exc = 0;
1.2     ! paf      13621:  ((Gdome_xml_EntityReference *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      13622: }
                   13623: /**
                   13624:  * gdome_er_previousSibling:
                   13625:  * @self:  Node Object ref
                   13626:  * @exc:  Exception Object ref
                   13627:  *
                   13628:  * Returns: the node immediately preceding this node. If there is no such
                   13629:  * node, this returns %NULL.
                   13630:  */
1.2     ! paf      13631: xmlNode *
1.1       paf      13632: gdome_er_previousSibling (GdomeEntityReference *self, GdomeException *exc)
                   13633: {
                   13634:  if (self == NULL) {
                   13635:    *exc = GDOME_NULL_POINTER_ERR;
                   13636:    return NULL;
                   13637:  }
                   13638:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13639:    *exc = GDOME_INVALID_STATE_ERR;
                   13640:    return NULL;
                   13641:  }
                   13642:  *exc = 0;
1.2     ! paf      13643:  return ((Gdome_xml_EntityReference *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      13644: }
                   13645: /**
                   13646:  * gdome_er_ref:
                   13647:  * @self:  Node Object ref
                   13648:  * @exc:  Exception Object ref
                   13649:  *
                   13650:  * Increase the reference count of the specified Node.
                   13651:  */
                   13652: void
                   13653: gdome_er_ref (GdomeEntityReference *self, GdomeException *exc)
                   13654: {
                   13655:  if (self == NULL) {
                   13656:    *exc = GDOME_NULL_POINTER_ERR;
                   13657:    return;
                   13658:  }
                   13659:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13660:    *exc = GDOME_INVALID_STATE_ERR;
                   13661:    return;
                   13662:  }
                   13663:  *exc = 0;
1.2     ! paf      13664:  ((Gdome_xml_EntityReference *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      13665: }
                   13666: /**
                   13667:  * gdome_er_unref:
                   13668:  * @self:  Node Object ref
                   13669:  * @exc:  Exception Object ref
                   13670:  *
                   13671:  * Decrease the reference count of the specified Node. Free the Node structure
                   13672:  * if the Node will have zero reference.
                   13673:  */
                   13674: void
                   13675: gdome_er_unref (GdomeEntityReference *self, GdomeException *exc)
                   13676: {
                   13677:  if (self == NULL) {
                   13678:    *exc = GDOME_NULL_POINTER_ERR;
                   13679:    return;
                   13680:  }
                   13681:  *exc = 0;
                   13682:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13683:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   13684:      ((Gdome_xml_Node *)self)->refcnt--;
                   13685: 
                   13686:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   13687: #ifdef DEBUG_REFCNT
                   13688:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   13689: #endif
                   13690:      g_free (self);
                   13691:    }
                   13692:    return;
                   13693:  }
1.2     ! paf      13694:  ((Gdome_xml_EntityReference *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      13695: }
                   13696: /**
                   13697:  * gdome_er_query_interface:
                   13698:  * @self:  Node Object ref
                   13699:  * @interface:  interface needed
                   13700:  * @exc:  Exception Object ref
                   13701:  *
                   13702:  * Returns: a reference to this object that implements the @interface needed,
                   13703:  *          or %NULL if the @interface is not supported by this Object.
                   13704:  */
                   13705: gpointer
                   13706: gdome_er_query_interface (GdomeEntityReference *self, const char *interface, GdomeException *exc)
                   13707: {
                   13708:  if (self == NULL) {
                   13709:    *exc = GDOME_NULL_POINTER_ERR;
                   13710:    return NULL;
                   13711:  }
                   13712:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13713:    *exc = GDOME_INVALID_STATE_ERR;
                   13714:    return NULL;
                   13715:  }
                   13716:  *exc = 0;
1.2     ! paf      13717:  return ((Gdome_xml_EntityReference *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      13718: }
                   13719: /**
                   13720:  * gdome_er_appendChild:
                   13721:  * @self:  Node Object ref
                   13722:  * @newChild:  The node to add
                   13723:  * @exc:  Exception Object ref
                   13724:  *
                   13725:  * Adds the node @newChild to the end of the list of children of this node.
                   13726:  * If the @newChild is already in the tree, it is first removed. If it is a
                   13727:  * DocumentFragment node, the entire contents of the document fragment are
                   13728:  * moved into the child list of this node
                   13729:  *
                   13730:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   13731:  * allow children of the type of the @newChild node, or if the node to append is
                   13732:  * one of this node's ancestors or this node itself.
                   13733:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   13734:  * document than the one that created this node.
                   13735:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   13736:  * Returns: the node added.
                   13737:  */
1.2     ! paf      13738: xmlNode *
        !          13739: gdome_er_appendChild (GdomeEntityReference *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      13740: {
                   13741:  if (self == NULL) {
                   13742:    *exc = GDOME_NULL_POINTER_ERR;
                   13743:    return NULL;
                   13744:  }
                   13745:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13746:    *exc = GDOME_INVALID_STATE_ERR;
                   13747:    return NULL;
                   13748:  }
                   13749:  *exc = 0;
1.2     ! paf      13750:  return ((Gdome_xml_EntityReference *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      13751: }
                   13752: /**
                   13753:  * gdome_er_cloneNode:
                   13754:  * @self:  Node Object ref
                   13755:  * @deep:  If true, recursively clone the subtree under the specified node;
                   13756:  *         if false, clone only the node itself (and its attributes, if it is
                   13757:  *         an Element).
                   13758:  * @exc:  Exception Object ref
                   13759:  *
                   13760:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   13761:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   13762:  * %NULL).
                   13763:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   13764:  * nodes are not supported.
                   13765:  *
                   13766:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   13767:  * supported.
                   13768:  * Returns: the duplicate node.
                   13769:  */
1.2     ! paf      13770: xmlNode *
1.1       paf      13771: gdome_er_cloneNode (GdomeEntityReference *self, GdomeBoolean deep, GdomeException *exc)
                   13772: {
                   13773:  if (self == NULL) {
                   13774:    *exc = GDOME_NULL_POINTER_ERR;
                   13775:    return NULL;
                   13776:  }
                   13777:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13778:    *exc = GDOME_INVALID_STATE_ERR;
                   13779:    return NULL;
                   13780:  }
                   13781:  *exc = 0;
1.2     ! paf      13782:  return ((Gdome_xml_EntityReference *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      13783: }
                   13784: /**
                   13785:  * gdome_er_hasAttributes:
                   13786:  * @self:  Node Object ref
                   13787:  * @exc:  Exception Object ref
                   13788:  *
                   13789:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   13790:  */
                   13791: GdomeBoolean
                   13792: gdome_er_hasAttributes (GdomeEntityReference *self, GdomeException *exc)
                   13793: {
                   13794:  if (self == NULL) {
                   13795:    *exc = GDOME_NULL_POINTER_ERR;
                   13796:    return FALSE;
                   13797:  }
                   13798:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13799:    *exc = GDOME_INVALID_STATE_ERR;
                   13800:    return FALSE;
                   13801:  }
                   13802:  *exc = 0;
1.2     ! paf      13803:  return ((Gdome_xml_EntityReference *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      13804: }
                   13805: /**
                   13806:  * gdome_er_hasChildNodes:
                   13807:  * @self:  Node Object ref
                   13808:  * @exc:  Exception Object ref
                   13809:  *
                   13810:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   13811:  */
                   13812: GdomeBoolean
                   13813: gdome_er_hasChildNodes (GdomeEntityReference *self, GdomeException *exc)
                   13814: {
                   13815:  if (self == NULL) {
                   13816:    *exc = GDOME_NULL_POINTER_ERR;
                   13817:    return FALSE;
                   13818:  }
                   13819:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13820:    *exc = GDOME_INVALID_STATE_ERR;
                   13821:    return FALSE;
                   13822:  }
                   13823:  *exc = 0;
1.2     ! paf      13824:  return ((Gdome_xml_EntityReference *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      13825: }
                   13826: /**
                   13827:  * gdome_er_insertBefore:
                   13828:  * @self:  Node Object ref
                   13829:  * @newChild:  The new node to put in the child list
                   13830:  * @refChild:  the reference node, i.e., the node before which the new node
                   13831:  *             must be inserted.
                   13832:  * @exc:  Exception Object ref
                   13833:  *
                   13834:  * Inserts the node @newChild before the existing child node @refChild. If
                   13835:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   13836:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   13837:  * in the same order, before @refChild. If the @newChild is already in the
                   13838:  * tree, it is first removed.
                   13839:  *
                   13840:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   13841:  * allow children of the type of the @newChild node, or if the node to insert is
                   13842:  * one of this node's ancestors or this node itself.
                   13843:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   13844:  * document than the one that created this node.
                   13845:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   13846:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   13847:  * Returns: the node being inserted.
                   13848:  */
1.2     ! paf      13849: xmlNode *
        !          13850: gdome_er_insertBefore (GdomeEntityReference *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      13851: {
                   13852:  if (self == NULL) {
                   13853:    *exc = GDOME_NULL_POINTER_ERR;
                   13854:    return NULL;
                   13855:  }
                   13856:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13857:    *exc = GDOME_INVALID_STATE_ERR;
                   13858:    return NULL;
                   13859:  }
                   13860:  *exc = 0;
1.2     ! paf      13861:  return ((Gdome_xml_EntityReference *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      13862: }
                   13863: /**
                   13864:  * gdome_er_isSupported:
                   13865:  * @self:  Node Object ref
                   13866:  * @feature:  The name of the feature to test.
                   13867:  * @version:  This is the version number of the feature to test. In Level 2,
                   13868:  *            version 1, this is the string "2.0". If the version is not
                   13869:  *            specified, supporting any version of the feature will cause the
                   13870:  *            method to return %TRUE.
                   13871:  * @exc:  Exception Object ref
                   13872:  *
                   13873:  * Tests whether the DOM implementation implements a specific feature and that
                   13874:  * feature is supported by this node.
                   13875:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   13876:  * otherwise.
                   13877:  */
                   13878: GdomeBoolean
                   13879: gdome_er_isSupported (GdomeEntityReference *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   13880: {
                   13881:  if (self == NULL) {
                   13882:    *exc = GDOME_NULL_POINTER_ERR;
                   13883:    return FALSE;
                   13884:  }
                   13885:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13886:    *exc = GDOME_INVALID_STATE_ERR;
                   13887:    return FALSE;
                   13888:  }
                   13889:  *exc = 0;
1.2     ! paf      13890:  return ((Gdome_xml_EntityReference *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      13891: }
                   13892: /**
                   13893:  * gdome_er_normalize:
                   13894:  * @self:  Node Object ref
                   13895:  * @exc:  Exception Object ref
                   13896:  *
                   13897:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   13898:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   13899:  * elements, comments, processing instructions, CDATA sections, and entity
                   13900:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   13901:  * nodes nor empty Text nodes.
                   13902:  */
                   13903: void
                   13904: gdome_er_normalize (GdomeEntityReference *self, GdomeException *exc)
                   13905: {
                   13906:  if (self == NULL) {
                   13907:    *exc = GDOME_NULL_POINTER_ERR;
                   13908:    return;
                   13909:  }
                   13910:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13911:    *exc = GDOME_INVALID_STATE_ERR;
                   13912:    return;
                   13913:  }
                   13914:  *exc = 0;
1.2     ! paf      13915:  ((Gdome_xml_EntityReference *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      13916: }
                   13917: /**
                   13918:  * gdome_er_removeChild:
                   13919:  * @self:  Node Object ref
                   13920:  * @oldChild:  The node being removed
                   13921:  * @exc:  Exception Object ref
                   13922:  *
                   13923:  * Removes the child node indicated by @oldChild from the list of children, and
                   13924:  * returns it.
                   13925:  *
                   13926:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   13927:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   13928:  * Returns: the node removed.
                   13929:  */
1.2     ! paf      13930: xmlNode *
        !          13931: gdome_er_removeChild (GdomeEntityReference *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      13932: {
                   13933:  if (self == NULL) {
                   13934:    *exc = GDOME_NULL_POINTER_ERR;
                   13935:    return NULL;
                   13936:  }
                   13937:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13938:    *exc = GDOME_INVALID_STATE_ERR;
                   13939:    return NULL;
                   13940:  }
                   13941:  *exc = 0;
1.2     ! paf      13942:  return ((Gdome_xml_EntityReference *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      13943: }
                   13944: /**
                   13945:  * gdome_er_replaceChild:
                   13946:  * @self:  Node Object ref
                   13947:  * @newChild:  The new node to put in the child list
                   13948:  * @oldChild:  The node being replaced in the list
                   13949:  * @exc:  Exception Object ref
                   13950:  *
                   13951:  * Replaces the child node @oldChild with @newChild in the list of children,
                   13952:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   13953:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   13954:  * inserted in the same order. If the @newChild is already in the tree, it is
                   13955:  * first removed.
                   13956:  *
                   13957:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   13958:  * not allow children of the type of the @newChild node, or if the node to put
                   13959:  * in is one of this node's ancestors or this node itself.
                   13960:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   13961:  * document than the one that created this node.
                   13962:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   13963:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   13964:  * Returns: the node replaced.
                   13965:  */
1.2     ! paf      13966: xmlNode *
        !          13967: gdome_er_replaceChild (GdomeEntityReference *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      13968: {
                   13969:  if (self == NULL) {
                   13970:    *exc = GDOME_NULL_POINTER_ERR;
                   13971:    return NULL;
                   13972:  }
                   13973:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   13974:    *exc = GDOME_INVALID_STATE_ERR;
                   13975:    return NULL;
                   13976:  }
                   13977:  *exc = 0;
1.2     ! paf      13978:  return ((Gdome_xml_EntityReference *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      13979: }
                   13980: /**
                   13981:  * gdome_er_addEventListener:
                   13982:  * @self:  Node Object ref
                   13983:  * @type:  the event type for which the user is registering
                   13984:  * @listener:  the listener parameter takes an interface implemented by the
                   13985:  *             user which contains the methods to be called when the event occurs.
                   13986:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   13987:  *               capture. After initiating capture, all events of the specified
                   13988:  *               type will be dispatched to the registered EventListener before
                   13989:  *               being dispatched to any EventTargets beneath them in the tree.
                   13990:  *               Events which are bubbling upward through the tree will not
                   13991:  *               trigger an EventListener designated to use capture.
                   13992:  * @exc:  Exception Object ref
                   13993:  *
                   13994:  * This method allows the registration of event listeners on the event target.
                   13995:  * If an EventListener is added to an EventTarget while it is processing an
                   13996:  * event, it will not be triggered by the current actions but may be triggered
                   13997:  * during a later stage of event flow, such as the bubbling phase.
                   13998:  * If multiple identical EventListeners are registered on the same EventTarget
                   13999:  * with the same parameters the duplicate instances are discarded. They do not
                   14000:  * cause the EventListener to be called twice and since they are discarded
                   14001:  * they do not need to be removed with the removeEventListener method.
                   14002:  */
                   14003: void
                   14004: gdome_er_addEventListener (GdomeEntityReference *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   14005: {
                   14006:  if (self == NULL) {
                   14007:    *exc = GDOME_NULL_POINTER_ERR;
                   14008:    return;
                   14009:  }
                   14010:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14011:    *exc = GDOME_INVALID_STATE_ERR;
                   14012:    return;
                   14013:  }
                   14014:  *exc = 0;
1.2     ! paf      14015:  ((Gdome_xml_EntityReference *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      14016: }
                   14017: /**
                   14018:  * gdome_er_removeEventListener:
                   14019:  * @self:  Node Object ref
                   14020:  * @type:  Specifies the event type of the EventListener being removed.
                   14021:  * @listener:  The EventListener parameter indicates the EventListener to be
                   14022:  *             removed.
                   14023:  * @useCapture:  Specifies whether the EventListener being removed was
                   14024:  *               registered as a capturing listener or not. If a listener was
                   14025:  *               registered twice, one with capture and one without, each must
                   14026:  *               be removed separately. Removal of a capturing listener does
                   14027:  *               not affect a non-capturing version of the same listener, and
                   14028:  *               vice versa.
                   14029:  * @exc:  Exception Object ref
                   14030:  *
                   14031:  * This method allows the removal of event listeners from the event target. If
                   14032:  * an EventListener is removed from an EventTarget while it is processing an
                   14033:  * event, it will not be triggered by the current actions. EventListeners can
                   14034:  * never be invoked after being removed. Calling removeEventListener with
                   14035:  * arguments which do not identify any currently registered EventListener on
                   14036:  * the EventTarget has no effect.
                   14037:  */
                   14038: void
                   14039: gdome_er_removeEventListener (GdomeEntityReference *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   14040: {
                   14041:  if (self == NULL) {
                   14042:    *exc = GDOME_NULL_POINTER_ERR;
                   14043:    return;
                   14044:  }
                   14045:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14046:    *exc = GDOME_INVALID_STATE_ERR;
                   14047:    return;
                   14048:  }
                   14049:  *exc = 0;
1.2     ! paf      14050:  ((Gdome_xml_EntityReference *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      14051: }
                   14052: /**
                   14053:  * gdome_er_dispatchEvent:
                   14054:  * @self:  Node Object ref
                   14055:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   14056:  *        used in processing the event.
                   14057:  * @exc:  Exception Object ref
                   14058:  *
                   14059:  * This method allows the dispatch of events into the implementations event
                   14060:  * model. Events dispatched in this manner will have the same capturing and
                   14061:  * bubbling behavior as events dispatched directly by the implementation. The
                   14062:  * target of the event is the EventTarget on which dispatchEvent is called.
                   14063:  *
                   14064:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   14065:  * specified by initializing the event before dispatchEvent was called.
                   14066:  * Specification of the Event's type as %NULL or an empty string will also
                   14067:  * trigger this exception.
                   14068:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   14069:  *          is %TRUE.
                   14070:  */
                   14071: GdomeBoolean
                   14072: gdome_er_dispatchEvent (GdomeEntityReference *self, GdomeEvent *evt, GdomeException *exc)
                   14073: {
                   14074:  if (self == NULL) {
                   14075:    *exc = GDOME_NULL_POINTER_ERR;
                   14076:    return FALSE;
                   14077:  }
                   14078:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14079:    *exc = GDOME_INVALID_STATE_ERR;
                   14080:    return FALSE;
                   14081:  }
                   14082:  *exc = 0;
1.2     ! paf      14083:  return ((Gdome_xml_EntityReference *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      14084: }
                   14085: /**
                   14086:  * gdome_er_subTreeDispatchEvent:
                   14087:  * @self:  Node Object ref
                   14088:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   14089:  *        used in processing the event.
                   14090:  * @exc:  Exception Object ref
                   14091:  *
                   14092:  * This method allows the dispatch of events into the implementations event
                   14093:  * model. Events dispatched in this manner will have the same capturing and
                   14094:  * bubbling behavior as events dispatched directly by the implementation. The
                   14095:  * target of the event is any nodes in the subtree of the EventTarget on which
                   14096:  * dispatchEvent is called.
                   14097:  *
                   14098:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   14099:  * specified by initializing the event before dispatchEvent was called.
                   14100:  * Specification of the Event's type as %NULL or an empty string will also
                   14101:  * trigger this exception.
                   14102:  */
                   14103: void
                   14104: gdome_er_subTreeDispatchEvent (GdomeEntityReference *self, GdomeEvent *evt, GdomeException *exc)
                   14105: {
                   14106:  if (self == NULL) {
                   14107:    *exc = GDOME_NULL_POINTER_ERR;
                   14108:    return;
                   14109:  }
                   14110:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14111:    *exc = GDOME_INVALID_STATE_ERR;
                   14112:    return;
                   14113:  }
                   14114:  *exc = 0;
1.2     ! paf      14115:  ((Gdome_xml_EntityReference *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      14116: }
                   14117: /**
                   14118:  * gdome_er_canAppend:
                   14119:  * @self:  Node Object ref
                   14120:  * @newChild:  The Node Object ref of the node to test
                   14121:  * @exc:  Exception Object ref
                   14122:  *
                   14123:  * Tests if a @newChild can be added in the child list of this node.
                   14124:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   14125:  */
                   14126: GdomeBoolean
1.2     ! paf      14127: gdome_er_canAppend (GdomeEntityReference *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      14128: {
                   14129:  if (self == NULL) {
                   14130:    *exc = GDOME_NULL_POINTER_ERR;
                   14131:    return FALSE;
                   14132:  }
                   14133:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14134:    *exc = GDOME_INVALID_STATE_ERR;
                   14135:    return FALSE;
                   14136:  }
                   14137:  *exc = 0;
1.2     ! paf      14138:  return ((Gdome_xml_EntityReference *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      14139: }
                   14140: 
                   14141: /******************************************************************************
                   14142:           GdomeProcessingInstruction interface API
                   14143:  ******************************************************************************/
                   14144: /**
                   14145:  * gdome_pi_data:
                   14146:  * @self:  ProcessingInstruction Object ref
                   14147:  * @exc:  Exception Object ref
                   14148:  *
                   14149:  * Returns: the content of this processing instruction. This is from the first
                   14150:  * non white space character after the target to the character immediately
                   14151:  * preceding the %?>.
                   14152:  */
                   14153: GdomeDOMString *
                   14154: gdome_pi_data (GdomeProcessingInstruction *self, GdomeException *exc)
                   14155: {
                   14156:  if (self == NULL) {
                   14157:    *exc = GDOME_NULL_POINTER_ERR;
                   14158:    return NULL;
                   14159:  }
                   14160:  if (((Gdome_xml_EntityReference *)self)->n == NULL) {
                   14161:    *exc = GDOME_INVALID_STATE_ERR;
                   14162:    return NULL;
                   14163:  }
                   14164:  *exc = 0;
                   14165:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->data (self, exc);
                   14166: }
                   14167: /**
                   14168:  * gdome_pi_set_data:
                   14169:  * @self:  ProcessingInstruction Object ref
                   14170:  * @data:  The string of data to be set
                   14171:  * @exc:  Exception Object ref
                   14172:  *
                   14173:  * Set the content of this processing instruction.
                   14174:  *
                   14175:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   14176:  */
                   14177: void
                   14178: gdome_pi_set_data (GdomeProcessingInstruction *self, GdomeDOMString *data, GdomeException *exc)
                   14179: {
                   14180:  if (self == NULL) {
                   14181:    *exc = GDOME_NULL_POINTER_ERR;
                   14182:    return;
                   14183:  }
                   14184:  if (((Gdome_xml_EntityReference *)self)->n == NULL) {
                   14185:    *exc = GDOME_INVALID_STATE_ERR;
                   14186:    return;
                   14187:  }
                   14188:  *exc = 0;
                   14189:  ((Gdome_xml_ProcessingInstruction *)self)->vtab->set_data (self, data, exc);
                   14190: }
                   14191: /**
                   14192:  * gdome_pi_target:
                   14193:  * @self:  ProcessingInstruction Object ref
                   14194:  * @exc:  Exception Object ref
                   14195:  *
                   14196:  * Returns: the target of this processing instruction. XML defines this as being
                   14197:  * the first token following the markup that begins the processing instruction.
                   14198:  */
                   14199: GdomeDOMString *
                   14200: gdome_pi_target (GdomeProcessingInstruction *self, GdomeException *exc)
                   14201: {
                   14202:  if (self == NULL) {
                   14203:    *exc = GDOME_NULL_POINTER_ERR;
                   14204:    return NULL;
                   14205:  }
                   14206:  if (((Gdome_xml_EntityReference *)self)->n == NULL) {
                   14207:    *exc = GDOME_INVALID_STATE_ERR;
                   14208:    return NULL;
                   14209:  }
                   14210:  *exc = 0;
                   14211:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->target (self, exc);
                   14212: }
                   14213: /**
                   14214:  * gdome_pi_attributes:
                   14215:  * @self:  Node Object ref
                   14216:  * @exc:  Exception Object ref
                   14217:  *
                   14218:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   14219:  * Element) or %NULL otherwise.
                   14220:  */
                   14221: GdomeNamedNodeMap *
                   14222: gdome_pi_attributes (GdomeProcessingInstruction *self, GdomeException *exc)
                   14223: {
                   14224:  if (self == NULL) {
                   14225:    *exc = GDOME_NULL_POINTER_ERR;
                   14226:    return NULL;
                   14227:  }
                   14228:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14229:    *exc = GDOME_INVALID_STATE_ERR;
                   14230:    return NULL;
                   14231:  }
                   14232:  *exc = 0;
1.2     ! paf      14233:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      14234: }
                   14235: /**
                   14236:  * gdome_pi_childNodes:
                   14237:  * @self:  Node Object ref
                   14238:  * @exc:  Exception Object ref
                   14239:  *
                   14240:  * Returns: a NodeList that contains all children of this node. If there are no
                   14241:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   14242:  * not considered to be children of element nodes - use gdome_n_attributes to
                   14243:  * obtain the attributes.
                   14244:  */
                   14245: GdomeNodeList *
                   14246: gdome_pi_childNodes (GdomeProcessingInstruction *self, GdomeException *exc)
                   14247: {
                   14248:  if (self == NULL) {
                   14249:    *exc = GDOME_NULL_POINTER_ERR;
                   14250:    return NULL;
                   14251:  }
                   14252:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14253:    *exc = GDOME_INVALID_STATE_ERR;
                   14254:    return NULL;
                   14255:  }
                   14256:  *exc = 0;
1.2     ! paf      14257:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      14258: }
                   14259: /**
                   14260:  * gdome_pi_firstChild:
                   14261:  * @self:  Node Object ref
                   14262:  * @exc:  Exception Object ref
                   14263:  * 
                   14264:  * Returns: the first child of this node. If there is no such node,
                   14265:  * this returns %NULL.
                   14266:  */
1.2     ! paf      14267: xmlNode *
1.1       paf      14268: gdome_pi_firstChild (GdomeProcessingInstruction *self, GdomeException *exc)
                   14269: {
                   14270:  if (self == NULL) {
                   14271:    *exc = GDOME_NULL_POINTER_ERR;
                   14272:    return NULL;
                   14273:  }
                   14274:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14275:    *exc = GDOME_INVALID_STATE_ERR;
                   14276:    return NULL;
                   14277:  }
                   14278:  *exc = 0;
1.2     ! paf      14279:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      14280: }
                   14281: /**
                   14282:  * gdome_pi_lastChild:
                   14283:  * @self:  Node Object ref
                   14284:  * @exc:  Exception Object ref
                   14285:  *
                   14286:  * Returns: the last child of this node. If there is no such node,
                   14287:  * this returns %NULL.
                   14288:  */
1.2     ! paf      14289: xmlNode *
1.1       paf      14290: gdome_pi_lastChild (GdomeProcessingInstruction *self, GdomeException *exc)
                   14291: {
                   14292:  if (self == NULL) {
                   14293:    *exc = GDOME_NULL_POINTER_ERR;
                   14294:    return NULL;
                   14295:  }
                   14296:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14297:    *exc = GDOME_INVALID_STATE_ERR;
                   14298:    return NULL;
                   14299:  }
                   14300:  *exc = 0;
1.2     ! paf      14301:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      14302: }
                   14303: /**
                   14304:  * gdome_pi_localName:
                   14305:  * @self:  Node Objects ref
                   14306:  * @exc:  Exception Object ref
                   14307:  *
                   14308:  * Returns: the local part of the qualified name of this node.
                   14309:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   14310:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   14311:  * always %NULL.
                   14312:  */
                   14313: GdomeDOMString *
                   14314: gdome_pi_localName (GdomeProcessingInstruction *self, GdomeException *exc)
                   14315: {
                   14316:  if (self == NULL) {
                   14317:    *exc = GDOME_NULL_POINTER_ERR;
                   14318:    return NULL;
                   14319:  }
                   14320:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14321:    *exc = GDOME_INVALID_STATE_ERR;
                   14322:    return NULL;
                   14323:  }
                   14324:  *exc = 0;
1.2     ! paf      14325:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      14326: }
                   14327: /**
                   14328:  * gdome_pi_namespaceURI:
                   14329:  * @self:  Node Objects ref
                   14330:  * @exc:  Exception Object ref
                   14331:  *
                   14332:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   14333:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   14334:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   14335:  * always %NULL.
                   14336:  */
                   14337: GdomeDOMString *
                   14338: gdome_pi_namespaceURI (GdomeProcessingInstruction *self, GdomeException *exc)
                   14339: {
                   14340:  if (self == NULL) {
                   14341:    *exc = GDOME_NULL_POINTER_ERR;
                   14342:    return NULL;
                   14343:  }
                   14344:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14345:    *exc = GDOME_INVALID_STATE_ERR;
                   14346:    return NULL;
                   14347:  }
                   14348:  *exc = 0;
1.2     ! paf      14349:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      14350: }
                   14351: /**
                   14352:  * gdome_pi_nextSibling:
                   14353:  * @self:  Node Object ref
                   14354:  * @exc:  Exception Object ref
                   14355:  *
                   14356:  * Returns: the node immediately following this node. If there is no such
                   14357:  * node, this returns %NULL.
                   14358:  */
1.2     ! paf      14359: xmlNode *
1.1       paf      14360: gdome_pi_nextSibling (GdomeProcessingInstruction *self, GdomeException *exc)
                   14361: {
                   14362:  if (self == NULL) {
                   14363:    *exc = GDOME_NULL_POINTER_ERR;
                   14364:    return NULL;
                   14365:  }
                   14366:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14367:    *exc = GDOME_INVALID_STATE_ERR;
                   14368:    return NULL;
                   14369:  }
                   14370:  *exc = 0;
1.2     ! paf      14371:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      14372: }
                   14373: /**
                   14374:  * gdome_pi_nodeName:
                   14375:  * @self:  Node Object ref
                   14376:  * @exc:  Exception Object ref
                   14377:  *
                   14378:  * Returns: the name of this node, depending on its type.
                   14379:  */
                   14380: GdomeDOMString *
                   14381: gdome_pi_nodeName (GdomeProcessingInstruction *self, GdomeException *exc)
                   14382: {
                   14383:  if (self == NULL) {
                   14384:    *exc = GDOME_NULL_POINTER_ERR;
                   14385:    return NULL;
                   14386:  }
                   14387:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14388:    *exc = GDOME_INVALID_STATE_ERR;
                   14389:    return NULL;
                   14390:  }
                   14391:  *exc = 0;
1.2     ! paf      14392:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      14393: }
                   14394: /**
                   14395:  * gdome_pi_nodeType:
                   14396:  * @self:  Node Object ref
                   14397:  * @exc:  Exception Object ref
                   14398:  *
                   14399:  * Returns: an integer bigger than %0 representing the type of the underlying
                   14400:  * object or %0 on error.
                   14401:  */
                   14402: unsigned short
                   14403: gdome_pi_nodeType (GdomeProcessingInstruction *self, GdomeException *exc)
                   14404: {
                   14405:  if (self == NULL) {
                   14406:    *exc = GDOME_NULL_POINTER_ERR;
                   14407:    return 0;
                   14408:  }
                   14409:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14410:    *exc = GDOME_INVALID_STATE_ERR;
                   14411:    return 0;
                   14412:  }
                   14413:  *exc = 0;
1.2     ! paf      14414:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      14415: }
                   14416: /**
                   14417:  * gdome_pi_nodeValue:
                   14418:  * @self:  Node Object ref
                   14419:  * @exc:  Exception Object ref
                   14420:  *
                   14421:  * Returns: the value of this node, depending on its type.
                   14422:  */
                   14423: GdomeDOMString *
                   14424: gdome_pi_nodeValue (GdomeProcessingInstruction *self, GdomeException *exc)
                   14425: {
                   14426:  if (self == NULL) {
                   14427:    *exc = GDOME_NULL_POINTER_ERR;
                   14428:    return NULL;
                   14429:  }
                   14430:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14431:    *exc = GDOME_INVALID_STATE_ERR;
                   14432:    return NULL;
                   14433:  }
                   14434:  *exc = 0;
1.2     ! paf      14435:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      14436: }
                   14437: /**
                   14438:  * gdome_pi_set_nodeValue:
                   14439:  * @self:  Node Object ref
                   14440:  * @nodeValue:  The new value for this node.
                   14441:  * @exc:  Exception Object ref
                   14442:  *
                   14443:  * Sets The value of this node, depending on its type.
                   14444:  *
                   14445:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   14446:  */
                   14447: void
                   14448: gdome_pi_set_nodeValue (GdomeProcessingInstruction *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   14449: {
                   14450:  if (self == NULL) {
                   14451:    *exc = GDOME_NULL_POINTER_ERR;
                   14452:    return;
                   14453:  }
                   14454:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14455:    *exc = GDOME_INVALID_STATE_ERR;
                   14456:    return;
                   14457:  }
                   14458:  *exc = 0;
1.2     ! paf      14459:  ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      14460: }
                   14461: /**
                   14462:  * gdome_pi_ownerDocument:
                   14463:  * @self:  Node Objects ref
                   14464:  * @exc:  Exception Object ref
                   14465:  *
                   14466:  * Returns: the documment object associated with this node. This is also the
                   14467:  * Document object used to create new nodes. When this node is a Document or a
                   14468:  * DocumentType which is not used with any Document yet, this is %NULL.
                   14469:  */
                   14470: GdomeDocument *
                   14471: gdome_pi_ownerDocument (GdomeProcessingInstruction *self, GdomeException *exc)
                   14472: {
                   14473:  if (self == NULL) {
                   14474:    *exc = GDOME_NULL_POINTER_ERR;
                   14475:    return NULL;
                   14476:  }
                   14477:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14478:    *exc = GDOME_INVALID_STATE_ERR;
                   14479:    return NULL;
                   14480:  }
                   14481:  *exc = 0;
1.2     ! paf      14482:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      14483: }
                   14484: /**
                   14485:  * gdome_pi_parentNode:
                   14486:  * @self: Node Object ref
                   14487:  * @exc: Exception Object ref
                   14488:  *
                   14489:  * Returns: the parent of this node. All nodes, except Attr,
                   14490:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   14491:  * if a node has just been created and not yet added to the tree, or if it has
                   14492:  * been removed from the tree, this is %NULL.
                   14493:  */
1.2     ! paf      14494: xmlNode *
1.1       paf      14495: gdome_pi_parentNode (GdomeProcessingInstruction *self, GdomeException *exc)
                   14496: {
                   14497:  if (self == NULL) {
                   14498:    *exc = GDOME_NULL_POINTER_ERR;
                   14499:    return NULL;
                   14500:  }
                   14501:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14502:    *exc = GDOME_INVALID_STATE_ERR;
                   14503:    return NULL;
                   14504:  }
                   14505:  *exc = 0;
1.2     ! paf      14506:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      14507: }
                   14508: /**
                   14509:  * gdome_pi_prefix:
                   14510:  * @self:  Node Objects ref
                   14511:  * @exc:  Exception Object ref
                   14512:  *
                   14513:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   14514:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   14515:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   14516:  * always %NULL.
                   14517:  */
                   14518: GdomeDOMString *
                   14519: gdome_pi_prefix (GdomeProcessingInstruction *self, GdomeException *exc)
                   14520: {
                   14521:  if (self == NULL) {
                   14522:    *exc = GDOME_NULL_POINTER_ERR;
                   14523:    return NULL;
                   14524:  }
                   14525:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14526:    *exc = GDOME_INVALID_STATE_ERR;
                   14527:    return NULL;
                   14528:  }
                   14529:  *exc = 0;
1.2     ! paf      14530:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      14531: }
                   14532: /**
                   14533:  * gdome_pi_set_prefix:
                   14534:  * @self:  Node Object ref
                   14535:  * @prefix:  The new prefix for this node.
                   14536:  * @exc:  Exception Object ref
                   14537:  *
                   14538:  * Sets a new nemaspace prefix for this node.
                   14539:  *
                   14540:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   14541:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   14542:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   14543:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   14544:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   14545:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   14546:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   14547:  * an attribute and the qualifiedName of this node is "xmlns".
                   14548:  */
                   14549: void
                   14550: gdome_pi_set_prefix (GdomeProcessingInstruction *self, GdomeDOMString *prefix, GdomeException *exc)
                   14551: {
                   14552:  if (self == NULL) {
                   14553:    *exc = GDOME_NULL_POINTER_ERR;
                   14554:    return;
                   14555:  }
                   14556:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14557:    *exc = GDOME_INVALID_STATE_ERR;
                   14558:    return;
                   14559:  }
                   14560:  *exc = 0;
1.2     ! paf      14561:  ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      14562: }
                   14563: /**
                   14564:  * gdome_pi_previousSibling:
                   14565:  * @self:  Node Object ref
                   14566:  * @exc:  Exception Object ref
                   14567:  *
                   14568:  * Returns: the node immediately preceding this node. If there is no such
                   14569:  * node, this returns %NULL.
                   14570:  */
1.2     ! paf      14571: xmlNode *
1.1       paf      14572: gdome_pi_previousSibling (GdomeProcessingInstruction *self, GdomeException *exc)
                   14573: {
                   14574:  if (self == NULL) {
                   14575:    *exc = GDOME_NULL_POINTER_ERR;
                   14576:    return NULL;
                   14577:  }
                   14578:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14579:    *exc = GDOME_INVALID_STATE_ERR;
                   14580:    return NULL;
                   14581:  }
                   14582:  *exc = 0;
1.2     ! paf      14583:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      14584: }
                   14585: /**
                   14586:  * gdome_pi_ref:
                   14587:  * @self:  Node Object ref
                   14588:  * @exc:  Exception Object ref
                   14589:  *
                   14590:  * Increase the reference count of the specified Node.
                   14591:  */
                   14592: void
                   14593: gdome_pi_ref (GdomeProcessingInstruction *self, GdomeException *exc)
                   14594: {
                   14595:  if (self == NULL) {
                   14596:    *exc = GDOME_NULL_POINTER_ERR;
                   14597:    return;
                   14598:  }
                   14599:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14600:    *exc = GDOME_INVALID_STATE_ERR;
                   14601:    return;
                   14602:  }
                   14603:  *exc = 0;
1.2     ! paf      14604:  ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      14605: }
                   14606: /**
                   14607:  * gdome_pi_unref:
                   14608:  * @self:  Node Object ref
                   14609:  * @exc:  Exception Object ref
                   14610:  *
                   14611:  * Decrease the reference count of the specified Node. Free the Node structure
                   14612:  * if the Node will have zero reference.
                   14613:  */
                   14614: void
                   14615: gdome_pi_unref (GdomeProcessingInstruction *self, GdomeException *exc)
                   14616: {
                   14617:  if (self == NULL) {
                   14618:    *exc = GDOME_NULL_POINTER_ERR;
                   14619:    return;
                   14620:  }
                   14621:  *exc = 0;
                   14622:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14623:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   14624:      ((Gdome_xml_Node *)self)->refcnt--;
                   14625: 
                   14626:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   14627: #ifdef DEBUG_REFCNT
                   14628:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   14629: #endif
                   14630:      g_free (self);
                   14631:    }
                   14632:    return;
                   14633:  }
1.2     ! paf      14634:  ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      14635: }
                   14636: /**
                   14637:  * gdome_pi_query_interface:
                   14638:  * @self:  Node Object ref
                   14639:  * @interface:  interface needed
                   14640:  * @exc:  Exception Object ref
                   14641:  *
                   14642:  * Returns: a reference to this object that implements the @interface needed,
                   14643:  *          or %NULL if the @interface is not supported by this Object.
                   14644:  */
                   14645: gpointer
                   14646: gdome_pi_query_interface (GdomeProcessingInstruction *self, const char *interface, GdomeException *exc)
                   14647: {
                   14648:  if (self == NULL) {
                   14649:    *exc = GDOME_NULL_POINTER_ERR;
                   14650:    return NULL;
                   14651:  }
                   14652:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14653:    *exc = GDOME_INVALID_STATE_ERR;
                   14654:    return NULL;
                   14655:  }
                   14656:  *exc = 0;
1.2     ! paf      14657:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      14658: }
                   14659: /**
                   14660:  * gdome_pi_appendChild:
                   14661:  * @self:  Node Object ref
                   14662:  * @newChild:  The node to add
                   14663:  * @exc:  Exception Object ref
                   14664:  *
                   14665:  * Adds the node @newChild to the end of the list of children of this node.
                   14666:  * If the @newChild is already in the tree, it is first removed. If it is a
                   14667:  * DocumentFragment node, the entire contents of the document fragment are
                   14668:  * moved into the child list of this node
                   14669:  *
                   14670:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   14671:  * allow children of the type of the @newChild node, or if the node to append is
                   14672:  * one of this node's ancestors or this node itself.
                   14673:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   14674:  * document than the one that created this node.
                   14675:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   14676:  * Returns: the node added.
                   14677:  */
1.2     ! paf      14678: xmlNode *
        !          14679: gdome_pi_appendChild (GdomeProcessingInstruction *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      14680: {
                   14681:  if (self == NULL) {
                   14682:    *exc = GDOME_NULL_POINTER_ERR;
                   14683:    return NULL;
                   14684:  }
                   14685:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14686:    *exc = GDOME_INVALID_STATE_ERR;
                   14687:    return NULL;
                   14688:  }
                   14689:  *exc = 0;
1.2     ! paf      14690:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      14691: }
                   14692: /**
                   14693:  * gdome_pi_cloneNode:
                   14694:  * @self:  Node Object ref
                   14695:  * @deep:  If true, recursively clone the subtree under the specified node;
                   14696:  *         if false, clone only the node itself (and its attributes, if it is
                   14697:  *         an Element).
                   14698:  * @exc:  Exception Object ref
                   14699:  *
                   14700:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   14701:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   14702:  * %NULL).
                   14703:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   14704:  * nodes are not supported.
                   14705:  *
                   14706:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   14707:  * supported.
                   14708:  * Returns: the duplicate node.
                   14709:  */
1.2     ! paf      14710: xmlNode *
1.1       paf      14711: gdome_pi_cloneNode (GdomeProcessingInstruction *self, GdomeBoolean deep, GdomeException *exc)
                   14712: {
                   14713:  if (self == NULL) {
                   14714:    *exc = GDOME_NULL_POINTER_ERR;
                   14715:    return NULL;
                   14716:  }
                   14717:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14718:    *exc = GDOME_INVALID_STATE_ERR;
                   14719:    return NULL;
                   14720:  }
                   14721:  *exc = 0;
1.2     ! paf      14722:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      14723: }
                   14724: /**
                   14725:  * gdome_pi_hasAttributes:
                   14726:  * @self:  Node Object ref
                   14727:  * @exc:  Exception Object ref
                   14728:  *
                   14729:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   14730:  */
                   14731: GdomeBoolean
                   14732: gdome_pi_hasAttributes (GdomeProcessingInstruction *self, GdomeException *exc)
                   14733: {
                   14734:  if (self == NULL) {
                   14735:    *exc = GDOME_NULL_POINTER_ERR;
                   14736:    return FALSE;
                   14737:  }
                   14738:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14739:    *exc = GDOME_INVALID_STATE_ERR;
                   14740:    return FALSE;
                   14741:  }
                   14742:  *exc = 0;
1.2     ! paf      14743:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      14744: }
                   14745: /**
                   14746:  * gdome_pi_hasChildNodes:
                   14747:  * @self:  Node Object ref
                   14748:  * @exc:  Exception Object ref
                   14749:  *
                   14750:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   14751:  */
                   14752: GdomeBoolean
                   14753: gdome_pi_hasChildNodes (GdomeProcessingInstruction *self, GdomeException *exc)
                   14754: {
                   14755:  if (self == NULL) {
                   14756:    *exc = GDOME_NULL_POINTER_ERR;
                   14757:    return FALSE;
                   14758:  }
                   14759:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14760:    *exc = GDOME_INVALID_STATE_ERR;
                   14761:    return FALSE;
                   14762:  }
                   14763:  *exc = 0;
1.2     ! paf      14764:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      14765: }
                   14766: /**
                   14767:  * gdome_pi_insertBefore:
                   14768:  * @self:  Node Object ref
                   14769:  * @newChild:  The new node to put in the child list
                   14770:  * @refChild:  the reference node, i.e., the node before which the new node
                   14771:  *             must be inserted.
                   14772:  * @exc:  Exception Object ref
                   14773:  *
                   14774:  * Inserts the node @newChild before the existing child node @refChild. If
                   14775:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   14776:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   14777:  * in the same order, before @refChild. If the @newChild is already in the
                   14778:  * tree, it is first removed.
                   14779:  *
                   14780:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   14781:  * allow children of the type of the @newChild node, or if the node to insert is
                   14782:  * one of this node's ancestors or this node itself.
                   14783:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   14784:  * document than the one that created this node.
                   14785:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   14786:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   14787:  * Returns: the node being inserted.
                   14788:  */
1.2     ! paf      14789: xmlNode *
        !          14790: gdome_pi_insertBefore (GdomeProcessingInstruction *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      14791: {
                   14792:  if (self == NULL) {
                   14793:    *exc = GDOME_NULL_POINTER_ERR;
                   14794:    return NULL;
                   14795:  }
                   14796:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14797:    *exc = GDOME_INVALID_STATE_ERR;
                   14798:    return NULL;
                   14799:  }
                   14800:  *exc = 0;
1.2     ! paf      14801:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      14802: }
                   14803: /**
                   14804:  * gdome_pi_isSupported:
                   14805:  * @self:  Node Object ref
                   14806:  * @feature:  The name of the feature to test.
                   14807:  * @version:  This is the version number of the feature to test. In Level 2,
                   14808:  *            version 1, this is the string "2.0". If the version is not
                   14809:  *            specified, supporting any version of the feature will cause the
                   14810:  *            method to return %TRUE.
                   14811:  * @exc:  Exception Object ref
                   14812:  *
                   14813:  * Tests whether the DOM implementation implements a specific feature and that
                   14814:  * feature is supported by this node.
                   14815:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   14816:  * otherwise.
                   14817:  */
                   14818: GdomeBoolean
                   14819: gdome_pi_isSupported (GdomeProcessingInstruction *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   14820: {
                   14821:  if (self == NULL) {
                   14822:    *exc = GDOME_NULL_POINTER_ERR;
                   14823:    return FALSE;
                   14824:  }
                   14825:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14826:    *exc = GDOME_INVALID_STATE_ERR;
                   14827:    return FALSE;
                   14828:  }
                   14829:  *exc = 0;
1.2     ! paf      14830:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      14831: }
                   14832: /**
                   14833:  * gdome_pi_normalize:
                   14834:  * @self:  Node Object ref
                   14835:  * @exc:  Exception Object ref
                   14836:  *
                   14837:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   14838:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   14839:  * elements, comments, processing instructions, CDATA sections, and entity
                   14840:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   14841:  * nodes nor empty Text nodes.
                   14842:  */
                   14843: void
                   14844: gdome_pi_normalize (GdomeProcessingInstruction *self, GdomeException *exc)
                   14845: {
                   14846:  if (self == NULL) {
                   14847:    *exc = GDOME_NULL_POINTER_ERR;
                   14848:    return;
                   14849:  }
                   14850:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14851:    *exc = GDOME_INVALID_STATE_ERR;
                   14852:    return;
                   14853:  }
                   14854:  *exc = 0;
1.2     ! paf      14855:  ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      14856: }
                   14857: /**
                   14858:  * gdome_pi_removeChild:
                   14859:  * @self:  Node Object ref
                   14860:  * @oldChild:  The node being removed
                   14861:  * @exc:  Exception Object ref
                   14862:  *
                   14863:  * Removes the child node indicated by @oldChild from the list of children, and
                   14864:  * returns it.
                   14865:  *
                   14866:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   14867:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   14868:  * Returns: the node removed.
                   14869:  */
1.2     ! paf      14870: xmlNode *
        !          14871: gdome_pi_removeChild (GdomeProcessingInstruction *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      14872: {
                   14873:  if (self == NULL) {
                   14874:    *exc = GDOME_NULL_POINTER_ERR;
                   14875:    return NULL;
                   14876:  }
                   14877:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14878:    *exc = GDOME_INVALID_STATE_ERR;
                   14879:    return NULL;
                   14880:  }
                   14881:  *exc = 0;
1.2     ! paf      14882:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      14883: }
                   14884: /**
                   14885:  * gdome_pi_replaceChild:
                   14886:  * @self:  Node Object ref
                   14887:  * @newChild:  The new node to put in the child list
                   14888:  * @oldChild:  The node being replaced in the list
                   14889:  * @exc:  Exception Object ref
                   14890:  *
                   14891:  * Replaces the child node @oldChild with @newChild in the list of children,
                   14892:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   14893:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   14894:  * inserted in the same order. If the @newChild is already in the tree, it is
                   14895:  * first removed.
                   14896:  *
                   14897:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   14898:  * not allow children of the type of the @newChild node, or if the node to put
                   14899:  * in is one of this node's ancestors or this node itself.
                   14900:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   14901:  * document than the one that created this node.
                   14902:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   14903:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   14904:  * Returns: the node replaced.
                   14905:  */
1.2     ! paf      14906: xmlNode *
        !          14907: gdome_pi_replaceChild (GdomeProcessingInstruction *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      14908: {
                   14909:  if (self == NULL) {
                   14910:    *exc = GDOME_NULL_POINTER_ERR;
                   14911:    return NULL;
                   14912:  }
                   14913:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14914:    *exc = GDOME_INVALID_STATE_ERR;
                   14915:    return NULL;
                   14916:  }
                   14917:  *exc = 0;
1.2     ! paf      14918:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      14919: }
                   14920: /**
                   14921:  * gdome_pi_addEventListener:
                   14922:  * @self:  Node Object ref
                   14923:  * @type:  the event type for which the user is registering
                   14924:  * @listener:  the listener parameter takes an interface implemented by the
                   14925:  *             user which contains the methods to be called when the event occurs.
                   14926:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   14927:  *               capture. After initiating capture, all events of the specified
                   14928:  *               type will be dispatched to the registered EventListener before
                   14929:  *               being dispatched to any EventTargets beneath them in the tree.
                   14930:  *               Events which are bubbling upward through the tree will not
                   14931:  *               trigger an EventListener designated to use capture.
                   14932:  * @exc:  Exception Object ref
                   14933:  *
                   14934:  * This method allows the registration of event listeners on the event target.
                   14935:  * If an EventListener is added to an EventTarget while it is processing an
                   14936:  * event, it will not be triggered by the current actions but may be triggered
                   14937:  * during a later stage of event flow, such as the bubbling phase.
                   14938:  * If multiple identical EventListeners are registered on the same EventTarget
                   14939:  * with the same parameters the duplicate instances are discarded. They do not
                   14940:  * cause the EventListener to be called twice and since they are discarded
                   14941:  * they do not need to be removed with the removeEventListener method.
                   14942:  */
                   14943: void
                   14944: gdome_pi_addEventListener (GdomeProcessingInstruction *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   14945: {
                   14946:  if (self == NULL) {
                   14947:    *exc = GDOME_NULL_POINTER_ERR;
                   14948:    return;
                   14949:  }
                   14950:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14951:    *exc = GDOME_INVALID_STATE_ERR;
                   14952:    return;
                   14953:  }
                   14954:  *exc = 0;
1.2     ! paf      14955:  ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      14956: }
                   14957: /**
                   14958:  * gdome_pi_removeEventListener:
                   14959:  * @self:  Node Object ref
                   14960:  * @type:  Specifies the event type of the EventListener being removed.
                   14961:  * @listener:  The EventListener parameter indicates the EventListener to be
                   14962:  *             removed.
                   14963:  * @useCapture:  Specifies whether the EventListener being removed was
                   14964:  *               registered as a capturing listener or not. If a listener was
                   14965:  *               registered twice, one with capture and one without, each must
                   14966:  *               be removed separately. Removal of a capturing listener does
                   14967:  *               not affect a non-capturing version of the same listener, and
                   14968:  *               vice versa.
                   14969:  * @exc:  Exception Object ref
                   14970:  *
                   14971:  * This method allows the removal of event listeners from the event target. If
                   14972:  * an EventListener is removed from an EventTarget while it is processing an
                   14973:  * event, it will not be triggered by the current actions. EventListeners can
                   14974:  * never be invoked after being removed. Calling removeEventListener with
                   14975:  * arguments which do not identify any currently registered EventListener on
                   14976:  * the EventTarget has no effect.
                   14977:  */
                   14978: void
                   14979: gdome_pi_removeEventListener (GdomeProcessingInstruction *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   14980: {
                   14981:  if (self == NULL) {
                   14982:    *exc = GDOME_NULL_POINTER_ERR;
                   14983:    return;
                   14984:  }
                   14985:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   14986:    *exc = GDOME_INVALID_STATE_ERR;
                   14987:    return;
                   14988:  }
                   14989:  *exc = 0;
1.2     ! paf      14990:  ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      14991: }
                   14992: /**
                   14993:  * gdome_pi_dispatchEvent:
                   14994:  * @self:  Node Object ref
                   14995:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   14996:  *        used in processing the event.
                   14997:  * @exc:  Exception Object ref
                   14998:  *
                   14999:  * This method allows the dispatch of events into the implementations event
                   15000:  * model. Events dispatched in this manner will have the same capturing and
                   15001:  * bubbling behavior as events dispatched directly by the implementation. The
                   15002:  * target of the event is the EventTarget on which dispatchEvent is called.
                   15003:  *
                   15004:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   15005:  * specified by initializing the event before dispatchEvent was called.
                   15006:  * Specification of the Event's type as %NULL or an empty string will also
                   15007:  * trigger this exception.
                   15008:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   15009:  *          is %TRUE.
                   15010:  */
                   15011: GdomeBoolean
                   15012: gdome_pi_dispatchEvent (GdomeProcessingInstruction *self, GdomeEvent *evt, GdomeException *exc)
                   15013: {
                   15014:  if (self == NULL) {
                   15015:    *exc = GDOME_NULL_POINTER_ERR;
                   15016:    return FALSE;
                   15017:  }
                   15018:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15019:    *exc = GDOME_INVALID_STATE_ERR;
                   15020:    return FALSE;
                   15021:  }
                   15022:  *exc = 0;
1.2     ! paf      15023:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      15024: }
                   15025: /**
                   15026:  * gdome_pi_subTreeDispatchEvent:
                   15027:  * @self:  Node Object ref
                   15028:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   15029:  *        used in processing the event.
                   15030:  * @exc:  Exception Object ref
                   15031:  *
                   15032:  * This method allows the dispatch of events into the implementations event
                   15033:  * model. Events dispatched in this manner will have the same capturing and
                   15034:  * bubbling behavior as events dispatched directly by the implementation. The
                   15035:  * target of the event is any nodes in the subtree of the EventTarget on which
                   15036:  * dispatchEvent is called.
                   15037:  *
                   15038:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   15039:  * specified by initializing the event before dispatchEvent was called.
                   15040:  * Specification of the Event's type as %NULL or an empty string will also
                   15041:  * trigger this exception.
                   15042:  */
                   15043: void
                   15044: gdome_pi_subTreeDispatchEvent (GdomeProcessingInstruction *self, GdomeEvent *evt, GdomeException *exc)
                   15045: {
                   15046:  if (self == NULL) {
                   15047:    *exc = GDOME_NULL_POINTER_ERR;
                   15048:    return;
                   15049:  }
                   15050:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15051:    *exc = GDOME_INVALID_STATE_ERR;
                   15052:    return;
                   15053:  }
                   15054:  *exc = 0;
1.2     ! paf      15055:  ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      15056: }
                   15057: /**
                   15058:  * gdome_pi_canAppend:
                   15059:  * @self:  Node Object ref
                   15060:  * @newChild:  The Node Object ref of the node to test
                   15061:  * @exc:  Exception Object ref
                   15062:  *
                   15063:  * Tests if a @newChild can be added in the child list of this node.
                   15064:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   15065:  */
                   15066: GdomeBoolean
1.2     ! paf      15067: gdome_pi_canAppend (GdomeProcessingInstruction *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      15068: {
                   15069:  if (self == NULL) {
                   15070:    *exc = GDOME_NULL_POINTER_ERR;
                   15071:    return FALSE;
                   15072:  }
                   15073:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15074:    *exc = GDOME_INVALID_STATE_ERR;
                   15075:    return FALSE;
                   15076:  }
                   15077:  *exc = 0;
1.2     ! paf      15078:  return ((Gdome_xml_ProcessingInstruction *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      15079: }
                   15080: 
                   15081: /******************************************************************************
                   15082:           GdomeXPathNamespace interface API
                   15083:  ******************************************************************************/
                   15084: /**
                   15085:  * gdome_xpns_ownerElement:
                   15086:  * @self:  XPathNamespace Object ref
                   15087:  * @exc:  Exception Object ref
                   15088:  *
                   15089:  * NOT IMPLEMENTED
                   15090:  * Returns: %NULL
                   15091:  */
                   15092: GdomeElement *
                   15093: gdome_xpns_ownerElement (GdomeXPathNamespace *self, GdomeException *exc)
                   15094: {
                   15095:  if (self == NULL) {
                   15096:    *exc = GDOME_NULL_POINTER_ERR;
                   15097:    return NULL;
                   15098:  }
                   15099:  if (((Gdome_xml_EntityReference *)self)->n == NULL) {
                   15100:    *exc = GDOME_INVALID_STATE_ERR;
                   15101:    return NULL;
                   15102:  }
                   15103:  *exc = 0;
                   15104:  return ((Gdome_xml_XPathNamespace *)self)->vtab->ownerElement (self, exc);
                   15105: }
                   15106: /**
                   15107:  * gdome_xpns_attributes:
                   15108:  * @self:  Node Object ref
                   15109:  * @exc:  Exception Object ref
                   15110:  *
                   15111:  * Returns: a NamedNodeMap containing the attributes of this node (if it is an
                   15112:  * Element) or %NULL otherwise.
                   15113:  */
                   15114: GdomeNamedNodeMap *
                   15115: gdome_xpns_attributes (GdomeXPathNamespace *self, GdomeException *exc)
                   15116: {
                   15117:  if (self == NULL) {
                   15118:    *exc = GDOME_NULL_POINTER_ERR;
                   15119:    return NULL;
                   15120:  }
                   15121:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15122:    *exc = GDOME_INVALID_STATE_ERR;
                   15123:    return NULL;
                   15124:  }
                   15125:  *exc = 0;
1.2     ! paf      15126:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.attributes ((xmlNode *)self, exc);
1.1       paf      15127: }
                   15128: /**
                   15129:  * gdome_xpns_childNodes:
                   15130:  * @self:  Node Object ref
                   15131:  * @exc:  Exception Object ref
                   15132:  *
                   15133:  * Returns: a NodeList that contains all children of this node. If there are no
                   15134:  * children, this is a NodeList containing no nodes.  Note that attributes are
                   15135:  * not considered to be children of element nodes - use gdome_n_attributes to
                   15136:  * obtain the attributes.
                   15137:  */
                   15138: GdomeNodeList *
                   15139: gdome_xpns_childNodes (GdomeXPathNamespace *self, GdomeException *exc)
                   15140: {
                   15141:  if (self == NULL) {
                   15142:    *exc = GDOME_NULL_POINTER_ERR;
                   15143:    return NULL;
                   15144:  }
                   15145:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15146:    *exc = GDOME_INVALID_STATE_ERR;
                   15147:    return NULL;
                   15148:  }
                   15149:  *exc = 0;
1.2     ! paf      15150:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.childNodes ((xmlNode *)self, exc);
1.1       paf      15151: }
                   15152: /**
                   15153:  * gdome_xpns_firstChild:
                   15154:  * @self:  Node Object ref
                   15155:  * @exc:  Exception Object ref
                   15156:  * 
                   15157:  * Returns: the first child of this node. If there is no such node,
                   15158:  * this returns %NULL.
                   15159:  */
1.2     ! paf      15160: xmlNode *
1.1       paf      15161: gdome_xpns_firstChild (GdomeXPathNamespace *self, GdomeException *exc)
                   15162: {
                   15163:  if (self == NULL) {
                   15164:    *exc = GDOME_NULL_POINTER_ERR;
                   15165:    return NULL;
                   15166:  }
                   15167:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15168:    *exc = GDOME_INVALID_STATE_ERR;
                   15169:    return NULL;
                   15170:  }
                   15171:  *exc = 0;
1.2     ! paf      15172:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.firstChild ((xmlNode *)self, exc);
1.1       paf      15173: }
                   15174: /**
                   15175:  * gdome_xpns_lastChild:
                   15176:  * @self:  Node Object ref
                   15177:  * @exc:  Exception Object ref
                   15178:  *
                   15179:  * Returns: the last child of this node. If there is no such node,
                   15180:  * this returns %NULL.
                   15181:  */
1.2     ! paf      15182: xmlNode *
1.1       paf      15183: gdome_xpns_lastChild (GdomeXPathNamespace *self, GdomeException *exc)
                   15184: {
                   15185:  if (self == NULL) {
                   15186:    *exc = GDOME_NULL_POINTER_ERR;
                   15187:    return NULL;
                   15188:  }
                   15189:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15190:    *exc = GDOME_INVALID_STATE_ERR;
                   15191:    return NULL;
                   15192:  }
                   15193:  *exc = 0;
1.2     ! paf      15194:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.lastChild ((xmlNode *)self, exc);
1.1       paf      15195: }
                   15196: /**
                   15197:  * gdome_xpns_localName:
                   15198:  * @self:  Node Objects ref
                   15199:  * @exc:  Exception Object ref
                   15200:  *
                   15201:  * Returns: the local part of the qualified name of this node.
                   15202:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   15203:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   15204:  * always %NULL.
                   15205:  */
                   15206: GdomeDOMString *
                   15207: gdome_xpns_localName (GdomeXPathNamespace *self, GdomeException *exc)
                   15208: {
                   15209:  if (self == NULL) {
                   15210:    *exc = GDOME_NULL_POINTER_ERR;
                   15211:    return NULL;
                   15212:  }
                   15213:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15214:    *exc = GDOME_INVALID_STATE_ERR;
                   15215:    return NULL;
                   15216:  }
                   15217:  *exc = 0;
1.2     ! paf      15218:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.localName ((xmlNode *)self, exc);
1.1       paf      15219: }
                   15220: /**
                   15221:  * gdome_xpns_namespaceURI:
                   15222:  * @self:  Node Objects ref
                   15223:  * @exc:  Exception Object ref
                   15224:  *
                   15225:  * Returns: the namespace URI of this node, or %NULL if it is unspecified.
                   15226:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   15227:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   15228:  * always %NULL.
                   15229:  */
                   15230: GdomeDOMString *
                   15231: gdome_xpns_namespaceURI (GdomeXPathNamespace *self, GdomeException *exc)
                   15232: {
                   15233:  if (self == NULL) {
                   15234:    *exc = GDOME_NULL_POINTER_ERR;
                   15235:    return NULL;
                   15236:  }
                   15237:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15238:    *exc = GDOME_INVALID_STATE_ERR;
                   15239:    return NULL;
                   15240:  }
                   15241:  *exc = 0;
1.2     ! paf      15242:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.namespaceURI ((xmlNode *)self, exc);
1.1       paf      15243: }
                   15244: /**
                   15245:  * gdome_xpns_nextSibling:
                   15246:  * @self:  Node Object ref
                   15247:  * @exc:  Exception Object ref
                   15248:  *
                   15249:  * Returns: the node immediately following this node. If there is no such
                   15250:  * node, this returns %NULL.
                   15251:  */
1.2     ! paf      15252: xmlNode *
1.1       paf      15253: gdome_xpns_nextSibling (GdomeXPathNamespace *self, GdomeException *exc)
                   15254: {
                   15255:  if (self == NULL) {
                   15256:    *exc = GDOME_NULL_POINTER_ERR;
                   15257:    return NULL;
                   15258:  }
                   15259:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15260:    *exc = GDOME_INVALID_STATE_ERR;
                   15261:    return NULL;
                   15262:  }
                   15263:  *exc = 0;
1.2     ! paf      15264:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.nextSibling ((xmlNode *)self, exc);
1.1       paf      15265: }
                   15266: /**
                   15267:  * gdome_xpns_nodeName:
                   15268:  * @self:  Node Object ref
                   15269:  * @exc:  Exception Object ref
                   15270:  *
                   15271:  * Returns: the name of this node, depending on its type.
                   15272:  */
                   15273: GdomeDOMString *
                   15274: gdome_xpns_nodeName (GdomeXPathNamespace *self, GdomeException *exc)
                   15275: {
                   15276:  if (self == NULL) {
                   15277:    *exc = GDOME_NULL_POINTER_ERR;
                   15278:    return NULL;
                   15279:  }
                   15280:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15281:    *exc = GDOME_INVALID_STATE_ERR;
                   15282:    return NULL;
                   15283:  }
                   15284:  *exc = 0;
1.2     ! paf      15285:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.nodeName ((xmlNode *)self, exc);
1.1       paf      15286: }
                   15287: /**
                   15288:  * gdome_xpns_nodeType:
                   15289:  * @self:  Node Object ref
                   15290:  * @exc:  Exception Object ref
                   15291:  *
                   15292:  * Returns: an integer bigger than %0 representing the type of the underlying
                   15293:  * object or %0 on error.
                   15294:  */
                   15295: unsigned short
                   15296: gdome_xpns_nodeType (GdomeXPathNamespace *self, GdomeException *exc)
                   15297: {
                   15298:  if (self == NULL) {
                   15299:    *exc = GDOME_NULL_POINTER_ERR;
                   15300:    return 0;
                   15301:  }
                   15302:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15303:    *exc = GDOME_INVALID_STATE_ERR;
                   15304:    return 0;
                   15305:  }
                   15306:  *exc = 0;
1.2     ! paf      15307:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.nodeType ((xmlNode *)self, exc);
1.1       paf      15308: }
                   15309: /**
                   15310:  * gdome_xpns_nodeValue:
                   15311:  * @self:  Node Object ref
                   15312:  * @exc:  Exception Object ref
                   15313:  *
                   15314:  * Returns: the value of this node, depending on its type.
                   15315:  */
                   15316: GdomeDOMString *
                   15317: gdome_xpns_nodeValue (GdomeXPathNamespace *self, GdomeException *exc)
                   15318: {
                   15319:  if (self == NULL) {
                   15320:    *exc = GDOME_NULL_POINTER_ERR;
                   15321:    return NULL;
                   15322:  }
                   15323:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15324:    *exc = GDOME_INVALID_STATE_ERR;
                   15325:    return NULL;
                   15326:  }
                   15327:  *exc = 0;
1.2     ! paf      15328:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.nodeValue ((xmlNode *)self, exc);
1.1       paf      15329: }
                   15330: /**
                   15331:  * gdome_xpns_set_nodeValue:
                   15332:  * @self:  Node Object ref
                   15333:  * @nodeValue:  The new value for this node.
                   15334:  * @exc:  Exception Object ref
                   15335:  *
                   15336:  * Sets The value of this node, depending on its type.
                   15337:  *
                   15338:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   15339:  */
                   15340: void
                   15341: gdome_xpns_set_nodeValue (GdomeXPathNamespace *self, GdomeDOMString *nodeValue, GdomeException *exc)
                   15342: {
                   15343:  if (self == NULL) {
                   15344:    *exc = GDOME_NULL_POINTER_ERR;
                   15345:    return;
                   15346:  }
                   15347:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15348:    *exc = GDOME_INVALID_STATE_ERR;
                   15349:    return;
                   15350:  }
                   15351:  *exc = 0;
1.2     ! paf      15352:  ((Gdome_xml_XPathNamespace *)self)->vtab->super.set_nodeValue ((xmlNode *)self, nodeValue, exc);
1.1       paf      15353: }
                   15354: /**
                   15355:  * gdome_xpns_ownerDocument:
                   15356:  * @self:  Node Objects ref
                   15357:  * @exc:  Exception Object ref
                   15358:  *
                   15359:  * Returns: the documment object associated with this node. This is also the
                   15360:  * Document object used to create new nodes. When this node is a Document or a
                   15361:  * DocumentType which is not used with any Document yet, this is %NULL.
                   15362:  */
                   15363: GdomeDocument *
                   15364: gdome_xpns_ownerDocument (GdomeXPathNamespace *self, GdomeException *exc)
                   15365: {
                   15366:  if (self == NULL) {
                   15367:    *exc = GDOME_NULL_POINTER_ERR;
                   15368:    return NULL;
                   15369:  }
                   15370:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15371:    *exc = GDOME_INVALID_STATE_ERR;
                   15372:    return NULL;
                   15373:  }
                   15374:  *exc = 0;
1.2     ! paf      15375:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.ownerDocument ((xmlNode *)self, exc);
1.1       paf      15376: }
                   15377: /**
                   15378:  * gdome_xpns_parentNode:
                   15379:  * @self: Node Object ref
                   15380:  * @exc: Exception Object ref
                   15381:  *
                   15382:  * Returns: the parent of this node. All nodes, except Attr,
                   15383:  * Document, DocumentFragment, Entity, and Notation may have a parent. However,
                   15384:  * if a node has just been created and not yet added to the tree, or if it has
                   15385:  * been removed from the tree, this is %NULL.
                   15386:  */
1.2     ! paf      15387: xmlNode *
1.1       paf      15388: gdome_xpns_parentNode (GdomeXPathNamespace *self, GdomeException *exc)
                   15389: {
                   15390:  if (self == NULL) {
                   15391:    *exc = GDOME_NULL_POINTER_ERR;
                   15392:    return NULL;
                   15393:  }
                   15394:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15395:    *exc = GDOME_INVALID_STATE_ERR;
                   15396:    return NULL;
                   15397:  }
                   15398:  *exc = 0;
1.2     ! paf      15399:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.parentNode ((xmlNode *)self, exc);
1.1       paf      15400: }
                   15401: /**
                   15402:  * gdome_xpns_prefix:
                   15403:  * @self:  Node Objects ref
                   15404:  * @exc:  Exception Object ref
                   15405:  *
                   15406:  * Returns: the namespace prefix of this node, or %NULL if it is unspecified.
                   15407:  * For nodes of any type other than %GDOME_ELEMENT_NODE and
                   15408:  * %GDOME_ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, this is
                   15409:  * always %NULL.
                   15410:  */
                   15411: GdomeDOMString *
                   15412: gdome_xpns_prefix (GdomeXPathNamespace *self, GdomeException *exc)
                   15413: {
                   15414:  if (self == NULL) {
                   15415:    *exc = GDOME_NULL_POINTER_ERR;
                   15416:    return NULL;
                   15417:  }
                   15418:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15419:    *exc = GDOME_INVALID_STATE_ERR;
                   15420:    return NULL;
                   15421:  }
                   15422:  *exc = 0;
1.2     ! paf      15423:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.prefix ((xmlNode *)self, exc);
1.1       paf      15424: }
                   15425: /**
                   15426:  * gdome_xpns_set_prefix:
                   15427:  * @self:  Node Object ref
                   15428:  * @prefix:  The new prefix for this node.
                   15429:  * @exc:  Exception Object ref
                   15430:  *
                   15431:  * Sets a new nemaspace prefix for this node.
                   15432:  *
                   15433:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   15434:  * %GDOME_NAMESPACE_ERR: Raised if the specified @prefix is malformed per the
                   15435:  * Namespaces in XML specification, if the namespaceURI of this node is %NULL,
                   15436:  * if the specified prefix is "xml" and the namespaceURI of this node is
                   15437:  * different from "http://www.w3.org/XML/1998/namespace", if this node is an
                   15438:  * attribute and the specified prefix is "xmlns" and the namespaceURI of this
                   15439:  * node is different from "http://www.w3.org/2000/xmlns/", or if this node is
                   15440:  * an attribute and the qualifiedName of this node is "xmlns".
                   15441:  */
                   15442: void
                   15443: gdome_xpns_set_prefix (GdomeXPathNamespace *self, GdomeDOMString *prefix, GdomeException *exc)
                   15444: {
                   15445:  if (self == NULL) {
                   15446:    *exc = GDOME_NULL_POINTER_ERR;
                   15447:    return;
                   15448:  }
                   15449:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15450:    *exc = GDOME_INVALID_STATE_ERR;
                   15451:    return;
                   15452:  }
                   15453:  *exc = 0;
1.2     ! paf      15454:  ((Gdome_xml_XPathNamespace *)self)->vtab->super.set_prefix ((xmlNode *)self, prefix, exc);
1.1       paf      15455: }
                   15456: /**
                   15457:  * gdome_xpns_previousSibling:
                   15458:  * @self:  Node Object ref
                   15459:  * @exc:  Exception Object ref
                   15460:  *
                   15461:  * Returns: the node immediately preceding this node. If there is no such
                   15462:  * node, this returns %NULL.
                   15463:  */
1.2     ! paf      15464: xmlNode *
1.1       paf      15465: gdome_xpns_previousSibling (GdomeXPathNamespace *self, GdomeException *exc)
                   15466: {
                   15467:  if (self == NULL) {
                   15468:    *exc = GDOME_NULL_POINTER_ERR;
                   15469:    return NULL;
                   15470:  }
                   15471:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15472:    *exc = GDOME_INVALID_STATE_ERR;
                   15473:    return NULL;
                   15474:  }
                   15475:  *exc = 0;
1.2     ! paf      15476:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.previousSibling ((xmlNode *)self, exc);
1.1       paf      15477: }
                   15478: /**
                   15479:  * gdome_xpns_ref:
                   15480:  * @self:  Node Object ref
                   15481:  * @exc:  Exception Object ref
                   15482:  *
                   15483:  * Increase the reference count of the specified Node.
                   15484:  */
                   15485: void
                   15486: gdome_xpns_ref (GdomeXPathNamespace *self, GdomeException *exc)
                   15487: {
                   15488:  if (self == NULL) {
                   15489:    *exc = GDOME_NULL_POINTER_ERR;
                   15490:    return;
                   15491:  }
                   15492:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15493:    *exc = GDOME_INVALID_STATE_ERR;
                   15494:    return;
                   15495:  }
                   15496:  *exc = 0;
1.2     ! paf      15497:  ((Gdome_xml_XPathNamespace *)self)->vtab->super.ref ((xmlNode *)self, exc);
1.1       paf      15498: }
                   15499: /**
                   15500:  * gdome_xpns_unref:
                   15501:  * @self:  Node Object ref
                   15502:  * @exc:  Exception Object ref
                   15503:  *
                   15504:  * Decrease the reference count of the specified Node. Free the Node structure
                   15505:  * if the Node will have zero reference.
                   15506:  */
                   15507: void
                   15508: gdome_xpns_unref (GdomeXPathNamespace *self, GdomeException *exc)
                   15509: {
                   15510:  if (self == NULL) {
                   15511:    *exc = GDOME_NULL_POINTER_ERR;
                   15512:    return;
                   15513:  }
                   15514:  *exc = 0;
                   15515:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15516:    if (((Gdome_xml_Node *)self)->refcnt > 0)
                   15517:      ((Gdome_xml_Node *)self)->refcnt--;
                   15518: 
                   15519:    if (((Gdome_xml_Node *)self)->refcnt == 0 && ((Gdome_xml_Node *)self)->ll == NULL) {
                   15520: #ifdef DEBUG_REFCNT
                   15521:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODE);
                   15522: #endif
                   15523:      g_free (self);
                   15524:    }
                   15525:    return;
                   15526:  }
1.2     ! paf      15527:  ((Gdome_xml_XPathNamespace *)self)->vtab->super.unref ((xmlNode *)self, exc);
1.1       paf      15528: }
                   15529: /**
                   15530:  * gdome_xpns_query_interface:
                   15531:  * @self:  Node Object ref
                   15532:  * @interface:  interface needed
                   15533:  * @exc:  Exception Object ref
                   15534:  *
                   15535:  * Returns: a reference to this object that implements the @interface needed,
                   15536:  *          or %NULL if the @interface is not supported by this Object.
                   15537:  */
                   15538: gpointer
                   15539: gdome_xpns_query_interface (GdomeXPathNamespace *self, const char *interface, GdomeException *exc)
                   15540: {
                   15541:  if (self == NULL) {
                   15542:    *exc = GDOME_NULL_POINTER_ERR;
                   15543:    return NULL;
                   15544:  }
                   15545:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15546:    *exc = GDOME_INVALID_STATE_ERR;
                   15547:    return NULL;
                   15548:  }
                   15549:  *exc = 0;
1.2     ! paf      15550:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.query_interface ((xmlNode *)self, interface, exc);
1.1       paf      15551: }
                   15552: /**
                   15553:  * gdome_xpns_appendChild:
                   15554:  * @self:  Node Object ref
                   15555:  * @newChild:  The node to add
                   15556:  * @exc:  Exception Object ref
                   15557:  *
                   15558:  * Adds the node @newChild to the end of the list of children of this node.
                   15559:  * If the @newChild is already in the tree, it is first removed. If it is a
                   15560:  * DocumentFragment node, the entire contents of the document fragment are
                   15561:  * moved into the child list of this node
                   15562:  *
                   15563:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   15564:  * allow children of the type of the @newChild node, or if the node to append is
                   15565:  * one of this node's ancestors or this node itself.
                   15566:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   15567:  * document than the one that created this node.
                   15568:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   15569:  * Returns: the node added.
                   15570:  */
1.2     ! paf      15571: xmlNode *
        !          15572: gdome_xpns_appendChild (GdomeXPathNamespace *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      15573: {
                   15574:  if (self == NULL) {
                   15575:    *exc = GDOME_NULL_POINTER_ERR;
                   15576:    return NULL;
                   15577:  }
                   15578:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15579:    *exc = GDOME_INVALID_STATE_ERR;
                   15580:    return NULL;
                   15581:  }
                   15582:  *exc = 0;
1.2     ! paf      15583:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.appendChild ((xmlNode *)self, newChild, exc);
1.1       paf      15584: }
                   15585: /**
                   15586:  * gdome_xpns_cloneNode:
                   15587:  * @self:  Node Object ref
                   15588:  * @deep:  If true, recursively clone the subtree under the specified node;
                   15589:  *         if false, clone only the node itself (and its attributes, if it is
                   15590:  *         an Element).
                   15591:  * @exc:  Exception Object ref
                   15592:  *
                   15593:  * Makes a duplicate of this node, i.e., serves as a generic copy
                   15594:  * constructor for nodes. The duplicate node has no parent; (parentNode is
                   15595:  * %NULL).
                   15596:  * %GDOME_DOCUMENT_TYPE_NODE, %GDOME_NOTATION_NODE and %GDOME_ENTITY_NODE
                   15597:  * nodes are not supported.
                   15598:  *
                   15599:  * %GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not
                   15600:  * supported.
                   15601:  * Returns: the duplicate node.
                   15602:  */
1.2     ! paf      15603: xmlNode *
1.1       paf      15604: gdome_xpns_cloneNode (GdomeXPathNamespace *self, GdomeBoolean deep, GdomeException *exc)
                   15605: {
                   15606:  if (self == NULL) {
                   15607:    *exc = GDOME_NULL_POINTER_ERR;
                   15608:    return NULL;
                   15609:  }
                   15610:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15611:    *exc = GDOME_INVALID_STATE_ERR;
                   15612:    return NULL;
                   15613:  }
                   15614:  *exc = 0;
1.2     ! paf      15615:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.cloneNode ((xmlNode *)self, deep, exc);
1.1       paf      15616: }
                   15617: /**
                   15618:  * gdome_xpns_hasAttributes:
                   15619:  * @self:  Node Object ref
                   15620:  * @exc:  Exception Object ref
                   15621:  *
                   15622:  * Returns: %TRUE if this node has any attributes, %FALSE otherwise.
                   15623:  */
                   15624: GdomeBoolean
                   15625: gdome_xpns_hasAttributes (GdomeXPathNamespace *self, GdomeException *exc)
                   15626: {
                   15627:  if (self == NULL) {
                   15628:    *exc = GDOME_NULL_POINTER_ERR;
                   15629:    return FALSE;
                   15630:  }
                   15631:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15632:    *exc = GDOME_INVALID_STATE_ERR;
                   15633:    return FALSE;
                   15634:  }
                   15635:  *exc = 0;
1.2     ! paf      15636:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.hasAttributes ((xmlNode *)self, exc);
1.1       paf      15637: }
                   15638: /**
                   15639:  * gdome_xpns_hasChildNodes:
                   15640:  * @self:  Node Object ref
                   15641:  * @exc:  Exception Object ref
                   15642:  *
                   15643:  * Returns: %TRUE if this node has any children, %FALSE otherwise.
                   15644:  */
                   15645: GdomeBoolean
                   15646: gdome_xpns_hasChildNodes (GdomeXPathNamespace *self, GdomeException *exc)
                   15647: {
                   15648:  if (self == NULL) {
                   15649:    *exc = GDOME_NULL_POINTER_ERR;
                   15650:    return FALSE;
                   15651:  }
                   15652:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15653:    *exc = GDOME_INVALID_STATE_ERR;
                   15654:    return FALSE;
                   15655:  }
                   15656:  *exc = 0;
1.2     ! paf      15657:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.hasChildNodes ((xmlNode *)self, exc);
1.1       paf      15658: }
                   15659: /**
                   15660:  * gdome_xpns_insertBefore:
                   15661:  * @self:  Node Object ref
                   15662:  * @newChild:  The new node to put in the child list
                   15663:  * @refChild:  the reference node, i.e., the node before which the new node
                   15664:  *             must be inserted.
                   15665:  * @exc:  Exception Object ref
                   15666:  *
                   15667:  * Inserts the node @newChild before the existing child node @refChild. If
                   15668:  * @refChild is %NULL, insert @newChild at the end of the list of children.
                   15669:  * If @newChild is a DocumentFragment node, all of its children are inserted,
                   15670:  * in the same order, before @refChild. If the @newChild is already in the
                   15671:  * tree, it is first removed.
                   15672:  *
                   15673:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
                   15674:  * allow children of the type of the @newChild node, or if the node to insert is
                   15675:  * one of this node's ancestors or this node itself.
                   15676:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   15677:  * document than the one that created this node.
                   15678:  * %GDOME_NOT_FOUND_ERR: Raised if @refChild is not a child of this node.
                   15679:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   15680:  * Returns: the node being inserted.
                   15681:  */
1.2     ! paf      15682: xmlNode *
        !          15683: gdome_xpns_insertBefore (GdomeXPathNamespace *self, xmlNode *newChild, xmlNode *refChild, GdomeException *exc)
1.1       paf      15684: {
                   15685:  if (self == NULL) {
                   15686:    *exc = GDOME_NULL_POINTER_ERR;
                   15687:    return NULL;
                   15688:  }
                   15689:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15690:    *exc = GDOME_INVALID_STATE_ERR;
                   15691:    return NULL;
                   15692:  }
                   15693:  *exc = 0;
1.2     ! paf      15694:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.insertBefore ((xmlNode *)self, newChild, refChild, exc);
1.1       paf      15695: }
                   15696: /**
                   15697:  * gdome_xpns_isSupported:
                   15698:  * @self:  Node Object ref
                   15699:  * @feature:  The name of the feature to test.
                   15700:  * @version:  This is the version number of the feature to test. In Level 2,
                   15701:  *            version 1, this is the string "2.0". If the version is not
                   15702:  *            specified, supporting any version of the feature will cause the
                   15703:  *            method to return %TRUE.
                   15704:  * @exc:  Exception Object ref
                   15705:  *
                   15706:  * Tests whether the DOM implementation implements a specific feature and that
                   15707:  * feature is supported by this node.
                   15708:  * Returns: %TRUE if the specified feature is supported on this node, %FALSE
                   15709:  * otherwise.
                   15710:  */
                   15711: GdomeBoolean
                   15712: gdome_xpns_isSupported (GdomeXPathNamespace *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc)
                   15713: {
                   15714:  if (self == NULL) {
                   15715:    *exc = GDOME_NULL_POINTER_ERR;
                   15716:    return FALSE;
                   15717:  }
                   15718:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15719:    *exc = GDOME_INVALID_STATE_ERR;
                   15720:    return FALSE;
                   15721:  }
                   15722:  *exc = 0;
1.2     ! paf      15723:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.isSupported ((xmlNode *)self, feature, version, exc);
1.1       paf      15724: }
                   15725: /**
                   15726:  * gdome_xpns_normalize:
                   15727:  * @self:  Node Object ref
                   15728:  * @exc:  Exception Object ref
                   15729:  *
                   15730:  * Puts all Text nodes in the full depth of the sub-tree underneath this Node,
                   15731:  * including attribute nodes, into a "normal" form where only structure (e.g.,
                   15732:  * elements, comments, processing instructions, CDATA sections, and entity
                   15733:  * references) separates Text nodes, i.e., there are neither adjacent Text
                   15734:  * nodes nor empty Text nodes.
                   15735:  */
                   15736: void
                   15737: gdome_xpns_normalize (GdomeXPathNamespace *self, GdomeException *exc)
                   15738: {
                   15739:  if (self == NULL) {
                   15740:    *exc = GDOME_NULL_POINTER_ERR;
                   15741:    return;
                   15742:  }
                   15743:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15744:    *exc = GDOME_INVALID_STATE_ERR;
                   15745:    return;
                   15746:  }
                   15747:  *exc = 0;
1.2     ! paf      15748:  ((Gdome_xml_XPathNamespace *)self)->vtab->super.normalize ((xmlNode *)self, exc);
1.1       paf      15749: }
                   15750: /**
                   15751:  * gdome_xpns_removeChild:
                   15752:  * @self:  Node Object ref
                   15753:  * @oldChild:  The node being removed
                   15754:  * @exc:  Exception Object ref
                   15755:  *
                   15756:  * Removes the child node indicated by @oldChild from the list of children, and
                   15757:  * returns it.
                   15758:  *
                   15759:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   15760:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   15761:  * Returns: the node removed.
                   15762:  */
1.2     ! paf      15763: xmlNode *
        !          15764: gdome_xpns_removeChild (GdomeXPathNamespace *self, xmlNode *oldChild, GdomeException *exc)
1.1       paf      15765: {
                   15766:  if (self == NULL) {
                   15767:    *exc = GDOME_NULL_POINTER_ERR;
                   15768:    return NULL;
                   15769:  }
                   15770:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15771:    *exc = GDOME_INVALID_STATE_ERR;
                   15772:    return NULL;
                   15773:  }
                   15774:  *exc = 0;
1.2     ! paf      15775:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.removeChild ((xmlNode *)self, oldChild, exc);
1.1       paf      15776: }
                   15777: /**
                   15778:  * gdome_xpns_replaceChild:
                   15779:  * @self:  Node Object ref
                   15780:  * @newChild:  The new node to put in the child list
                   15781:  * @oldChild:  The node being replaced in the list
                   15782:  * @exc:  Exception Object ref
                   15783:  *
                   15784:  * Replaces the child node @oldChild with @newChild in the list of children,
                   15785:  * and returns the @oldChild node. If @newChild is a DocumentFragment object,
                   15786:  * @oldChild is replaced by all of the DocumentFragment children, which are
                   15787:  * inserted in the same order. If the @newChild is already in the tree, it is
                   15788:  * first removed.
                   15789:  *
                   15790:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
                   15791:  * not allow children of the type of the @newChild node, or if the node to put
                   15792:  * in is one of this node's ancestors or this node itself.
                   15793:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @newChild was created from a different
                   15794:  * document than the one that created this node.
                   15795:  * %GDOME_NOT_FOUND_ERR: Raised if @oldChild is not a child of this node.
                   15796:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
                   15797:  * Returns: the node replaced.
                   15798:  */
1.2     ! paf      15799: xmlNode *
        !          15800: gdome_xpns_replaceChild (GdomeXPathNamespace *self, xmlNode *newChild, xmlNode *oldChild, GdomeException *exc)
1.1       paf      15801: {
                   15802:  if (self == NULL) {
                   15803:    *exc = GDOME_NULL_POINTER_ERR;
                   15804:    return NULL;
                   15805:  }
                   15806:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15807:    *exc = GDOME_INVALID_STATE_ERR;
                   15808:    return NULL;
                   15809:  }
                   15810:  *exc = 0;
1.2     ! paf      15811:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.replaceChild ((xmlNode *)self, newChild, oldChild, exc);
1.1       paf      15812: }
                   15813: /**
                   15814:  * gdome_xpns_addEventListener:
                   15815:  * @self:  Node Object ref
                   15816:  * @type:  the event type for which the user is registering
                   15817:  * @listener:  the listener parameter takes an interface implemented by the
                   15818:  *             user which contains the methods to be called when the event occurs.
                   15819:  * @useCapture:  if %TRUE, useCapture indicates that the user wishes to initiate
                   15820:  *               capture. After initiating capture, all events of the specified
                   15821:  *               type will be dispatched to the registered EventListener before
                   15822:  *               being dispatched to any EventTargets beneath them in the tree.
                   15823:  *               Events which are bubbling upward through the tree will not
                   15824:  *               trigger an EventListener designated to use capture.
                   15825:  * @exc:  Exception Object ref
                   15826:  *
                   15827:  * This method allows the registration of event listeners on the event target.
                   15828:  * If an EventListener is added to an EventTarget while it is processing an
                   15829:  * event, it will not be triggered by the current actions but may be triggered
                   15830:  * during a later stage of event flow, such as the bubbling phase.
                   15831:  * If multiple identical EventListeners are registered on the same EventTarget
                   15832:  * with the same parameters the duplicate instances are discarded. They do not
                   15833:  * cause the EventListener to be called twice and since they are discarded
                   15834:  * they do not need to be removed with the removeEventListener method.
                   15835:  */
                   15836: void
                   15837: gdome_xpns_addEventListener (GdomeXPathNamespace *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   15838: {
                   15839:  if (self == NULL) {
                   15840:    *exc = GDOME_NULL_POINTER_ERR;
                   15841:    return;
                   15842:  }
                   15843:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15844:    *exc = GDOME_INVALID_STATE_ERR;
                   15845:    return;
                   15846:  }
                   15847:  *exc = 0;
1.2     ! paf      15848:  ((Gdome_xml_XPathNamespace *)self)->vtab->super.addEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      15849: }
                   15850: /**
                   15851:  * gdome_xpns_removeEventListener:
                   15852:  * @self:  Node Object ref
                   15853:  * @type:  Specifies the event type of the EventListener being removed.
                   15854:  * @listener:  The EventListener parameter indicates the EventListener to be
                   15855:  *             removed.
                   15856:  * @useCapture:  Specifies whether the EventListener being removed was
                   15857:  *               registered as a capturing listener or not. If a listener was
                   15858:  *               registered twice, one with capture and one without, each must
                   15859:  *               be removed separately. Removal of a capturing listener does
                   15860:  *               not affect a non-capturing version of the same listener, and
                   15861:  *               vice versa.
                   15862:  * @exc:  Exception Object ref
                   15863:  *
                   15864:  * This method allows the removal of event listeners from the event target. If
                   15865:  * an EventListener is removed from an EventTarget while it is processing an
                   15866:  * event, it will not be triggered by the current actions. EventListeners can
                   15867:  * never be invoked after being removed. Calling removeEventListener with
                   15868:  * arguments which do not identify any currently registered EventListener on
                   15869:  * the EventTarget has no effect.
                   15870:  */
                   15871: void
                   15872: gdome_xpns_removeEventListener (GdomeXPathNamespace *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc)
                   15873: {
                   15874:  if (self == NULL) {
                   15875:    *exc = GDOME_NULL_POINTER_ERR;
                   15876:    return;
                   15877:  }
                   15878:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15879:    *exc = GDOME_INVALID_STATE_ERR;
                   15880:    return;
                   15881:  }
                   15882:  *exc = 0;
1.2     ! paf      15883:  ((Gdome_xml_XPathNamespace *)self)->vtab->super.removeEventListener ((xmlNode *)self, type, listener, useCapture, exc);
1.1       paf      15884: }
                   15885: /**
                   15886:  * gdome_xpns_dispatchEvent:
                   15887:  * @self:  Node Object ref
                   15888:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   15889:  *        used in processing the event.
                   15890:  * @exc:  Exception Object ref
                   15891:  *
                   15892:  * This method allows the dispatch of events into the implementations event
                   15893:  * model. Events dispatched in this manner will have the same capturing and
                   15894:  * bubbling behavior as events dispatched directly by the implementation. The
                   15895:  * target of the event is the EventTarget on which dispatchEvent is called.
                   15896:  *
                   15897:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   15898:  * specified by initializing the event before dispatchEvent was called.
                   15899:  * Specification of the Event's type as %NULL or an empty string will also
                   15900:  * trigger this exception.
                   15901:  * Returns: if preventDefault was called the value is %FALSE, else the value
                   15902:  *          is %TRUE.
                   15903:  */
                   15904: GdomeBoolean
                   15905: gdome_xpns_dispatchEvent (GdomeXPathNamespace *self, GdomeEvent *evt, GdomeException *exc)
                   15906: {
                   15907:  if (self == NULL) {
                   15908:    *exc = GDOME_NULL_POINTER_ERR;
                   15909:    return FALSE;
                   15910:  }
                   15911:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15912:    *exc = GDOME_INVALID_STATE_ERR;
                   15913:    return FALSE;
                   15914:  }
                   15915:  *exc = 0;
1.2     ! paf      15916:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.dispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      15917: }
                   15918: /**
                   15919:  * gdome_xpns_subTreeDispatchEvent:
                   15920:  * @self:  Node Object ref
                   15921:  * @evt:  Specifies the event type, behavior, and contextual information to be
                   15922:  *        used in processing the event.
                   15923:  * @exc:  Exception Object ref
                   15924:  *
                   15925:  * This method allows the dispatch of events into the implementations event
                   15926:  * model. Events dispatched in this manner will have the same capturing and
                   15927:  * bubbling behavior as events dispatched directly by the implementation. The
                   15928:  * target of the event is any nodes in the subtree of the EventTarget on which
                   15929:  * dispatchEvent is called.
                   15930:  *
                   15931:  * GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not
                   15932:  * specified by initializing the event before dispatchEvent was called.
                   15933:  * Specification of the Event's type as %NULL or an empty string will also
                   15934:  * trigger this exception.
                   15935:  */
                   15936: void
                   15937: gdome_xpns_subTreeDispatchEvent (GdomeXPathNamespace *self, GdomeEvent *evt, GdomeException *exc)
                   15938: {
                   15939:  if (self == NULL) {
                   15940:    *exc = GDOME_NULL_POINTER_ERR;
                   15941:    return;
                   15942:  }
                   15943:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15944:    *exc = GDOME_INVALID_STATE_ERR;
                   15945:    return;
                   15946:  }
                   15947:  *exc = 0;
1.2     ! paf      15948:  ((Gdome_xml_XPathNamespace *)self)->vtab->super.subTreeDispatchEvent ((xmlNode *)self, evt, exc);
1.1       paf      15949: }
                   15950: /**
                   15951:  * gdome_xpns_canAppend:
                   15952:  * @self:  Node Object ref
                   15953:  * @newChild:  The Node Object ref of the node to test
                   15954:  * @exc:  Exception Object ref
                   15955:  *
                   15956:  * Tests if a @newChild can be added in the child list of this node.
                   15957:  * Returns: %TRUE if @newChild can be added, %FALSE otherwise.
                   15958:  */
                   15959: GdomeBoolean
1.2     ! paf      15960: gdome_xpns_canAppend (GdomeXPathNamespace *self, xmlNode *newChild, GdomeException *exc)
1.1       paf      15961: {
                   15962:  if (self == NULL) {
                   15963:    *exc = GDOME_NULL_POINTER_ERR;
                   15964:    return FALSE;
                   15965:  }
                   15966:  if (((Gdome_xml_Node *)self)->n == NULL) {
                   15967:    *exc = GDOME_INVALID_STATE_ERR;
                   15968:    return FALSE;
                   15969:  }
                   15970:  *exc = 0;
1.2     ! paf      15971:  return ((Gdome_xml_XPathNamespace *)self)->vtab->super.canAppend ((xmlNode *)self, newChild, exc);
1.1       paf      15972: }
                   15973: 
                   15974: /******************************************************************************
                   15975:           GdomeNodeList interface API
                   15976:  ******************************************************************************/
                   15977: /**
                   15978:  * gdome_nl_length:
                   15979:  * @self:  NodeList Object ref
                   15980:  * @exc:  Exception Object ref
                   15981:  *
                   15982:  * Returns: the number of nodes in the list. The range of valid child node
                   15983:  * indices is 0 to length-1 inclusive.
                   15984:  */
                   15985: gulong
                   15986: gdome_nl_length (GdomeNodeList *self, GdomeException *exc)
                   15987: {
                   15988:  if (self == NULL) {
                   15989:    *exc = GDOME_NULL_POINTER_ERR;
                   15990:    return 0L;
                   15991:  }
                   15992:  if (((Gdome_xml_Node *)((Gdome_xml_NodeList *)self)->root)->n == NULL) {
                   15993:    *exc = GDOME_INVALID_STATE_ERR;
                   15994:    return 0L;
                   15995:  }
                   15996:  *exc = 0;
                   15997:  return ((Gdome_xml_NodeList *)self)->vtab->length (self, exc);
                   15998: }
                   15999: /**
                   16000:  * gdome_nl_ref:
                   16001:  * @self:  NodeList Object ref
                   16002:  * @exc:  Exception Object ref
                   16003:  *
                   16004:  * Increase the reference count of the specified NodeList.
                   16005:  */
                   16006: void
                   16007: gdome_nl_ref (GdomeNodeList *self, GdomeException *exc)
                   16008: {
                   16009:  if (self == NULL) {
                   16010:    *exc = GDOME_NULL_POINTER_ERR;
                   16011:    return;
                   16012:  }
                   16013:  if (((Gdome_xml_Node *)((Gdome_xml_NodeList *)self)->root)->n == NULL) {
                   16014:    *exc = GDOME_INVALID_STATE_ERR;
                   16015:    return;
                   16016:  }
                   16017:  *exc = 0;
                   16018:  ((Gdome_xml_NodeList *)self)->vtab->ref (self, exc);
                   16019: }
                   16020: /**
                   16021:  * gdome_nl_unref:
                   16022:  * @self:  NodeList Object ref
                   16023:  * @exc:  Exception Object ref
                   16024:  *
                   16025:  * Decrease the reference count of the specified NodeList. Free the NodeList
                   16026:  * structure if the specified NodeList will have zero reference.
                   16027:  */
                   16028: void
                   16029: gdome_nl_unref (GdomeNodeList *self, GdomeException *exc)
                   16030: {
                   16031:  if (self == NULL) {
                   16032:    *exc = GDOME_NULL_POINTER_ERR;
                   16033:    return;
                   16034:  }
                   16035:  *exc = 0;
                   16036:  if (((Gdome_xml_Node *)((Gdome_xml_NodeList *)self)->root)->n == NULL) {
                   16037:    if (--((Gdome_xml_NodeList *)self)->refcnt == 0) {
                   16038:      gdome_n_unref (((Gdome_xml_NodeList *)self)->root, exc);
                   16039:      if(((Gdome_xml_NodeList *)self)->tagName != NULL)
                   16040:        gdome_str_unref(((Gdome_xml_NodeList *)self)->tagName);
                   16041:      if(((Gdome_xml_NodeList *)self)->tagURI != NULL)
                   16042:        gdome_str_unref(((Gdome_xml_NodeList *)self)->tagURI);
                   16043: #ifdef DEBUG_REFCNT
                   16044:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NODELIST);
                   16045: #endif
                   16046:      g_free (self);
                   16047:    }
                   16048:    return;
                   16049:  }
                   16050:  ((Gdome_xml_NodeList *)self)->vtab->unref (self, exc);
                   16051: }
                   16052: /**
                   16053:  * gdome_nl_query_interface:
                   16054:  * @self:  NodeList Object ref
                   16055:  * @interface:  interface needed
                   16056:  * @exc:  Exception Object ref
                   16057:  *
                   16058:  * Returns: a reference to this object that implements the @interface needed,
                   16059:  *          or %NULL if the @interface is not supported by this Object.
                   16060:  */
                   16061: gpointer
                   16062: gdome_nl_query_interface (GdomeNodeList *self, const char *interface, GdomeException *exc)
                   16063: {
                   16064:  if (self == NULL) {
                   16065:    *exc = GDOME_NULL_POINTER_ERR;
                   16066:    return NULL;
                   16067:  }
                   16068:  if (((Gdome_xml_Node *)((Gdome_xml_NodeList *)self)->root)->n == NULL) {
                   16069:    *exc = GDOME_INVALID_STATE_ERR;
                   16070:    return NULL;
                   16071:  }
                   16072:  *exc = 0;
                   16073:  return ((Gdome_xml_NodeList *)self)->vtab->query_interface (self, interface, exc);
                   16074: }
                   16075: /**
                   16076:  * gdome_nl_item:
                   16077:  * @self:  NodeList Object ref
                   16078:  * @index:  Index into the collection
                   16079:  * @exc:  Exception Object ref
                   16080:  *
                   16081:  * Returns: the indexth item in the collection. If @index is greater than or
                   16082:  * equal to the number of nodes in the list, this returns %NULL.
                   16083:  */
1.2     ! paf      16084: xmlNode *
1.1       paf      16085: gdome_nl_item (GdomeNodeList *self, gulong index, GdomeException *exc)
                   16086: {
                   16087:  if (self == NULL) {
                   16088:    *exc = GDOME_NULL_POINTER_ERR;
                   16089:    return NULL;
                   16090:  }
                   16091:  if (((Gdome_xml_Node *)((Gdome_xml_NodeList *)self)->root)->n == NULL) {
                   16092:    *exc = GDOME_INVALID_STATE_ERR;
                   16093:    return NULL;
                   16094:  }
                   16095:  *exc = 0;
                   16096:  return ((Gdome_xml_NodeList *)self)->vtab->item (self, index, exc);
                   16097: }
                   16098: 
                   16099: /******************************************************************************
                   16100:           GdomeNamedNodeMap interface API
                   16101:  ******************************************************************************/
                   16102: /**
                   16103:  * gdome_nnm_length:
                   16104:  * @self:  NamedNodeMap Objects ref
                   16105:  * @exc:  Exception Object ref
                   16106:  *
                   16107:  * Returns: the number of nodes in this map. The range of valid child node
                   16108:  * indices is 0 to length-1 inclusive.
                   16109:  */
                   16110: gulong
                   16111: gdome_nnm_length (GdomeNamedNodeMap *self, GdomeException *exc)
                   16112: {
                   16113:  if (self == NULL) {
                   16114:    *exc = GDOME_NULL_POINTER_ERR;
                   16115:    return 0L;
                   16116:  }
                   16117:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16118:    *exc = GDOME_INVALID_STATE_ERR;
                   16119:    return 0L;
                   16120:  }
                   16121:  *exc = 0;
                   16122:  return ((Gdome_xml_NamedNodeMap *)self)->vtab->length (self, exc);
                   16123: }
                   16124: /**
                   16125:  * gdome_nnm_ref:
                   16126:  * @self:  NodeList Object ref
                   16127:  * @exc:  Exception Object ref
                   16128:  *
                   16129:  * Increase the reference count of the specified NamedNodeMap.
                   16130:  */
                   16131: void
                   16132: gdome_nnm_ref (GdomeNamedNodeMap *self, GdomeException *exc)
                   16133: {
                   16134:  if (self == NULL) {
                   16135:    *exc = GDOME_NULL_POINTER_ERR;
                   16136:    return;
                   16137:  }
                   16138:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16139:    *exc = GDOME_INVALID_STATE_ERR;
                   16140:    return;
                   16141:  }
                   16142:  *exc = 0;
                   16143:  ((Gdome_xml_NamedNodeMap *)self)->vtab->ref (self, exc);
                   16144: }
                   16145: /**
                   16146:  * gdome_nnm_unref:
                   16147:  * @self:  NodeList Object ref
                   16148:  * @exc:  Exception Object ref
                   16149:  *
                   16150:  * Decrease the reference count of the specified NamedNodeMap. Free the
                   16151:  * NamedNodeMap structure if the specified NamedNodeMap will have zero
                   16152:  * reference.
                   16153:  */
                   16154: void
                   16155: gdome_nnm_unref (GdomeNamedNodeMap *self, GdomeException *exc)
                   16156: {
                   16157:  if (self == NULL) {
                   16158:    *exc = GDOME_NULL_POINTER_ERR;
                   16159:    return;
                   16160:  }
                   16161:  *exc = 0;
                   16162:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16163:    if (--((Gdome_xml_NamedNodeMap *)self)->refcnt == 0) {
                   16164:      gdome_doc_unref (((Gdome_xml_NamedNodeMap *)self)->doc, exc);
                   16165:      gdome_el_unref (((Gdome_xml_NamedNodeMap *)self)->elem, exc);
                   16166: 
                   16167: #ifdef DEBUG_REFCNT
                   16168:      gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_NAMEDNODEMAP);
                   16169: #endif
                   16170:      g_free (self);
                   16171:    }
                   16172:    return;
                   16173:  }
                   16174:  ((Gdome_xml_NamedNodeMap *)self)->vtab->unref (self, exc);
                   16175: }
                   16176: /**
                   16177:  * gdome_nnm_query_interface:
                   16178:  * @self:  NamedNodeMap Object ref
                   16179:  * @interface:  interface needed
                   16180:  * @exc:  Exception Object ref
                   16181:  *
                   16182:  * Returns: a reference to this object that implements the @interface needed,
                   16183:  *          or %NULL if the @interface is not supported by this Object.
                   16184:  */
                   16185: gpointer
                   16186: gdome_nnm_query_interface (GdomeNamedNodeMap *self, const char *interface, GdomeException *exc)
                   16187: {
                   16188:  if (self == NULL) {
                   16189:    *exc = GDOME_NULL_POINTER_ERR;
                   16190:    return NULL;
                   16191:  }
                   16192:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16193:    *exc = GDOME_INVALID_STATE_ERR;
                   16194:    return NULL;
                   16195:  }
                   16196:  *exc = 0;
                   16197:  return ((Gdome_xml_NamedNodeMap *)self)->vtab->query_interface (self, interface, exc);
                   16198: }
                   16199: /**
                   16200:  * gdome_nnm_getNamedItem:
                   16201:  * @self:  NamedNodeMap Objects ref
                   16202:  * @name:  The nodeName of the node to retrieve.
                   16203:  * @exc:  Exception Object ref
                   16204:  *
                   16205:  * Retrieves a node specified by name.
                   16206:  * Returns: a Node (of any type) with the specified nodeName, or %NULL if it
                   16207:  * does not identify any node in this map.
                   16208:  */
1.2     ! paf      16209: xmlNode *
1.1       paf      16210: gdome_nnm_getNamedItem (GdomeNamedNodeMap *self, GdomeDOMString *name, GdomeException *exc)
                   16211: {
                   16212:  if (self == NULL) {
                   16213:    *exc = GDOME_NULL_POINTER_ERR;
                   16214:    return NULL;
                   16215:  }
                   16216:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16217:    *exc = GDOME_INVALID_STATE_ERR;
                   16218:    return NULL;
                   16219:  }
                   16220:  *exc = 0;
                   16221:  return ((Gdome_xml_NamedNodeMap *)self)->vtab->getNamedItem (self, name, exc);
                   16222: }
                   16223: /**
                   16224:  * gdome_nnm_getNamedItemNS:
                   16225:  * @self:  NamedNodeMap Objects ref
                   16226:  * @namespaceURI:  The namespace URI of the node to retrieve.
                   16227:  * @localName:  The local name of the node to retrieve.
                   16228:  * @exc:  Exception Object ref
                   16229:  *
                   16230:  * Retrieves a node specified by local name and namespace URI.
                   16231:  * Returns: a Node (of any type) with the specified local name and namespace
                   16232:  * URI, or %NULL if they do not identify any node in this map.
                   16233:  */
1.2     ! paf      16234: xmlNode *
1.1       paf      16235: gdome_nnm_getNamedItemNS (GdomeNamedNodeMap *self, GdomeDOMString *namespaceURI, GdomeDOMString *localName, GdomeException *exc)
                   16236: {
                   16237:  if (self == NULL) {
                   16238:    *exc = GDOME_NULL_POINTER_ERR;
                   16239:    return NULL;
                   16240:  }
                   16241:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16242:    *exc = GDOME_INVALID_STATE_ERR;
                   16243:    return NULL;
                   16244:  }
                   16245:  *exc = 0;
                   16246:  return ((Gdome_xml_NamedNodeMap *)self)->vtab->getNamedItemNS (self, namespaceURI, localName, exc);
                   16247: }
                   16248: /**
                   16249:  * gdome_nnm_item:
                   16250:  * @self:  NamedNodeMap Objects ref
                   16251:  * @index:  Index into this map.
                   16252:  * @exc:  Exception Object ref
                   16253:  *
                   16254:  * Returns: the indexth item in the map. If index is greater than or equal to
                   16255:  * the number of nodes in this map, this returns %NULL.
                   16256:  */
1.2     ! paf      16257: xmlNode *
1.1       paf      16258: gdome_nnm_item (GdomeNamedNodeMap *self, gulong index, GdomeException *exc)
                   16259: {
                   16260:  if (self == NULL) {
                   16261:    *exc = GDOME_NULL_POINTER_ERR;
                   16262:    return NULL;
                   16263:  }
                   16264:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16265:    *exc = GDOME_INVALID_STATE_ERR;
                   16266:    return NULL;
                   16267:  }
                   16268:  *exc = 0;
                   16269:  return ((Gdome_xml_NamedNodeMap *)self)->vtab->item (self, index, exc);
                   16270: }
                   16271: /**
                   16272:  * gdome_nnm_removeNamedItem:
                   16273:  * @self:  NamedNodeMap Objects ref
                   16274:  * @name:  The nodeName of the node to remove.
                   16275:  * @exc:  Exception Object ref
                   16276:  *
                   16277:  * Removes a node specified by name. When this map contains the attributes
                   16278:  * attached to an element, if the removed attribute is known to have a default
                   16279:  * value, an attribute immediately appears containing the default value as
                   16280:  * well as the corresponding namespace URI, local name, and prefix when applicable.
                   16281:  *
                   16282:  * %GDOME_NOT_FOUND_ERR: Raised if there is no node named @name in this map.
                   16283:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
                   16284:  * Returns: the node removed from this map if a node with such a name exists.
                   16285:  */
1.2     ! paf      16286: xmlNode *
1.1       paf      16287: gdome_nnm_removeNamedItem (GdomeNamedNodeMap *self, GdomeDOMString *name, GdomeException *exc)
                   16288: {
                   16289:  if (self == NULL) {
                   16290:    *exc = GDOME_NULL_POINTER_ERR;
                   16291:    return NULL;
                   16292:  }
                   16293:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16294:    *exc = GDOME_INVALID_STATE_ERR;
                   16295:    return NULL;
                   16296:  }
                   16297:  *exc = 0;
                   16298:  return ((Gdome_xml_NamedNodeMap *)self)->vtab->removeNamedItem (self, name, exc);
                   16299: }
                   16300: /**
                   16301:  * gdome_nnm_removeNamedItemNS:
                   16302:  * @self:  NamedNodeMap Objects ref
                   16303:  * @namespaceURI:  The namespace URI of the node to remove.
                   16304:  * @localName:  The local name of the node to remove.
                   16305:  * @exc:  Exception Object ref
                   16306:  *
                   16307:  * Removes a node specified by local name and namespace URI. When this map
                   16308:  * contains the attributes attached to an element, if the removed attribute
                   16309:  * is known to have a default value, an attribute immediately appears
                   16310:  * containing the default value as well as the corresponding namespace URI,
                   16311:  * local name, and prefix when applicable.
                   16312:  *
                   16313:  * %GDOME_NOT_FOUND_ERR: Raised if there is no node named @name in this map.
                   16314:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
                   16315:  * Returns: the node removed from this map if a node with such a local name and
                   16316:  * namespace URI exists.
                   16317:  */
1.2     ! paf      16318: xmlNode *
1.1       paf      16319: gdome_nnm_removeNamedItemNS (GdomeNamedNodeMap *self, GdomeDOMString *namespaceURI, GdomeDOMString *localName, GdomeException *exc)
                   16320: {
                   16321:  if (self == NULL) {
                   16322:    *exc = GDOME_NULL_POINTER_ERR;
                   16323:    return NULL;
                   16324:  }
                   16325:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16326:    *exc = GDOME_INVALID_STATE_ERR;
                   16327:    return NULL;
                   16328:  }
                   16329:  *exc = 0;
                   16330:  return ((Gdome_xml_NamedNodeMap *)self)->vtab->removeNamedItemNS (self, namespaceURI, localName, exc);
                   16331: }
                   16332: /**
                   16333:  * gdome_nnm_setNamedItem:
                   16334:  * @self:  NamedNodeMap Objects ref
                   16335:  * @arg:  a node to store in this map.
                   16336:  * @exc:  Exception Object ref
                   16337:  *
                   16338:  * Adds a node using its nodeName attribute. If a node with that name is
                   16339:  * already present in this map, it is replaced by the new one.
                   16340:  *
                   16341:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @arg was created from a different
                   16342:  * document than the one that created this map.
                   16343:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
                   16344:  * %GDOME_INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an
                   16345:  * attribute of another Element object. The DOM user must explicitly clone
                   16346:  * Attr nodes to re-use them in other elements.
                   16347:  * Returns: if the new Node replaces an existing node, the replaced Node is
                   16348:  * returned, otherwise %NULL is returned.
                   16349:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
                   16350:  * doesn't belong in this NamedNodeMap. Examples would include trying to
                   16351:  * insert something other than an Attr node into an Element's map of
                   16352:  * attributes, or a non-Entity node into the DocumentType's map of Entities.
                   16353:  */
1.2     ! paf      16354: xmlNode *
        !          16355: gdome_nnm_setNamedItem (GdomeNamedNodeMap *self, xmlNode *arg, GdomeException *exc)
1.1       paf      16356: {
                   16357:  if (self == NULL) {
                   16358:    *exc = GDOME_NULL_POINTER_ERR;
                   16359:    return NULL;
                   16360:  }
                   16361:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16362:    *exc = GDOME_INVALID_STATE_ERR;
                   16363:    return NULL;
                   16364:  }
                   16365:  *exc = 0;
                   16366:  return ((Gdome_xml_NamedNodeMap *)self)->vtab->setNamedItem (self, arg, exc);
                   16367: }
                   16368: /**
                   16369:  * gdome_nnm_setNamedItemNS:
                   16370:  * @self:  NamedNodeMap Objects ref
                   16371:  * @arg:  a node to store in this map. The node will later be accessible
                   16372:  *        using the value of its namespaceURI and localName attributes.
                   16373:  * @exc:  Exception Object ref
                   16374:  *
                   16375:  * Adds a node using its namespaceURI and localName. If a node with that
                   16376:  * namespace URI and that local name is already present in this map, it is
                   16377:  * replaced by the new one
                   16378:  *
                   16379:  * %GDOME_WRONG_DOCUMENT_ERR: Raised if @arg was created from a different
                   16380:  * document than the one that created this map.
                   16381:  * %GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
                   16382:  * %GDOME_INUSE_ATTRIBUTE_ERR: Raised if @arg is an Attr that is already an
                   16383:  * attribute of another Element object. The DOM user must explicitly clone
                   16384:  * Attr nodes to re-use them in other elements.
                   16385:  * Returns: If the new Node replaces an existing node the replaced Node is
                   16386:  * returned, otherwise null is returned.
                   16387:  * %GDOME_HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
                   16388:  * doesn't belong in this NamedNodeMap. Examples would include trying to
                   16389:  * insert something other than an Attr node into an Element's map of
                   16390:  * attributes, or a non-Entity node into the DocumentType's map of Entities.
                   16391:  */
1.2     ! paf      16392: xmlNode *
        !          16393: gdome_nnm_setNamedItemNS (GdomeNamedNodeMap *self, xmlNode *arg, GdomeException *exc)
1.1       paf      16394: {
                   16395:  if (self == NULL) {
                   16396:    *exc = GDOME_NULL_POINTER_ERR;
                   16397:    return NULL;
                   16398:  }
                   16399:  if (((Gdome_xml_NamedNodeMap *)self)->type == GDOME_ATTRIBUTE_NODE && ((Gdome_xml_Node *)((Gdome_xml_NamedNodeMap *)self)->elem)->n == NULL) {
                   16400:    *exc = GDOME_INVALID_STATE_ERR;
                   16401:    return NULL;
                   16402:  }
                   16403:  *exc = 0;
                   16404:  return ((Gdome_xml_NamedNodeMap *)self)->vtab->setNamedItemNS (self, arg, exc);
                   16405: }

E-mail: