Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * This file is part of libdom.
  3.  * Licensed under the MIT License,
  4.  *                http://www.opensource.org/licenses/mit-license.php
  5.  * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
  6.  */
  7.  
  8. #ifndef dom_internal_core_nodelist_h_
  9. #define dom_internal_core_nodelist_h_
  10.  
  11. #include <stdbool.h>
  12.  
  13. #include <dom/core/nodelist.h>
  14.  
  15. struct dom_document;
  16. struct dom_node;
  17. struct dom_nodelist;
  18.  
  19. /**
  20.  * The NodeList type
  21.  */
  22. typedef enum {
  23.         DOM_NODELIST_CHILDREN,
  24.         DOM_NODELIST_BY_NAME,
  25.         DOM_NODELIST_BY_NAMESPACE,
  26.         DOM_NODELIST_BY_NAME_CASELESS,
  27.         DOM_NODELIST_BY_NAMESPACE_CASELESS
  28. } nodelist_type;
  29.  
  30. /* Create a nodelist */
  31. dom_exception _dom_nodelist_create(struct dom_document *doc, nodelist_type type,
  32.                 struct dom_node_internal *root, dom_string *tagname,
  33.                 dom_string *namespace, dom_string *localname,
  34.                 struct dom_nodelist **list);
  35.  
  36. /* Match a nodelist instance against a set of nodelist creation parameters */
  37. bool _dom_nodelist_match(struct dom_nodelist *list, nodelist_type type,
  38.                 struct dom_node_internal *root, dom_string *tagname,
  39.                 dom_string *namespace, dom_string *localname);
  40.  
  41. bool _dom_nodelist_equal(struct dom_nodelist *l1, struct dom_nodelist *l2);
  42. #define dom_nodelist_equal(l1, l2) _dom_nodelist_equal( \
  43.                 (struct dom_nodelist *) (l1), (struct dom_nodelist *) (l2))
  44.  
  45. #endif
  46.