/* CssSelectorParser.c generated by valac 0.44.3, the Vala compiler
 * generated from CssSelectorParser.vala, do not modify */

/* -*- Mode: vala; indent-tabs-mode: tab; c-basic-offset: 0; tab-width: 2 -*- */
/*
 *
 * Copyright (C) 2017-2019  Yannick Inizan <inizan.yannick@gmail.com>
 * Copyright (C) 2017  Daniel Espinosa <esodan@gmail.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *      Yannick Inizan <inizan.yannick@gmail.com>
 *      Daniel Espinosa <esodan@gmail.com>
 */

#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>

typedef enum  {
	GXML_CSS_COMBINER_NULL,
	GXML_CSS_COMBINER_NONE,
	GXML_CSS_COMBINER_INSIDE,
	GXML_CSS_COMBINER_AND,
	GXML_CSS_COMBINER_PARENT,
	GXML_CSS_COMBINER_AFTER,
	GXML_CSS_COMBINER_PRECEDED
} GXmlCssCombiner;

#define GXML_TYPE_CSS_COMBINER (gxml_css_combiner_get_type ())
typedef enum  {
	GXML_CSS_SELECTOR_TYPE_CLASS,
	GXML_CSS_SELECTOR_TYPE_ID,
	GXML_CSS_SELECTOR_TYPE_ALL,
	GXML_CSS_SELECTOR_TYPE_ELEMENT,
	GXML_CSS_SELECTOR_TYPE_ATTRIBUTE,
	GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_EQUAL,
	GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_CONTAINS,
	GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_SUBSTRING,
	GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_STARTS_WITH,
	GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_STARTS_WITH_WORD,
	GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_ENDS_WITH,
	GXML_CSS_SELECTOR_TYPE_PSEUDO_CLASS
} GXmlCssSelectorType;

#define GXML_TYPE_CSS_SELECTOR_TYPE (gxml_css_selector_type_get_type ())

#define GXML_TYPE_CSS_STRING (gxml_css_string_get_type ())
#define GXML_CSS_STRING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_CSS_STRING, GXmlCssString))
#define GXML_CSS_STRING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_CSS_STRING, GXmlCssStringClass))
#define GXML_IS_CSS_STRING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_CSS_STRING))
#define GXML_IS_CSS_STRING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_CSS_STRING))
#define GXML_CSS_STRING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_CSS_STRING, GXmlCssStringClass))

typedef struct _GXmlCssString GXmlCssString;
typedef struct _GXmlCssStringClass GXmlCssStringClass;
typedef struct _GXmlCssStringPrivate GXmlCssStringPrivate;
enum  {
	GXML_CSS_STRING_0_PROPERTY,
	GXML_CSS_STRING_EOF_PROPERTY,
	GXML_CSS_STRING_TEXT_PROPERTY,
	GXML_CSS_STRING_NUM_PROPERTIES
};
static GParamSpec* gxml_css_string_properties[GXML_CSS_STRING_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
typedef gboolean (*GXmlCssStringFunc) (GXmlCssString* str, gpointer user_data);

#define GXML_TYPE_CSS_SELECTOR (gxml_css_selector_get_type ())
#define GXML_CSS_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_CSS_SELECTOR, GXmlCssSelector))
#define GXML_CSS_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_CSS_SELECTOR, GXmlCssSelectorClass))
#define GXML_IS_CSS_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_CSS_SELECTOR))
#define GXML_IS_CSS_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_CSS_SELECTOR))
#define GXML_CSS_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_CSS_SELECTOR, GXmlCssSelectorClass))

typedef struct _GXmlCssSelector GXmlCssSelector;
typedef struct _GXmlCssSelectorClass GXmlCssSelectorClass;
typedef struct _GXmlCssSelectorPrivate GXmlCssSelectorPrivate;
enum  {
	GXML_CSS_SELECTOR_0_PROPERTY,
	GXML_CSS_SELECTOR_SELECTOR_TYPE_PROPERTY,
	GXML_CSS_SELECTOR_NAME_PROPERTY,
	GXML_CSS_SELECTOR_VALUE_PROPERTY,
	GXML_CSS_SELECTOR_COMBINER_PROPERTY,
	GXML_CSS_SELECTOR_NUM_PROPERTIES
};
static GParamSpec* gxml_css_selector_properties[GXML_CSS_SELECTOR_NUM_PROPERTIES];

#define GXML_TYPE_CSS_ELEMENT_SELECTOR (gxml_css_element_selector_get_type ())
#define GXML_CSS_ELEMENT_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_CSS_ELEMENT_SELECTOR, GXmlCssElementSelector))
#define GXML_CSS_ELEMENT_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_CSS_ELEMENT_SELECTOR, GXmlCssElementSelectorClass))
#define GXML_IS_CSS_ELEMENT_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_CSS_ELEMENT_SELECTOR))
#define GXML_IS_CSS_ELEMENT_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_CSS_ELEMENT_SELECTOR))
#define GXML_CSS_ELEMENT_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_CSS_ELEMENT_SELECTOR, GXmlCssElementSelectorClass))

typedef struct _GXmlCssElementSelector GXmlCssElementSelector;
typedef struct _GXmlCssElementSelectorClass GXmlCssElementSelectorClass;
typedef struct _GXmlCssElementSelectorPrivate GXmlCssElementSelectorPrivate;
enum  {
	GXML_CSS_ELEMENT_SELECTOR_0_PROPERTY,
	GXML_CSS_ELEMENT_SELECTOR_PREFIXED_PROPERTY,
	GXML_CSS_ELEMENT_SELECTOR_PREFIX_PROPERTY,
	GXML_CSS_ELEMENT_SELECTOR_LOCAL_NAME_PROPERTY,
	GXML_CSS_ELEMENT_SELECTOR_NUM_PROPERTIES
};
static GParamSpec* gxml_css_element_selector_properties[GXML_CSS_ELEMENT_SELECTOR_NUM_PROPERTIES];

#define GXML_TYPE_CSS_ATTRIBUTE_SELECTOR (gxml_css_attribute_selector_get_type ())
#define GXML_CSS_ATTRIBUTE_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_CSS_ATTRIBUTE_SELECTOR, GXmlCssAttributeSelector))
#define GXML_CSS_ATTRIBUTE_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_CSS_ATTRIBUTE_SELECTOR, GXmlCssAttributeSelectorClass))
#define GXML_IS_CSS_ATTRIBUTE_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_CSS_ATTRIBUTE_SELECTOR))
#define GXML_IS_CSS_ATTRIBUTE_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_CSS_ATTRIBUTE_SELECTOR))
#define GXML_CSS_ATTRIBUTE_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_CSS_ATTRIBUTE_SELECTOR, GXmlCssAttributeSelectorClass))

typedef struct _GXmlCssAttributeSelector GXmlCssAttributeSelector;
typedef struct _GXmlCssAttributeSelectorClass GXmlCssAttributeSelectorClass;
typedef struct _GXmlCssAttributeSelectorPrivate GXmlCssAttributeSelectorPrivate;
enum  {
	GXML_CSS_ATTRIBUTE_SELECTOR_0_PROPERTY,
	GXML_CSS_ATTRIBUTE_SELECTOR_PREFIX_PROPERTY,
	GXML_CSS_ATTRIBUTE_SELECTOR_LOCAL_NAME_PROPERTY,
	GXML_CSS_ATTRIBUTE_SELECTOR_NUM_PROPERTIES
};
static GParamSpec* gxml_css_attribute_selector_properties[GXML_CSS_ATTRIBUTE_SELECTOR_NUM_PROPERTIES];

#define GXML_TYPE_CSS_NOT_SELECTOR (gxml_css_not_selector_get_type ())
#define GXML_CSS_NOT_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_CSS_NOT_SELECTOR, GXmlCssNotSelector))
#define GXML_CSS_NOT_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_CSS_NOT_SELECTOR, GXmlCssNotSelectorClass))
#define GXML_IS_CSS_NOT_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_CSS_NOT_SELECTOR))
#define GXML_IS_CSS_NOT_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_CSS_NOT_SELECTOR))
#define GXML_CSS_NOT_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_CSS_NOT_SELECTOR, GXmlCssNotSelectorClass))

typedef struct _GXmlCssNotSelector GXmlCssNotSelector;
typedef struct _GXmlCssNotSelectorClass GXmlCssNotSelectorClass;
typedef struct _GXmlCssNotSelectorPrivate GXmlCssNotSelectorPrivate;
enum  {
	GXML_CSS_NOT_SELECTOR_0_PROPERTY,
	GXML_CSS_NOT_SELECTOR_SELECTORS_PROPERTY,
	GXML_CSS_NOT_SELECTOR_NUM_PROPERTIES
};
static GParamSpec* gxml_css_not_selector_properties[GXML_CSS_NOT_SELECTOR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GXML_TYPE_CSS_SELECTOR_PARSER (gxml_css_selector_parser_get_type ())
#define GXML_CSS_SELECTOR_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_CSS_SELECTOR_PARSER, GXmlCssSelectorParser))
#define GXML_CSS_SELECTOR_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_CSS_SELECTOR_PARSER, GXmlCssSelectorParserClass))
#define GXML_IS_CSS_SELECTOR_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_CSS_SELECTOR_PARSER))
#define GXML_IS_CSS_SELECTOR_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_CSS_SELECTOR_PARSER))
#define GXML_CSS_SELECTOR_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_CSS_SELECTOR_PARSER, GXmlCssSelectorParserClass))

typedef struct _GXmlCssSelectorParser GXmlCssSelectorParser;
typedef struct _GXmlCssSelectorParserClass GXmlCssSelectorParserClass;
typedef struct _GXmlCssSelectorParserPrivate GXmlCssSelectorParserPrivate;
enum  {
	GXML_CSS_SELECTOR_PARSER_0_PROPERTY,
	GXML_CSS_SELECTOR_PARSER_SELECTORS_PROPERTY,
	GXML_CSS_SELECTOR_PARSER_NUM_PROPERTIES
};
static GParamSpec* gxml_css_selector_parser_properties[GXML_CSS_SELECTOR_PARSER_NUM_PROPERTIES];
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
typedef struct _Block1Data Block1Data;

#define GXML_TYPE_DOM_ELEMENT (gxml_dom_element_get_type ())
#define GXML_DOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_ELEMENT, GXmlDomElement))
#define GXML_IS_DOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_ELEMENT))
#define GXML_DOM_ELEMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_ELEMENT, GXmlDomElementIface))

typedef struct _GXmlDomElement GXmlDomElement;
typedef struct _GXmlDomElementIface GXmlDomElementIface;

#define GXML_TYPE_DOM_NODE (gxml_dom_node_get_type ())
#define GXML_DOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NODE, GXmlDomNode))
#define GXML_IS_DOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NODE))
#define GXML_DOM_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NODE, GXmlDomNodeIface))

typedef struct _GXmlDomNode GXmlDomNode;
typedef struct _GXmlDomNodeIface GXmlDomNodeIface;

#define GXML_TYPE_DOM_EVENT_TARGET (gxml_dom_event_target_get_type ())
#define GXML_DOM_EVENT_TARGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_EVENT_TARGET, GXmlDomEventTarget))
#define GXML_IS_DOM_EVENT_TARGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_EVENT_TARGET))
#define GXML_DOM_EVENT_TARGET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_EVENT_TARGET, GXmlDomEventTargetIface))

typedef struct _GXmlDomEventTarget GXmlDomEventTarget;
typedef struct _GXmlDomEventTargetIface GXmlDomEventTargetIface;

#define GXML_TYPE_DOM_EVENT_LISTENER (gxml_dom_event_listener_get_type ())
#define GXML_DOM_EVENT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_EVENT_LISTENER, GXmlDomEventListener))
#define GXML_IS_DOM_EVENT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_EVENT_LISTENER))
#define GXML_DOM_EVENT_LISTENER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_EVENT_LISTENER, GXmlDomEventListenerIface))

typedef struct _GXmlDomEventListener GXmlDomEventListener;
typedef struct _GXmlDomEventListenerIface GXmlDomEventListenerIface;

#define GXML_TYPE_DOM_EVENT (gxml_dom_event_get_type ())
#define GXML_DOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_EVENT, GXmlDomEvent))
#define GXML_IS_DOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_EVENT))
#define GXML_DOM_EVENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_EVENT, GXmlDomEventIface))

typedef struct _GXmlDomEvent GXmlDomEvent;
typedef struct _GXmlDomEventIface GXmlDomEventIface;

#define GXML_TYPE_DOM_TIME_STAMP (gxml_dom_time_stamp_get_type ())
#define GXML_DOM_TIME_STAMP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStamp))
#define GXML_DOM_TIME_STAMP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStampClass))
#define GXML_IS_DOM_TIME_STAMP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_TIME_STAMP))
#define GXML_IS_DOM_TIME_STAMP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_DOM_TIME_STAMP))
#define GXML_DOM_TIME_STAMP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStampClass))

typedef struct _GXmlDomTimeStamp GXmlDomTimeStamp;
typedef struct _GXmlDomTimeStampClass GXmlDomTimeStampClass;
typedef enum  {
	GXML_DOM_EVENT_PHASE_NONE = 0,
	GXML_DOM_EVENT_PHASE_CAPTURING_PHASE,
	GXML_DOM_EVENT_PHASE_AT_TARGET,
	GXML_DOM_EVENT_PHASE_BUBBLING_PHASE
} GXmlDomEventPhase;

#define GXML_DOM_EVENT_TYPE_PHASE (gxml_dom_event_phase_get_type ())
typedef enum  {
	GXML_DOM_NODE_DOCUMENT_POSITION_NONE = 1 << 0,
	GXML_DOM_NODE_DOCUMENT_POSITION_DISCONNECTED = 1 << 1,
	GXML_DOM_NODE_DOCUMENT_POSITION_PRECEDING = 1 << 2,
	GXML_DOM_NODE_DOCUMENT_POSITION_FOLLOWING = 1 << 3,
	GXML_DOM_NODE_DOCUMENT_POSITION_CONTAINS = 1 << 4,
	GXML_DOM_NODE_DOCUMENT_POSITION_CONTAINED_BY = 1 << 5,
	GXML_DOM_NODE_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 1 << 6
} GXmlDomNodeDocumentPosition;

#define GXML_DOM_NODE_TYPE_DOCUMENT_POSITION (gxml_dom_node_document_position_get_type ())
typedef enum  {
	GXML_DOM_NODE_NODE_TYPE_INVALID = 0,
	GXML_DOM_NODE_NODE_TYPE_ELEMENT_NODE = 1,
	GXML_DOM_NODE_NODE_TYPE_ATTRIBUTE_NODE,
	GXML_DOM_NODE_NODE_TYPE_TEXT_NODE,
	GXML_DOM_NODE_NODE_TYPE_CDATA_SECTION_NODE,
	GXML_DOM_NODE_NODE_TYPE_ENTITY_REFERENCE_NODE,
	GXML_DOM_NODE_NODE_TYPE_ENTITY_NODE,
	GXML_DOM_NODE_NODE_TYPE_PROCESSING_INSTRUCTION_NODE,
	GXML_DOM_NODE_NODE_TYPE_COMMENT_NODE,
	GXML_DOM_NODE_NODE_TYPE_DOCUMENT_NODE,
	GXML_DOM_NODE_NODE_TYPE_DOCUMENT_TYPE_NODE,
	GXML_DOM_NODE_NODE_TYPE_DOCUMENT_FRAGMENT_NODE,
	GXML_DOM_NODE_NODE_TYPE_NOTATION_NODE
} GXmlDomNodeNodeType;

#define GXML_DOM_NODE_TYPE_NODE_TYPE (gxml_dom_node_node_type_get_type ())

#define GXML_TYPE_DOM_DOCUMENT (gxml_dom_document_get_type ())
#define GXML_DOM_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_DOCUMENT, GXmlDomDocument))
#define GXML_IS_DOM_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_DOCUMENT))
#define GXML_DOM_DOCUMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_DOCUMENT, GXmlDomDocumentIface))

typedef struct _GXmlDomDocument GXmlDomDocument;
typedef struct _GXmlDomDocumentIface GXmlDomDocumentIface;

#define GXML_TYPE_DOM_PARENT_NODE (gxml_dom_parent_node_get_type ())
#define GXML_DOM_PARENT_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_PARENT_NODE, GXmlDomParentNode))
#define GXML_IS_DOM_PARENT_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_PARENT_NODE))
#define GXML_DOM_PARENT_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_PARENT_NODE, GXmlDomParentNodeIface))

typedef struct _GXmlDomParentNode GXmlDomParentNode;
typedef struct _GXmlDomParentNodeIface GXmlDomParentNodeIface;

#define GXML_TYPE_DOM_NODE_LIST (gxml_dom_node_list_get_type ())
#define GXML_DOM_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NODE_LIST, GXmlDomNodeList))
#define GXML_IS_DOM_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NODE_LIST))
#define GXML_DOM_NODE_LIST_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NODE_LIST, GXmlDomNodeListIface))

typedef struct _GXmlDomNodeList GXmlDomNodeList;
typedef struct _GXmlDomNodeListIface GXmlDomNodeListIface;

#define GXML_TYPE_DOM_ELEMENT_LIST (gxml_dom_element_list_get_type ())
#define GXML_DOM_ELEMENT_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_ELEMENT_LIST, GXmlDomElementList))
#define GXML_DOM_ELEMENT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_DOM_ELEMENT_LIST, GXmlDomElementListClass))
#define GXML_IS_DOM_ELEMENT_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_ELEMENT_LIST))
#define GXML_IS_DOM_ELEMENT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_DOM_ELEMENT_LIST))
#define GXML_DOM_ELEMENT_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_DOM_ELEMENT_LIST, GXmlDomElementListClass))

typedef struct _GXmlDomElementList GXmlDomElementList;
typedef struct _GXmlDomElementListClass GXmlDomElementListClass;

#define GXML_TYPE_DOM_HTML_COLLECTION (gxml_dom_html_collection_get_type ())
#define GXML_DOM_HTML_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_HTML_COLLECTION, GXmlDomHTMLCollection))
#define GXML_IS_DOM_HTML_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_HTML_COLLECTION))
#define GXML_DOM_HTML_COLLECTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_HTML_COLLECTION, GXmlDomHTMLCollectionIface))

typedef struct _GXmlDomHTMLCollection GXmlDomHTMLCollection;
typedef struct _GXmlDomHTMLCollectionIface GXmlDomHTMLCollectionIface;

#define GXML_TYPE_DOM_NON_ELEMENT_PARENT_NODE (gxml_dom_non_element_parent_node_get_type ())
#define GXML_DOM_NON_ELEMENT_PARENT_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NON_ELEMENT_PARENT_NODE, GXmlDomNonElementParentNode))
#define GXML_IS_DOM_NON_ELEMENT_PARENT_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NON_ELEMENT_PARENT_NODE))
#define GXML_DOM_NON_ELEMENT_PARENT_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NON_ELEMENT_PARENT_NODE, GXmlDomNonElementParentNodeIface))

typedef struct _GXmlDomNonElementParentNode GXmlDomNonElementParentNode;
typedef struct _GXmlDomNonElementParentNodeIface GXmlDomNonElementParentNodeIface;

#define GXML_TYPE_DOM_DOCUMENT_FRAGMENT (gxml_dom_document_fragment_get_type ())
#define GXML_DOM_DOCUMENT_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_DOCUMENT_FRAGMENT, GXmlDomDocumentFragment))
#define GXML_IS_DOM_DOCUMENT_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_DOCUMENT_FRAGMENT))
#define GXML_DOM_DOCUMENT_FRAGMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_DOCUMENT_FRAGMENT, GXmlDomDocumentFragmentIface))

typedef struct _GXmlDomDocumentFragment GXmlDomDocumentFragment;
typedef struct _GXmlDomDocumentFragmentIface GXmlDomDocumentFragmentIface;

#define GXML_TYPE_DOM_TEXT (gxml_dom_text_get_type ())
#define GXML_DOM_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_TEXT, GXmlDomText))
#define GXML_IS_DOM_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_TEXT))
#define GXML_DOM_TEXT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_TEXT, GXmlDomTextIface))

typedef struct _GXmlDomText GXmlDomText;
typedef struct _GXmlDomTextIface GXmlDomTextIface;

#define GXML_TYPE_DOM_CHARACTER_DATA (gxml_dom_character_data_get_type ())
#define GXML_DOM_CHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_CHARACTER_DATA, GXmlDomCharacterData))
#define GXML_IS_DOM_CHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_CHARACTER_DATA))
#define GXML_DOM_CHARACTER_DATA_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_CHARACTER_DATA, GXmlDomCharacterDataIface))

typedef struct _GXmlDomCharacterData GXmlDomCharacterData;
typedef struct _GXmlDomCharacterDataIface GXmlDomCharacterDataIface;

#define GXML_TYPE_DOM_NON_DOCUMENT_TYPE_CHILD_NODE (gxml_dom_non_document_type_child_node_get_type ())
#define GXML_DOM_NON_DOCUMENT_TYPE_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NON_DOCUMENT_TYPE_CHILD_NODE, GXmlDomNonDocumentTypeChildNode))
#define GXML_IS_DOM_NON_DOCUMENT_TYPE_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NON_DOCUMENT_TYPE_CHILD_NODE))
#define GXML_DOM_NON_DOCUMENT_TYPE_CHILD_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NON_DOCUMENT_TYPE_CHILD_NODE, GXmlDomNonDocumentTypeChildNodeIface))

typedef struct _GXmlDomNonDocumentTypeChildNode GXmlDomNonDocumentTypeChildNode;
typedef struct _GXmlDomNonDocumentTypeChildNodeIface GXmlDomNonDocumentTypeChildNodeIface;

#define GXML_TYPE_DOM_CHILD_NODE (gxml_dom_child_node_get_type ())
#define GXML_DOM_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_CHILD_NODE, GXmlDomChildNode))
#define GXML_IS_DOM_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_CHILD_NODE))
#define GXML_DOM_CHILD_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_CHILD_NODE, GXmlDomChildNodeIface))

typedef struct _GXmlDomChildNode GXmlDomChildNode;
typedef struct _GXmlDomChildNodeIface GXmlDomChildNodeIface;

#define GXML_TYPE_DOM_COMMENT (gxml_dom_comment_get_type ())
#define GXML_DOM_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_COMMENT, GXmlDomComment))
#define GXML_IS_DOM_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_COMMENT))
#define GXML_DOM_COMMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_COMMENT, GXmlDomCommentIface))

typedef struct _GXmlDomComment GXmlDomComment;
typedef struct _GXmlDomCommentIface GXmlDomCommentIface;

#define GXML_TYPE_DOM_PROCESSING_INSTRUCTION (gxml_dom_processing_instruction_get_type ())
#define GXML_DOM_PROCESSING_INSTRUCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_PROCESSING_INSTRUCTION, GXmlDomProcessingInstruction))
#define GXML_IS_DOM_PROCESSING_INSTRUCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_PROCESSING_INSTRUCTION))
#define GXML_DOM_PROCESSING_INSTRUCTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_PROCESSING_INSTRUCTION, GXmlDomProcessingInstructionIface))

typedef struct _GXmlDomProcessingInstruction GXmlDomProcessingInstruction;
typedef struct _GXmlDomProcessingInstructionIface GXmlDomProcessingInstructionIface;

#define GXML_TYPE_DOM_RANGE (gxml_dom_range_get_type ())
#define GXML_DOM_RANGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_RANGE, GXmlDomRange))
#define GXML_IS_DOM_RANGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_RANGE))
#define GXML_DOM_RANGE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_RANGE, GXmlDomRangeIface))

typedef struct _GXmlDomRange GXmlDomRange;
typedef struct _GXmlDomRangeIface GXmlDomRangeIface;
typedef enum  {
	GXML_DOM_RANGE_BOUNDARY_POINTS_START_TO_START = 0,
	GXML_DOM_RANGE_BOUNDARY_POINTS_START_TO_END,
	GXML_DOM_RANGE_BOUNDARY_POINTS_END_TO_END,
	GXML_DOM_RANGE_BOUNDARY_POINTS_END_TO_START
} GXmlDomRangeBoundaryPoints;

#define GXML_DOM_RANGE_TYPE_BOUNDARY_POINTS (gxml_dom_range_boundary_points_get_type ())

#define GXML_TYPE_DOM_NODE_FILTER (gxml_dom_node_filter_get_type ())
#define GXML_DOM_NODE_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NODE_FILTER, GXmlDomNodeFilter))
#define GXML_DOM_NODE_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_DOM_NODE_FILTER, GXmlDomNodeFilterClass))
#define GXML_IS_DOM_NODE_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NODE_FILTER))
#define GXML_IS_DOM_NODE_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_DOM_NODE_FILTER))
#define GXML_DOM_NODE_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_DOM_NODE_FILTER, GXmlDomNodeFilterClass))

typedef struct _GXmlDomNodeFilter GXmlDomNodeFilter;
typedef struct _GXmlDomNodeFilterClass GXmlDomNodeFilterClass;

#define GXML_TYPE_DOM_NODE_ITERATOR (gxml_dom_node_iterator_get_type ())
#define GXML_DOM_NODE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NODE_ITERATOR, GXmlDomNodeIterator))
#define GXML_IS_DOM_NODE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NODE_ITERATOR))
#define GXML_DOM_NODE_ITERATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NODE_ITERATOR, GXmlDomNodeIteratorIface))

typedef struct _GXmlDomNodeIterator GXmlDomNodeIterator;
typedef struct _GXmlDomNodeIteratorIface GXmlDomNodeIteratorIface;

#define GXML_TYPE_DOM_TREE_WALKER (gxml_dom_tree_walker_get_type ())
#define GXML_DOM_TREE_WALKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_TREE_WALKER, GXmlDomTreeWalker))
#define GXML_IS_DOM_TREE_WALKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_TREE_WALKER))
#define GXML_DOM_TREE_WALKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_TREE_WALKER, GXmlDomTreeWalkerIface))

typedef struct _GXmlDomTreeWalker GXmlDomTreeWalker;
typedef struct _GXmlDomTreeWalkerIface GXmlDomTreeWalkerIface;

#define GXML_TYPE_PARSER (gxml_parser_get_type ())
#define GXML_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_PARSER, GXmlParser))
#define GXML_IS_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_PARSER))
#define GXML_PARSER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_PARSER, GXmlParserIface))

typedef struct _GXmlParser GXmlParser;
typedef struct _GXmlParserIface GXmlParserIface;

#define GXML_TYPE_DOM_IMPLEMENTATION (gxml_dom_implementation_get_type ())
#define GXML_DOM_IMPLEMENTATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_IMPLEMENTATION, GXmlDomImplementation))
#define GXML_IS_DOM_IMPLEMENTATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_IMPLEMENTATION))
#define GXML_DOM_IMPLEMENTATION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_IMPLEMENTATION, GXmlDomImplementationIface))

typedef struct _GXmlDomImplementation GXmlDomImplementation;
typedef struct _GXmlDomImplementationIface GXmlDomImplementationIface;

#define GXML_TYPE_DOM_DOCUMENT_TYPE (gxml_dom_document_type_get_type ())
#define GXML_DOM_DOCUMENT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_DOCUMENT_TYPE, GXmlDomDocumentType))
#define GXML_IS_DOM_DOCUMENT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_DOCUMENT_TYPE))
#define GXML_DOM_DOCUMENT_TYPE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_DOCUMENT_TYPE, GXmlDomDocumentTypeIface))

typedef struct _GXmlDomDocumentType GXmlDomDocumentType;
typedef struct _GXmlDomDocumentTypeIface GXmlDomDocumentTypeIface;

#define GXML_TYPE_DOM_XML_DOCUMENT (gxml_dom_xml_document_get_type ())
#define GXML_DOM_XML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_XML_DOCUMENT, GXmlDomXMLDocument))
#define GXML_IS_DOM_XML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_XML_DOCUMENT))
#define GXML_DOM_XML_DOCUMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_XML_DOCUMENT, GXmlDomXMLDocumentIface))

typedef struct _GXmlDomXMLDocument GXmlDomXMLDocument;
typedef struct _GXmlDomXMLDocumentIface GXmlDomXMLDocumentIface;

#define GXML_TYPE_DOCUMENT (gxml_document_get_type ())
#define GXML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOCUMENT, GXmlDocument))
#define GXML_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOCUMENT))
#define GXML_DOCUMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOCUMENT, GXmlDocumentIface))

typedef struct _GXmlDocument GXmlDocument;
typedef struct _GXmlDocumentIface GXmlDocumentIface;

#define GXML_TYPE_NODE (gxml_node_get_type ())
#define GXML_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NODE, GXmlNode))
#define GXML_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NODE))
#define GXML_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_NODE, GXmlNodeIface))

typedef struct _GXmlNode GXmlNode;
typedef struct _GXmlNodeIface GXmlNodeIface;

#define GXML_TYPE_ELEMENT_LIST (gxml_element_list_get_type ())
#define GXML_ELEMENT_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_ELEMENT_LIST, GXmlElementList))
#define GXML_ELEMENT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_ELEMENT_LIST, GXmlElementListClass))
#define GXML_IS_ELEMENT_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_ELEMENT_LIST))
#define GXML_IS_ELEMENT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_ELEMENT_LIST))
#define GXML_ELEMENT_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_ELEMENT_LIST, GXmlElementListClass))

typedef struct _GXmlElementList GXmlElementList;
typedef struct _GXmlElementListClass GXmlElementListClass;

#define GXML_TYPE_NAMESPACE (gxml_namespace_get_type ())
#define GXML_NAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NAMESPACE, GXmlNamespace))
#define GXML_IS_NAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NAMESPACE))
#define GXML_NAMESPACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_NAMESPACE, GXmlNamespaceIface))

typedef struct _GXmlNamespace GXmlNamespace;
typedef struct _GXmlNamespaceIface GXmlNamespaceIface;
typedef enum  {
	GXML_NODE_TYPE_INVALID = 0,
	GXML_NODE_TYPE_ELEMENT = 1,
	GXML_NODE_TYPE_ATTRIBUTE,
	GXML_NODE_TYPE_TEXT,
	GXML_NODE_TYPE_CDATA_SECTION,
	GXML_NODE_TYPE_ENTITY_REFERENCE,
	GXML_NODE_TYPE_ENTITY,
	GXML_NODE_TYPE_PROCESSING_INSTRUCTION,
	GXML_NODE_TYPE_COMMENT,
	GXML_NODE_TYPE_DOCUMENT,
	GXML_NODE_TYPE_DOCUMENT_TYPE,
	GXML_NODE_TYPE_DOCUMENT_FRAGMENT,
	GXML_NODE_TYPE_NOTATION
} GXmlNodeType;

#define GXML_TYPE_NODE_TYPE (gxml_node_type_get_type ())

#define GXML_TYPE_DOM_TOKEN_LIST (gxml_dom_token_list_get_type ())
#define GXML_DOM_TOKEN_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_TOKEN_LIST, GXmlDomTokenList))
#define GXML_IS_DOM_TOKEN_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_TOKEN_LIST))
#define GXML_DOM_TOKEN_LIST_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_TOKEN_LIST, GXmlDomTokenListIface))

typedef struct _GXmlDomTokenList GXmlDomTokenList;
typedef struct _GXmlDomTokenListIface GXmlDomTokenListIface;

#define GXML_TYPE_DOM_NAMED_NODE_MAP (gxml_dom_named_node_map_get_type ())
#define GXML_DOM_NAMED_NODE_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NAMED_NODE_MAP, GXmlDomNamedNodeMap))
#define GXML_IS_DOM_NAMED_NODE_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NAMED_NODE_MAP))
#define GXML_DOM_NAMED_NODE_MAP_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NAMED_NODE_MAP, GXmlDomNamedNodeMapIface))

typedef struct _GXmlDomNamedNodeMap GXmlDomNamedNodeMap;
typedef struct _GXmlDomNamedNodeMapIface GXmlDomNamedNodeMapIface;

#define GXML_TYPE_GOM_NODE_LIST (gxml_gom_node_list_get_type ())
#define GXML_GOM_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_NODE_LIST, GXmlGomNodeList))
#define GXML_GOM_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_NODE_LIST, GXmlGomNodeListClass))
#define GXML_IS_GOM_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_NODE_LIST))
#define GXML_IS_GOM_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_NODE_LIST))
#define GXML_GOM_NODE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_NODE_LIST, GXmlGomNodeListClass))

typedef struct _GXmlGomNodeList GXmlGomNodeList;
typedef struct _GXmlGomNodeListClass GXmlGomNodeListClass;

typedef enum  {
	GXML_CSS_SELECTOR_ERROR_NULL,
	GXML_CSS_SELECTOR_ERROR_EOF,
	GXML_CSS_SELECTOR_ERROR_NOT,
	GXML_CSS_SELECTOR_ERROR_PSEUDO,
	GXML_CSS_SELECTOR_ERROR_ATTRIBUTE,
	GXML_CSS_SELECTOR_ERROR_IDENTIFIER,
	GXML_CSS_SELECTOR_ERROR_COMBINER
} GXmlCssSelectorError;
#define GXML_CSS_SELECTOR_ERROR gxml_css_selector_error_quark ()
struct _GXmlCssString {
	GObject parent_instance;
	GXmlCssStringPrivate * priv;
};

struct _GXmlCssStringClass {
	GObjectClass parent_class;
};

struct _GXmlCssStringPrivate {
	gint position;
	gchar* _text;
};

struct _GXmlCssSelector {
	GObject parent_instance;
	GXmlCssSelectorPrivate * priv;
};

struct _GXmlCssSelectorClass {
	GObjectClass parent_class;
};

struct _GXmlCssSelectorPrivate {
	GXmlCssSelectorType _selector_type;
	gchar* _name;
	gchar* _value;
	GXmlCssCombiner _combiner;
};

struct _GXmlCssElementSelector {
	GXmlCssSelector parent_instance;
	GXmlCssElementSelectorPrivate * priv;
};

struct _GXmlCssElementSelectorClass {
	GXmlCssSelectorClass parent_class;
};

struct _GXmlCssAttributeSelector {
	GXmlCssSelector parent_instance;
	GXmlCssAttributeSelectorPrivate * priv;
};

struct _GXmlCssAttributeSelectorClass {
	GXmlCssSelectorClass parent_class;
};

struct _GXmlCssAttributeSelectorPrivate {
	gchar* _prefix;
	gchar* _local_name;
};

struct _GXmlCssNotSelector {
	GXmlCssSelector parent_instance;
	GXmlCssNotSelectorPrivate * priv;
};

struct _GXmlCssNotSelectorClass {
	GXmlCssSelectorClass parent_class;
};

struct _GXmlCssNotSelectorPrivate {
	GeeArrayList* list;
};

struct _GXmlCssSelectorParser {
	GObject parent_instance;
	GXmlCssSelectorParserPrivate * priv;
};

struct _GXmlCssSelectorParserClass {
	GObjectClass parent_class;
};

struct _GXmlCssSelectorParserPrivate {
	GeeArrayList* list;
};

struct _Block1Data {
	int _ref_count_;
	gunichar quote;
};

struct _GXmlDomEventIface {
	GTypeInterface parent_iface;
	void (*stop_propagation) (GXmlDomEvent* self);
	void (*stop_immediate_propagation) (GXmlDomEvent* self);
	void (*prevent_default) (GXmlDomEvent* self);
	void (*init_event) (GXmlDomEvent* self, const gchar* type, gboolean bubbles, gboolean cancelable);
	const gchar* (*get_etype) (GXmlDomEvent* self);
	GXmlDomEventTarget* (*get_event_target) (GXmlDomEvent* self);
	GXmlDomEventTarget* (*get_current_target) (GXmlDomEvent* self);
	gboolean (*get_bubbles) (GXmlDomEvent* self);
	gboolean (*get_cancelable) (GXmlDomEvent* self);
	gboolean (*get_is_trusted) (GXmlDomEvent* self);
	GXmlDomTimeStamp* (*get_time_stamp) (GXmlDomEvent* self);
	gboolean (*get_default_prevented) (GXmlDomEvent* self);
	GXmlDomEventPhase (*get_event_phase) (GXmlDomEvent* self);
};

struct _GXmlDomEventListenerIface {
	GTypeInterface parent_iface;
	void (*handle_event) (GXmlDomEventListener* self, GXmlDomEvent* event);
};

struct _GXmlDomEventTargetIface {
	GTypeInterface parent_iface;
	void (*add_event_listener) (GXmlDomEventTarget* self, const gchar* type, GXmlDomEventListener* callback, gboolean capture);
	void (*remove_event_listener) (GXmlDomEventTarget* self, const gchar* type, GXmlDomEventListener* callback, gboolean capture);
	gboolean (*dispatch_event) (GXmlDomEventTarget* self, GXmlDomEvent* event, GError** error);
};

struct _GXmlDomNodeListIface {
	GTypeInterface parent_iface;
	GXmlDomNode* (*item) (GXmlDomNodeList* self, gint index);
	gint (*get_length) (GXmlDomNodeList* self);
};

struct _GXmlDomHTMLCollectionIface {
	GTypeInterface parent_iface;
	GXmlDomElement* (*get_element) (GXmlDomHTMLCollection* self, gint index);
	GXmlDomElement** (*to_array) (GXmlDomHTMLCollection* self, gint* result_length1);
	GXmlDomElement* (*item) (GXmlDomHTMLCollection* self, gint index);
	GXmlDomElement* (*named_item) (GXmlDomHTMLCollection* self, const gchar* name);
	gint (*get_length) (GXmlDomHTMLCollection* self);
};

struct _GXmlDomParentNodeIface {
	GTypeInterface parent_iface;
	GXmlDomElement* (*query_selector) (GXmlDomParentNode* self, const gchar* selectors, GError** error);
	GXmlDomNodeList* (*query_selector_all) (GXmlDomParentNode* self, const gchar* selectors, GError** error);
	GXmlDomElementList* (*get_elements_by_property_value) (GXmlDomParentNode* self, const gchar* property, const gchar* value);
	GXmlDomHTMLCollection* (*get_children) (GXmlDomParentNode* self);
	GXmlDomElement* (*get_first_element_child) (GXmlDomParentNode* self);
	GXmlDomElement* (*get_last_element_child) (GXmlDomParentNode* self);
	gint (*get_child_element_count) (GXmlDomParentNode* self);
};

struct _GXmlDomNonElementParentNodeIface {
	GTypeInterface parent_iface;
	GXmlDomElement* (*get_element_by_id) (GXmlDomNonElementParentNode* self, const gchar* element_id, GError** error);
};

struct _GXmlDomDocumentFragmentIface {
	GTypeInterface parent_iface;
};

struct _GXmlDomNonDocumentTypeChildNodeIface {
	GTypeInterface parent_iface;
	GXmlDomElement* (*get_previous_element_sibling) (GXmlDomNonDocumentTypeChildNode* self);
	GXmlDomElement* (*get_next_element_sibling) (GXmlDomNonDocumentTypeChildNode* self);
};

struct _GXmlDomChildNodeIface {
	GTypeInterface parent_iface;
	void (*remove) (GXmlDomChildNode* self);
};

struct _GXmlDomCharacterDataIface {
	GTypeInterface parent_iface;
	gchar* (*substring_data) (GXmlDomCharacterData* self, gint offset, gint count, GError** error);
	void (*append_data) (GXmlDomCharacterData* self, const gchar* data);
	void (*insert_data) (GXmlDomCharacterData* self, gint offset, const gchar* data, GError** error);
	void (*delete_data) (GXmlDomCharacterData* self, gint offset, gint count, GError** error);
	void (*replace_data) (GXmlDomCharacterData* self, gint offset, gint count, const gchar* data, GError** error);
	gchar* (*get_data) (GXmlDomCharacterData* self);
	void (*set_data) (GXmlDomCharacterData* self, const gchar* value);
	gint (*get_length) (GXmlDomCharacterData* self);
};

struct _GXmlDomTextIface {
	GTypeInterface parent_iface;
	GXmlDomText* (*split_text) (GXmlDomText* self, gint offset, GError** error);
	gchar* (*get_whole_text) (GXmlDomText* self);
};

struct _GXmlDomCommentIface {
	GTypeInterface parent_iface;
};

struct _GXmlDomProcessingInstructionIface {
	GTypeInterface parent_iface;
	gchar* (*get_target) (GXmlDomProcessingInstruction* self);
};

struct _GXmlDomRangeIface {
	GTypeInterface parent_iface;
	void (*set_start) (GXmlDomRange* self, GXmlDomNode* node, gint offset, GError** error);
	void (*set_end) (GXmlDomRange* self, GXmlDomNode* node, gint offset, GError** error);
	void (*set_start_before) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	void (*set_start_after) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	void (*set_end_before) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	void (*set_end_after) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	void (*collapse) (GXmlDomRange* self, gboolean to_start, GError** error);
	void (*select_node) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	void (*select_node_contents) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	gint (*compare_boundary_points) (GXmlDomRange* self, GXmlDomRangeBoundaryPoints how, GXmlDomRange* sourceRange, GError** error);
	void (*delete_contents) (GXmlDomRange* self, GError** error);
	GXmlDomDocumentFragment* (*extract_contents) (GXmlDomRange* self, GError** error);
	GXmlDomDocumentFragment* (*clone_contents) (GXmlDomRange* self, GError** error);
	void (*insert_node) (GXmlDomRange* self, GXmlDomNode* node);
	void (*surround_contents) (GXmlDomRange* self, GXmlDomNode* newParent);
	GXmlDomRange* (*clone_range) (GXmlDomRange* self);
	void (*detach) (GXmlDomRange* self);
	gboolean (*is_point_in_range) (GXmlDomRange* self, GXmlDomNode* node, gint offset);
	gshort (*compare_point) (GXmlDomRange* self, GXmlDomNode* node, gint offset);
	gboolean (*intersects_node) (GXmlDomRange* self, GXmlDomNode* node);
	gchar* (*to_string) (GXmlDomRange* self);
	GXmlDomNode* (*get_start_container) (GXmlDomRange* self);
	gint (*get_start_offset) (GXmlDomRange* self);
	GXmlDomNode* (*get_end_container) (GXmlDomRange* self);
	gint (*get_end_offset) (GXmlDomRange* self);
	gboolean (*get_collapsed) (GXmlDomRange* self);
	GXmlDomNode* (*get_common_ancestor_container) (GXmlDomRange* self);
};

struct _GXmlDomNodeIteratorIface {
	GTypeInterface parent_iface;
	GXmlDomNode* (*next_node) (GXmlDomNodeIterator* self);
	GXmlDomNode* (*previous_node) (GXmlDomNodeIterator* self);
	void (*detach) (GXmlDomNodeIterator* self);
	GXmlDomNode* (*get_root) (GXmlDomNodeIterator* self);
	GXmlDomNode* (*get_reference_node) (GXmlDomNodeIterator* self);
	gboolean (*get_pointer_before_reference_node) (GXmlDomNodeIterator* self);
	gint (*get_what_to_show) (GXmlDomNodeIterator* self);
	GXmlDomNodeFilter* (*get_filter) (GXmlDomNodeIterator* self);
};

struct _GXmlDomTreeWalkerIface {
	GTypeInterface parent_iface;
	GXmlDomNode* (*parent_node) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*first_child) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*last_child) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*previous_sibling) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*next_sibling) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*previous_node) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*next_node) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*get_root) (GXmlDomTreeWalker* self);
	gint (*get_what_to_show) (GXmlDomTreeWalker* self);
	GXmlDomNodeFilter* (*get_filter) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*get_current_node) (GXmlDomTreeWalker* self);
};

struct _GXmlParserIface {
	GTypeInterface parent_iface;
	void (*write_file) (GXmlParser* self, GFile* file, GError** error);
	void (*write_file_async) (GXmlParser* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_file_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	gchar* (*write_string) (GXmlParser* self, GError** error);
	void (*write_string_async) (GXmlParser* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar* (*write_string_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	void (*write_stream) (GXmlParser* self, GOutputStream* stream, GError** error);
	void (*write_stream_async) (GXmlParser* self, GOutputStream* stream, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_stream_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	void (*read_file) (GXmlParser* self, GFile* file, GError** error);
	void (*read_file_async) (GXmlParser* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_file_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	void (*read_stream) (GXmlParser* self, GInputStream* stream, GError** error);
	void (*read_stream_async) (GXmlParser* self, GInputStream* stream, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_stream_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	void (*read_string) (GXmlParser* self, const gchar* str, GError** error);
	void (*read_string_async) (GXmlParser* self, const gchar* str, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_string_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	GInputStream* (*create_stream) (GXmlParser* self, GError** error);
	void (*create_stream_async) (GXmlParser* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GInputStream* (*create_stream_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	void (*read_child_nodes) (GXmlParser* self, GXmlDomNode* parent, GError** error);
	void (*read_child_nodes_async) (GXmlParser* self, GXmlDomNode* parent, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_child_nodes_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	gboolean (*read_child_node) (GXmlParser* self, GXmlDomNode* parent, GError** error);
	gboolean (*read_child_element) (GXmlParser* self, GXmlDomNode* parent, GError** error);
	gboolean (*read_element_property) (GXmlParser* self, GXmlDomNode* parent, GXmlDomNode* * element, GError** error);
	gboolean (*add_element_collection) (GXmlParser* self, GXmlDomNode* parent, GXmlDomNode* * element, GError** error);
	void (*read_child_nodes_stream) (GXmlParser* self, GInputStream* istream, GError** error);
	void (*read_child_nodes_string) (GXmlParser* self, const gchar* str, GError** error);
	gchar* (*read_unparsed) (GXmlParser* self, GError** error);
	gboolean (*move_next_node) (GXmlParser* self, GError** error);
	gboolean (*current_is_empty_element) (GXmlParser* self);
	gboolean (*current_is_element) (GXmlParser* self);
	gboolean (*current_is_document) (GXmlParser* self);
	gchar* (*current_node_name) (GXmlParser* self);
	GXmlDomElement* (*create_element) (GXmlParser* self, GXmlDomNode* parent, GError** error);
	void (*read_element) (GXmlParser* self, GXmlDomElement* element, GError** error);
	gboolean (*get_backup) (GXmlParser* self);
	void (*set_backup) (GXmlParser* self, gboolean value);
	gboolean (*get_indent) (GXmlParser* self);
	void (*set_indent) (GXmlParser* self, gboolean value);
	GCancellable* (*get_cancellable) (GXmlParser* self);
	void (*set_cancellable) (GXmlParser* self, GCancellable* value);
	GXmlDomNode* (*get_node) (GXmlParser* self);
};

struct _GXmlDomDocumentTypeIface {
	GTypeInterface parent_iface;
	const gchar* (*get_name) (GXmlDomDocumentType* self);
	const gchar* (*get_public_id) (GXmlDomDocumentType* self);
	const gchar* (*get_system_id) (GXmlDomDocumentType* self);
};

struct _GXmlDomXMLDocumentIface {
	GTypeInterface parent_iface;
};

struct _GXmlNamespaceIface {
	GTypeInterface parent_iface;
	gchar* (*get_uri) (GXmlNamespace* self);
	gchar* (*get_prefix) (GXmlNamespace* self);
};

struct _GXmlNodeIface {
	GTypeInterface parent_iface;
	GXmlNode* (*get) (GXmlNode* self, const gchar* key);
	GXmlElementList* (*get_elements_by_property_value) (GXmlNode* self, const gchar* property, const gchar* value);
	GXmlElementList* (*get_elements_by_name) (GXmlNode* self, const gchar* name);
	GXmlElementList* (*get_elements_by_name_ns) (GXmlNode* self, const gchar* name, const gchar* ns);
	gchar* (*to_string) (GXmlNode* self);
	gboolean (*set_namespace) (GXmlNode* self, const gchar* uri, const gchar* prefix);
	gchar* (*ns_prefix) (GXmlNode* self);
	gchar* (*ns_uri) (GXmlNode* self);
	GeeList* (*get_namespaces) (GXmlNode* self);
	GeeBidirList* (*get_children_nodes) (GXmlNode* self);
	GeeMap* (*get_attrs) (GXmlNode* self);
	gchar* (*get_name) (GXmlNode* self);
	gchar* (*get_value) (GXmlNode* self);
	void (*set_value) (GXmlNode* self, const gchar* value);
	GXmlNodeType (*get_type_node) (GXmlNode* self);
	GXmlDocument* (*get_document) (GXmlNode* self);
	GXmlNode* (*get_parent) (GXmlNode* self);
};

struct _GXmlDocumentIface {
	GTypeInterface parent_iface;
	GXmlNode* (*create_element) (GXmlDocument* self, const gchar* name, GError** error);
	GXmlNode* (*create_text) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_comment) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_cdata) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_pi) (GXmlDocument* self, const gchar* target, const gchar* data);
	gboolean (*save) (GXmlDocument* self, GCancellable* cancellable, GError** error);
	gboolean (*save_as) (GXmlDocument* self, GFile* f, GCancellable* cancellable, GError** error);
	gboolean (*get_indent) (GXmlDocument* self);
	void (*set_indent) (GXmlDocument* self, gboolean value);
	gboolean (*get_ns_top) (GXmlDocument* self);
	void (*set_ns_top) (GXmlDocument* self, gboolean value);
	gboolean (*get_prefix_default_ns) (GXmlDocument* self);
	void (*set_prefix_default_ns) (GXmlDocument* self, gboolean value);
	gboolean (*get_backup) (GXmlDocument* self);
	void (*set_backup) (GXmlDocument* self, gboolean value);
	GXmlNode* (*get_root) (GXmlDocument* self);
	GFile* (*get_file) (GXmlDocument* self);
	void (*set_file) (GXmlDocument* self, GFile* value);
};

struct _GXmlDomImplementationIface {
	GTypeInterface parent_iface;
	GXmlDomDocumentType* (*create_document_type) (GXmlDomImplementation* self, const gchar* qualified_name, const gchar* public_id, const gchar* system_id, GError** error);
	GXmlDomXMLDocument* (*create_document) (GXmlDomImplementation* self, const gchar* nspace, const gchar* qualified_name, GXmlDomDocumentType* doctype, GError** error);
	GXmlDocument* (*create_html_document) (GXmlDomImplementation* self, const gchar* title);
	gboolean (*has_feature) (GXmlDomImplementation* self);
};

struct _GXmlDomDocumentIface {
	GTypeInterface parent_iface;
	GXmlDomHTMLCollection* (*get_elements_by_tag_name) (GXmlDomDocument* self, const gchar* local_name);
	GXmlDomHTMLCollection* (*get_elements_by_tag_name_ns) (GXmlDomDocument* self, const gchar* namespace, const gchar* local_name);
	GXmlDomHTMLCollection* (*get_elements_by_class_name) (GXmlDomDocument* self, const gchar* classNames);
	GXmlDomElement* (*create_element) (GXmlDomDocument* self, const gchar* local_name, GError** error);
	GXmlDomElement* (*create_element_ns) (GXmlDomDocument* self, const gchar* namespace, const gchar* qualified_name, GError** error);
	GXmlDomDocumentFragment* (*create_document_fragment) (GXmlDomDocument* self);
	GXmlDomText* (*create_text_node) (GXmlDomDocument* self, const gchar* data, GError** error);
	GXmlDomComment* (*create_comment) (GXmlDomDocument* self, const gchar* data, GError** error);
	GXmlDomProcessingInstruction* (*create_processing_instruction) (GXmlDomDocument* self, const gchar* target, const gchar* data, GError** error);
	GXmlDomNode* (*import_node) (GXmlDomDocument* self, GXmlDomNode* node, gboolean deep, GError** error);
	GXmlDomNode* (*adopt_node) (GXmlDomDocument* self, GXmlDomNode* node, GError** error);
	GXmlDomEvent* (*create_event) (GXmlDomDocument* self, const gchar* interface, GError** error);
	GXmlDomRange* (*create_range) (GXmlDomDocument* self);
	GXmlDomNodeIterator* (*create_node_iterator) (GXmlDomDocument* self, GXmlDomNode* root, gint whatToShow, GXmlDomNodeFilter* filter);
	GXmlDomTreeWalker* (*create_tree_walker) (GXmlDomDocument* self, GXmlDomNode* root, gint what_to_show, GXmlDomNodeFilter* filter);
	void (*write_file) (GXmlDomDocument* self, GFile* file, GCancellable* cancellable, GError** error);
	void (*write_file_async) (GXmlDomDocument* self, GFile* file, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_file_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	void (*write_stream) (GXmlDomDocument* self, GOutputStream* stream, GCancellable* cancellable, GError** error);
	void (*write_stream_async) (GXmlDomDocument* self, GOutputStream* stream, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_stream_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	GInputStream* (*create_stream) (GXmlDomDocument* self, GError** error);
	void (*create_stream_async) (GXmlDomDocument* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GInputStream* (*create_stream_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	gchar* (*write_string) (GXmlDomDocument* self, GCancellable* cancellable, GError** error);
	void (*write_string_async) (GXmlDomDocument* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar* (*write_string_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	void (*read_from_file) (GXmlDomDocument* self, GFile* file, GCancellable* cancellable, GError** error);
	void (*read_from_file_async) (GXmlDomDocument* self, GFile* file, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_file_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	void (*read_from_string) (GXmlDomDocument* self, const gchar* str, GCancellable* cancellable, GError** error);
	void (*read_from_string_async) (GXmlDomDocument* self, const gchar* str, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_string_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	void (*read_from_stream) (GXmlDomDocument* self, GInputStream* stream, GCancellable* cancellable, GError** error);
	void (*read_from_stream_async) (GXmlDomDocument* self, GInputStream* stream, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_stream_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	GXmlParser* (*get_xml_parser) (GXmlDomDocument* self);
	void (*set_xml_parser) (GXmlDomDocument* self, GXmlParser* parser);
	GXmlDomImplementation* (*get_implementation) (GXmlDomDocument* self);
	const gchar* (*get_url) (GXmlDomDocument* self);
	const gchar* (*get_document_uri) (GXmlDomDocument* self);
	const gchar* (*get_origin) (GXmlDomDocument* self);
	const gchar* (*get_compat_mode) (GXmlDomDocument* self);
	const gchar* (*get_character_set) (GXmlDomDocument* self);
	const gchar* (*get_content_type) (GXmlDomDocument* self);
	GXmlDomDocumentType* (*get_doctype) (GXmlDomDocument* self);
	GXmlDomElement* (*get_document_element) (GXmlDomDocument* self);
};

struct _GXmlDomNodeIface {
	GTypeInterface parent_iface;
	gboolean (*has_child_nodes) (GXmlDomNode* self);
	void (*normalize) (GXmlDomNode* self);
	gboolean (*is_equal_node) (GXmlDomNode* self, GXmlDomNode* node);
	GXmlDomNodeDocumentPosition (*compare_document_position) (GXmlDomNode* self, GXmlDomNode* other);
	gboolean (*contains) (GXmlDomNode* self, GXmlDomNode* other);
	gchar* (*lookup_prefix) (GXmlDomNode* self, const gchar* nspace);
	gchar* (*lookup_namespace_uri) (GXmlDomNode* self, const gchar* prefix);
	gboolean (*is_default_namespace) (GXmlDomNode* self, const gchar* nspace);
	GXmlDomNode* (*insert_before) (GXmlDomNode* self, GXmlDomNode* node, GXmlDomNode* child, GError** error);
	GXmlDomNode* (*append_child) (GXmlDomNode* self, GXmlDomNode* node, GError** error);
	GXmlDomNode* (*replace_child) (GXmlDomNode* self, GXmlDomNode* node, GXmlDomNode* child, GError** error);
	GXmlDomNode* (*remove_child) (GXmlDomNode* self, GXmlDomNode* child, GError** error);
	GXmlDomNode* (*clone_node) (GXmlDomNode* self, gboolean deep, GError** error);
	GXmlDomNodeNodeType (*get_node_type) (GXmlDomNode* self);
	gchar* (*get_node_name) (GXmlDomNode* self);
	const gchar* (*get_base_uri) (GXmlDomNode* self);
	GXmlDomDocument* (*get_owner_document) (GXmlDomNode* self);
	void (*set_owner_document) (GXmlDomNode* self, GXmlDomDocument* value);
	GXmlDomNode* (*get_parent_node) (GXmlDomNode* self);
	GXmlDomElement* (*get_parent_element) (GXmlDomNode* self);
	GXmlDomNodeList* (*get_child_nodes) (GXmlDomNode* self);
	GXmlDomNode* (*get_first_child) (GXmlDomNode* self);
	GXmlDomNode* (*get_last_child) (GXmlDomNode* self);
	GXmlDomNode* (*get_previous_sibling) (GXmlDomNode* self);
	GXmlDomNode* (*get_next_sibling) (GXmlDomNode* self);
	gchar* (*get_node_value) (GXmlDomNode* self);
	void (*set_node_value) (GXmlDomNode* self, const gchar* value);
	gchar* (*get_text_content) (GXmlDomNode* self);
	void (*set_text_content) (GXmlDomNode* self, const gchar* value);
};

struct _GXmlDomTokenListIface {
	GTypeInterface parent_iface;
	gchar* (*item) (GXmlDomTokenList* self, gint index);
	gboolean (*contains) (GXmlDomTokenList* self, const gchar* token, GError** error);
	void (*add) (GXmlDomTokenList* self, gchar** tokens, gint tokens_length1, GError** error);
	void (*remove) (GXmlDomTokenList* self, gchar** tokens, gint tokens_length1);
	gboolean (*toggle) (GXmlDomTokenList* self, const gchar* token, gboolean force, gboolean _auto_, GError** error);
	gchar* (*to_string) (GXmlDomTokenList* self);
	gint (*get_length) (GXmlDomTokenList* self);
};

struct _GXmlDomNamedNodeMapIface {
	GTypeInterface parent_iface;
	GXmlDomNode* (*item) (GXmlDomNamedNodeMap* self, gint index);
	GXmlDomNode* (*get_named_item) (GXmlDomNamedNodeMap* self, const gchar* name);
	GXmlDomNode* (*set_named_item) (GXmlDomNamedNodeMap* self, GXmlDomNode* node, GError** error);
	GXmlDomNode* (*remove_named_item) (GXmlDomNamedNodeMap* self, const gchar* name, GError** error);
	GXmlDomNode* (*remove_named_item_ns) (GXmlDomNamedNodeMap* self, const gchar* namespace_uri, const gchar* localName, GError** error);
	GXmlDomNode* (*get_named_item_ns) (GXmlDomNamedNodeMap* self, const gchar* namespace_uri, const gchar* local_name, GError** error);
	GXmlDomNode* (*set_named_item_ns) (GXmlDomNamedNodeMap* self, GXmlDomNode* node, GError** error);
	gint (*get_length) (GXmlDomNamedNodeMap* self);
};

struct _GXmlDomElementIface {
	GTypeInterface parent_iface;
	gchar* (*get_attribute) (GXmlDomElement* self, const gchar* name);
	gchar* (*get_attribute_ns) (GXmlDomElement* self, const gchar* namespace, const gchar* local_name);
	void (*set_attribute) (GXmlDomElement* self, const gchar* name, const gchar* value, GError** error);
	void (*set_attribute_ns) (GXmlDomElement* self, const gchar* namespace, const gchar* name, const gchar* value, GError** error);
	void (*remove_attribute) (GXmlDomElement* self, const gchar* name);
	void (*remove_attribute_ns) (GXmlDomElement* self, const gchar* namespace, const gchar* local_name);
	gboolean (*has_attribute) (GXmlDomElement* self, const gchar* name);
	gboolean (*has_attribute_ns) (GXmlDomElement* self, const gchar* namespace, const gchar* local_name);
	GXmlDomHTMLCollection* (*get_elements_by_tag_name) (GXmlDomElement* self, const gchar* local_name);
	GXmlDomHTMLCollection* (*get_elements_by_tag_name_ns) (GXmlDomElement* self, const gchar* namespace, const gchar* local_name);
	GXmlDomHTMLCollection* (*get_elements_by_class_name) (GXmlDomElement* self, const gchar* class_names);
	gboolean (*matches) (GXmlDomElement* self, const gchar* selectors, GError** error);
	void (*read_from_uri) (GXmlDomElement* self, const gchar* uri, GError** error);
	void (*read_from_uri_async) (GXmlDomElement* self, const gchar* uri, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_uri_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	void (*read_from_file) (GXmlDomElement* self, GFile* f, GCancellable* cancellable, GError** error);
	void (*read_from_file_async) (GXmlDomElement* self, GFile* f, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_file_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	void (*read_from_stream) (GXmlDomElement* self, GInputStream* istream, GCancellable* cancellable, GError** error);
	void (*read_from_stream_async) (GXmlDomElement* self, GInputStream* istream, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_stream_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	void (*read_from_string) (GXmlDomElement* self, const gchar* str, GCancellable* cancellable, GError** error);
	void (*read_from_string_async) (GXmlDomElement* self, const gchar* str, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_string_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	gchar* (*write_string) (GXmlDomElement* self, GCancellable* cancellable, GError** error);
	void (*write_string_async) (GXmlDomElement* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar* (*write_string_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	void (*write_file) (GXmlDomElement* self, GFile* f, GCancellable* cancellable, GError** error);
	void (*write_file_async) (GXmlDomElement* self, GFile* f, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_file_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	void (*write_stream) (GXmlDomElement* self, GOutputStream* stream, GError** error);
	void (*write_stream_async) (GXmlDomElement* self, GOutputStream* stream, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_stream_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	GInputStream* (*create_stream) (GXmlDomElement* self, GError** error);
	void (*create_stream_async) (GXmlDomElement* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GInputStream* (*create_stream_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	gchar* (*get_namespace_uri) (GXmlDomElement* self);
	gchar* (*get_prefix) (GXmlDomElement* self);
	gchar* (*get_local_name) (GXmlDomElement* self);
	gchar* (*get_tag_name) (GXmlDomElement* self);
	gchar* (*get_id) (GXmlDomElement* self);
	void (*set_id) (GXmlDomElement* self, const gchar* value);
	gchar* (*get_class_name) (GXmlDomElement* self);
	void (*set_class_name) (GXmlDomElement* self, const gchar* value);
	GXmlDomTokenList* (*get_class_list) (GXmlDomElement* self);
	GXmlDomNamedNodeMap* (*get_attributes) (GXmlDomElement* self);
};

static gint GXmlCssString_private_offset;
static gpointer gxml_css_string_parent_class = NULL;
static gint GXmlCssSelector_private_offset;
static gpointer gxml_css_selector_parent_class = NULL;
static gpointer gxml_css_element_selector_parent_class = NULL;
static gint GXmlCssAttributeSelector_private_offset;
static gpointer gxml_css_attribute_selector_parent_class = NULL;
static gint GXmlCssNotSelector_private_offset;
static gpointer gxml_css_not_selector_parent_class = NULL;
static gint GXmlCssSelectorParser_private_offset;
static gpointer gxml_css_selector_parser_parent_class = NULL;

GType gxml_css_combiner_get_type (void) G_GNUC_CONST;
GType gxml_css_selector_type_get_type (void) G_GNUC_CONST;
GQuark gxml_css_selector_error_quark (void);
GType gxml_css_string_get_type (void) G_GNUC_CONST;
GXmlCssString* gxml_css_string_new (const gchar* text);
GXmlCssString* gxml_css_string_construct (GType object_type,
                                          const gchar* text);
gunichar gxml_css_string_peek (GXmlCssString* self);
const gchar* gxml_css_string_get_text (GXmlCssString* self);
gunichar gxml_css_string_read (GXmlCssString* self);
gunichar gxml_css_string_read_r (GXmlCssString* self);
gboolean gxml_css_string_get_eof (GXmlCssString* self);
static void gxml_css_string_set_text (GXmlCssString* self,
                               const gchar* value);
static void gxml_css_string_finalize (GObject * obj);
static void _vala_gxml_css_string_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec);
static void _vala_gxml_css_string_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec);
GType gxml_css_selector_get_type (void) G_GNUC_CONST;
GXmlCssSelector* gxml_css_selector_new (GXmlCssSelectorType t,
                                        const gchar* name);
GXmlCssSelector* gxml_css_selector_construct (GType object_type,
                                              GXmlCssSelectorType t,
                                              const gchar* name);
GXmlCssSelector* gxml_css_selector_new_with_value (GXmlCssSelectorType t,
                                                   const gchar* name,
                                                   const gchar* value);
GXmlCssSelector* gxml_css_selector_construct_with_value (GType object_type,
                                                         GXmlCssSelectorType t,
                                                         const gchar* name,
                                                         const gchar* value);
GXmlCssSelectorType gxml_css_selector_get_selector_type (GXmlCssSelector* self);
void gxml_css_selector_set_selector_type (GXmlCssSelector* self,
                                          GXmlCssSelectorType value);
const gchar* gxml_css_selector_get_name (GXmlCssSelector* self);
void gxml_css_selector_set_name (GXmlCssSelector* self,
                                 const gchar* value);
const gchar* gxml_css_selector_get_value (GXmlCssSelector* self);
void gxml_css_selector_set_value (GXmlCssSelector* self,
                                  const gchar* value);
GXmlCssCombiner gxml_css_selector_get_combiner (GXmlCssSelector* self);
void gxml_css_selector_set_combiner (GXmlCssSelector* self,
                                     GXmlCssCombiner value);
static void gxml_css_selector_finalize (GObject * obj);
static void _vala_gxml_css_selector_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_gxml_css_selector_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec);
GType gxml_css_element_selector_get_type (void) G_GNUC_CONST;
GXmlCssElementSelector* gxml_css_element_selector_new (const gchar* prefix,
                                                       const gchar* local_name);
GXmlCssElementSelector* gxml_css_element_selector_construct (GType object_type,
                                                             const gchar* prefix,
                                                             const gchar* local_name);
gboolean gxml_css_element_selector_get_prefixed (GXmlCssElementSelector* self);
gchar* gxml_css_element_selector_get_prefix (GXmlCssElementSelector* self);
void gxml_css_element_selector_set_prefix (GXmlCssElementSelector* self,
                                           const gchar* value);
gchar* gxml_css_element_selector_get_local_name (GXmlCssElementSelector* self);
void gxml_css_element_selector_set_local_name (GXmlCssElementSelector* self,
                                               const gchar* value);
static void _vala_gxml_css_element_selector_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_gxml_css_element_selector_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);
GType gxml_css_attribute_selector_get_type (void) G_GNUC_CONST;
GXmlCssAttributeSelector* gxml_css_attribute_selector_new (const gchar* prefix,
                                                           const gchar* local_name);
GXmlCssAttributeSelector* gxml_css_attribute_selector_construct (GType object_type,
                                                                 const gchar* prefix,
                                                                 const gchar* local_name);
void gxml_css_attribute_selector_set_prefix (GXmlCssAttributeSelector* self,
                                             const gchar* value);
void gxml_css_attribute_selector_set_local_name (GXmlCssAttributeSelector* self,
                                                 const gchar* value);
const gchar* gxml_css_attribute_selector_get_prefix (GXmlCssAttributeSelector* self);
const gchar* gxml_css_attribute_selector_get_local_name (GXmlCssAttributeSelector* self);
static void gxml_css_attribute_selector_finalize (GObject * obj);
static void _vala_gxml_css_attribute_selector_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec);
static void _vala_gxml_css_attribute_selector_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec);
GType gxml_css_not_selector_get_type (void) G_GNUC_CONST;
GXmlCssNotSelector* gxml_css_not_selector_new (void);
GXmlCssNotSelector* gxml_css_not_selector_construct (GType object_type);
GeeList* gxml_css_not_selector_get_selectors (GXmlCssNotSelector* self);
static GObject * gxml_css_not_selector_constructor (GType type,
                                             guint n_construct_properties,
                                             GObjectConstructParam * construct_properties);
static void gxml_css_not_selector_finalize (GObject * obj);
static void _vala_gxml_css_not_selector_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
GType gxml_css_selector_parser_get_type (void) G_GNUC_CONST;
static gboolean gxml_css_selector_parser_is_valid_char (gunichar u);
static gboolean _vala_unichar_array_contains (gunichar * stack,
                                       int stack_length,
                                       const gunichar needle);
static gchar* gxml_css_selector_parser_parse_identifier (GXmlCssString* str,
                                                  GXmlCssStringFunc func,
                                                  gpointer func_target);
static GXmlCssSelector* gxml_css_selector_parser_parse_element (GXmlCssString* str,
                                                         GError** error);
static GXmlCssNotSelector* gxml_css_selector_parser_parse_not_selector (GXmlCssString* str,
                                                                 GError** error);
static void gxml_css_selector_parser_parse_selectors (GXmlCssString* str,
                                               GeeList* list,
                                               gunichar stop_char,
                                               GError** error);
static GXmlCssSelector* gxml_css_selector_parser_parse_pseudo (GXmlCssString* str,
                                                        GError** error);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      int stack_length,
                                      const gchar* needle);
static GXmlCssSelector* gxml_css_selector_parser_parse_class (GXmlCssString* str,
                                                       GError** error);
static GXmlCssSelector* gxml_css_selector_parser_parse_id (GXmlCssString* str,
                                                    GError** error);
static GXmlCssSelector* gxml_css_selector_parser_parse_attribute (GXmlCssString* str,
                                                           GError** error);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static gboolean __lambda4_ (Block1Data* _data1_,
                     GXmlCssString* s);
static gboolean ___lambda4__gxml_css_string_func (GXmlCssString* str,
                                           gpointer self);
const gchar* gxml_css_combiner_to_string (GXmlCssCombiner self);
void gxml_css_selector_parser_parse (GXmlCssSelectorParser* self,
                                     const gchar* selectors,
                                     GError** error);
GType gxml_dom_time_stamp_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_phase_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_listener_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_target_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_document_position_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_node_type_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_element_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_html_collection_get_type (void) G_GNUC_CONST;
GType gxml_dom_parent_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_non_element_parent_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_document_fragment_get_type (void) G_GNUC_CONST;
GType gxml_dom_non_document_type_child_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_child_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_character_data_get_type (void) G_GNUC_CONST;
GType gxml_dom_text_get_type (void) G_GNUC_CONST;
GType gxml_dom_comment_get_type (void) G_GNUC_CONST;
GType gxml_dom_processing_instruction_get_type (void) G_GNUC_CONST;
GType gxml_dom_range_boundary_points_get_type (void) G_GNUC_CONST;
GType gxml_dom_range_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_filter_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_iterator_get_type (void) G_GNUC_CONST;
GType gxml_dom_tree_walker_get_type (void) G_GNUC_CONST;
GType gxml_parser_get_type (void) G_GNUC_CONST;
GType gxml_dom_document_type_get_type (void) G_GNUC_CONST;
GType gxml_dom_xml_document_get_type (void) G_GNUC_CONST;
GType gxml_element_list_get_type (void) G_GNUC_CONST;
GType gxml_namespace_get_type (void) G_GNUC_CONST;
GType gxml_node_type_get_type (void) G_GNUC_CONST;
GType gxml_node_get_type (void) G_GNUC_CONST;
GType gxml_document_get_type (void) G_GNUC_CONST;
GType gxml_dom_implementation_get_type (void) G_GNUC_CONST;
GType gxml_dom_document_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_token_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_named_node_map_get_type (void) G_GNUC_CONST;
GType gxml_dom_element_get_type (void) G_GNUC_CONST;
static gboolean gxml_css_selector_parser_match_pseudo (GXmlDomElement* element,
                                                GXmlCssSelector* selector,
                                                GError** error);
GXmlDomDocument* gxml_dom_node_get_owner_document (GXmlDomNode* self);
GXmlDomElement* gxml_dom_document_get_document_element (GXmlDomDocument* self);
GXmlDomHTMLCollection* gxml_dom_parent_node_get_children (GXmlDomParentNode* self);
gint gxml_dom_html_collection_get_length (GXmlDomHTMLCollection* self);
gchar* gxml_dom_element_get_local_name (GXmlDomElement* self);
GXmlDomNamedNodeMap* gxml_dom_element_get_attributes (GXmlDomElement* self);
GXmlDomNode* gxml_dom_named_node_map_get_named_item (GXmlDomNamedNodeMap* self,
                                                     const gchar* name);
GXmlDomElement* gxml_dom_non_document_type_child_node_get_previous_element_sibling (GXmlDomNonDocumentTypeChildNode* self);
GXmlDomElement* gxml_dom_non_document_type_child_node_get_next_element_sibling (GXmlDomNonDocumentTypeChildNode* self);
GXmlDomElement* gxml_dom_node_get_parent_element (GXmlDomNode* self);
GXmlDomElement* gxml_dom_html_collection_item (GXmlDomHTMLCollection* self,
                                               gint index);
static gboolean gxml_css_selector_parser_match_attribute (GXmlDomElement* element,
                                                   GXmlCssAttributeSelector* selector,
                                                   GError** error);
gint gxml_dom_named_node_map_get_length (GXmlDomNamedNodeMap* self);
GXmlDomNode* gxml_dom_named_node_map_item (GXmlDomNamedNodeMap* self,
                                           gint index);
gchar* gxml_dom_node_get_node_name (GXmlDomNode* self);
gchar* gxml_dom_node_get_node_value (GXmlDomNode* self);
static gboolean gxml_css_selector_parser_match_node (GXmlDomElement* element,
                                              GXmlCssSelector* selector,
                                              GError** error);
gchar* gxml_dom_element_get_attribute (GXmlDomElement* self,
                                       const gchar* name);
GXmlDomTokenList* gxml_dom_element_get_class_list (GXmlDomElement* self);
gboolean gxml_dom_token_list_contains (GXmlDomTokenList* self,
                                       const gchar* token,
                                       GError** error);
gchar* gxml_dom_element_get_id (GXmlDomElement* self);
gchar* gxml_dom_element_get_prefix (GXmlDomElement* self);
static gboolean gxml_css_selector_parser_match_element (GXmlDomElement* root,
                                                 GXmlDomElement* element,
                                                 GeeCollection* selectors,
                                                 GError** error);
gboolean gxml_css_selector_parser_match (GXmlCssSelectorParser* self,
                                         GXmlDomElement* element,
                                         GError** error);
GXmlDomNodeList* gxml_css_selector_parser_query_selector_all (GXmlCssSelectorParser* self,
                                                              GXmlDomElement* element,
                                                              GError** error);
GType gxml_gom_node_list_get_type (void) G_GNUC_CONST;
GXmlGomNodeList* gxml_gom_node_list_new (void);
GXmlGomNodeList* gxml_gom_node_list_construct (GType object_type);
GXmlCssSelectorParser* gxml_css_selector_parser_new (void);
GXmlCssSelectorParser* gxml_css_selector_parser_construct (GType object_type);
GeeList* gxml_css_selector_parser_get_selectors (GXmlCssSelectorParser* self);
static GObject * gxml_css_selector_parser_constructor (GType type,
                                                guint n_construct_properties,
                                                GObjectConstructParam * construct_properties);
static void gxml_css_selector_parser_finalize (GObject * obj);
static void _vala_gxml_css_selector_parser_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gint array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gint array_length,
                       GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);

GType
gxml_css_combiner_get_type (void)
{
	static volatile gsize gxml_css_combiner_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_css_combiner_type_id__volatile)) {
		static const GEnumValue values[] = {{GXML_CSS_COMBINER_NULL, "GXML_CSS_COMBINER_NULL", "null"}, {GXML_CSS_COMBINER_NONE, "GXML_CSS_COMBINER_NONE", "none"}, {GXML_CSS_COMBINER_INSIDE, "GXML_CSS_COMBINER_INSIDE", "inside"}, {GXML_CSS_COMBINER_AND, "GXML_CSS_COMBINER_AND", "and"}, {GXML_CSS_COMBINER_PARENT, "GXML_CSS_COMBINER_PARENT", "parent"}, {GXML_CSS_COMBINER_AFTER, "GXML_CSS_COMBINER_AFTER", "after"}, {GXML_CSS_COMBINER_PRECEDED, "GXML_CSS_COMBINER_PRECEDED", "preceded"}, {0, NULL, NULL}};
		GType gxml_css_combiner_type_id;
		gxml_css_combiner_type_id = g_enum_register_static ("GXmlCssCombiner", values);
		g_once_init_leave (&gxml_css_combiner_type_id__volatile, gxml_css_combiner_type_id);
	}
	return gxml_css_combiner_type_id__volatile;
}

GType
gxml_css_selector_type_get_type (void)
{
	static volatile gsize gxml_css_selector_type_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_css_selector_type_type_id__volatile)) {
		static const GEnumValue values[] = {{GXML_CSS_SELECTOR_TYPE_CLASS, "GXML_CSS_SELECTOR_TYPE_CLASS", "class"}, {GXML_CSS_SELECTOR_TYPE_ID, "GXML_CSS_SELECTOR_TYPE_ID", "id"}, {GXML_CSS_SELECTOR_TYPE_ALL, "GXML_CSS_SELECTOR_TYPE_ALL", "all"}, {GXML_CSS_SELECTOR_TYPE_ELEMENT, "GXML_CSS_SELECTOR_TYPE_ELEMENT", "element"}, {GXML_CSS_SELECTOR_TYPE_ATTRIBUTE, "GXML_CSS_SELECTOR_TYPE_ATTRIBUTE", "attribute"}, {GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_EQUAL, "GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_EQUAL", "attribute-equal"}, {GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_CONTAINS, "GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_CONTAINS", "attribute-contains"}, {GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_SUBSTRING, "GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_SUBSTRING", "attribute-substring"}, {GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_STARTS_WITH, "GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_STARTS_WITH", "attribute-starts-with"}, {GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_STARTS_WITH_WORD, "GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_STARTS_WITH_WORD", "attribute-starts-with-word"}, {GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_ENDS_WITH, "GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_ENDS_WITH", "attribute-ends-with"}, {GXML_CSS_SELECTOR_TYPE_PSEUDO_CLASS, "GXML_CSS_SELECTOR_TYPE_PSEUDO_CLASS", "pseudo-class"}, {0, NULL, NULL}};
		GType gxml_css_selector_type_type_id;
		gxml_css_selector_type_type_id = g_enum_register_static ("GXmlCssSelectorType", values);
		g_once_init_leave (&gxml_css_selector_type_type_id__volatile, gxml_css_selector_type_type_id);
	}
	return gxml_css_selector_type_type_id__volatile;
}

GQuark
gxml_css_selector_error_quark (void)
{
	return g_quark_from_static_string ("gxml-css-selector-error-quark");
}

static inline gpointer
gxml_css_string_get_instance_private (GXmlCssString* self)
{
	return G_STRUCT_MEMBER_P (self, GXmlCssString_private_offset);
}

GXmlCssString*
gxml_css_string_construct (GType object_type,
                           const gchar* text)
{
	GXmlCssString * self = NULL;
	g_return_val_if_fail (text != NULL, NULL);
	self = (GXmlCssString*) g_object_new (object_type, "text", text, NULL);
	return self;
}

GXmlCssString*
gxml_css_string_new (const gchar* text)
{
	return gxml_css_string_construct (GXML_TYPE_CSS_STRING, text);
}

static gboolean
string_get_next_char (const gchar* self,
                      gint* index,
                      gunichar* c)
{
	gunichar _vala_c = 0U;
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_vala_c = g_utf8_get_char (((gchar*) self) + (*index));
	if (_vala_c != ((gunichar) 0)) {
		gchar* _tmp0_;
		_tmp0_ = g_utf8_next_char (((gchar*) self) + (*index));
		*index = (gint) (_tmp0_ - ((gchar*) self));
		result = TRUE;
		if (c) {
			*c = _vala_c;
		}
		return result;
	} else {
		result = FALSE;
		if (c) {
			*c = _vala_c;
		}
		return result;
	}
	if (c) {
		*c = _vala_c;
	}
}

gunichar
gxml_css_string_peek (GXmlCssString* self)
{
	gunichar result = 0U;
	gint pos = 0;
	gunichar u = 0U;
	const gchar* _tmp0_;
	gunichar _tmp1_ = 0U;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, 0U);
	pos = self->priv->position;
	u = (gunichar) 0;
	_tmp0_ = self->priv->_text;
	_tmp2_ = string_get_next_char (_tmp0_, &pos, &_tmp1_);
	u = _tmp1_;
	if (!_tmp2_) {
		result = (gunichar) 0;
		return result;
	}
	result = u;
	return result;
}

gunichar
gxml_css_string_read (GXmlCssString* self)
{
	gunichar result = 0U;
	gunichar u = 0U;
	const gchar* _tmp0_;
	gunichar _tmp1_ = 0U;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, 0U);
	u = (gunichar) 0;
	_tmp0_ = self->priv->_text;
	_tmp2_ = string_get_next_char (_tmp0_, &self->priv->position, &_tmp1_);
	u = _tmp1_;
	if (!_tmp2_) {
		result = (gunichar) 0;
		return result;
	}
	result = u;
	return result;
}

static gboolean
string_get_prev_char (const gchar* self,
                      gint* index,
                      gunichar* c)
{
	gunichar _vala_c = 0U;
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	if (0 < (*index)) {
		gchar* _tmp0_;
		_tmp0_ = g_utf8_prev_char (((gchar*) self) + (*index));
		*index = (gint) (_tmp0_ - ((gchar*) self));
		_vala_c = g_utf8_get_char (((gchar*) self) + (*index));
		result = TRUE;
		if (c) {
			*c = _vala_c;
		}
		return result;
	} else {
		_vala_c = (gunichar) 0;
		result = FALSE;
		if (c) {
			*c = _vala_c;
		}
		return result;
	}
	if (c) {
		*c = _vala_c;
	}
}

gunichar
gxml_css_string_read_r (GXmlCssString* self)
{
	gunichar result = 0U;
	gunichar u = 0U;
	const gchar* _tmp0_;
	gunichar _tmp1_ = 0U;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, 0U);
	u = (gunichar) 0;
	_tmp0_ = self->priv->_text;
	_tmp2_ = string_get_prev_char (_tmp0_, &self->priv->position, &_tmp1_);
	u = _tmp1_;
	if (!_tmp2_) {
		result = (gunichar) 0;
		return result;
	}
	result = u;
	return result;
}

gboolean
gxml_css_string_get_eof (GXmlCssString* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = gxml_css_string_peek (self) == ((gunichar) 0);
	return result;
}

const gchar*
gxml_css_string_get_text (GXmlCssString* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_text;
	result = _tmp0_;
	return result;
}

static void
gxml_css_string_set_text (GXmlCssString* self,
                          const gchar* value)
{
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, gxml_css_string_get_text (self)) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_text);
		self->priv->_text = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gxml_css_string_properties[GXML_CSS_STRING_TEXT_PROPERTY]);
	}
}

static void
gxml_css_string_class_init (GXmlCssStringClass * klass,
                            gpointer klass_data)
{
	gxml_css_string_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GXmlCssString_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_css_string_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_css_string_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_css_string_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_STRING_EOF_PROPERTY, gxml_css_string_properties[GXML_CSS_STRING_EOF_PROPERTY] = g_param_spec_boolean ("eof", "eof", "eof", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_STRING_TEXT_PROPERTY, gxml_css_string_properties[GXML_CSS_STRING_TEXT_PROPERTY] = g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
gxml_css_string_instance_init (GXmlCssString * self,
                               gpointer klass)
{
	self->priv = gxml_css_string_get_instance_private (self);
}

static void
gxml_css_string_finalize (GObject * obj)
{
	GXmlCssString * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_CSS_STRING, GXmlCssString);
	_g_free0 (self->priv->_text);
	G_OBJECT_CLASS (gxml_css_string_parent_class)->finalize (obj);
}

GType
gxml_css_string_get_type (void)
{
	static volatile gsize gxml_css_string_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_css_string_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlCssStringClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_css_string_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlCssString), 0, (GInstanceInitFunc) gxml_css_string_instance_init, NULL };
		GType gxml_css_string_type_id;
		gxml_css_string_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlCssString", &g_define_type_info, 0);
		GXmlCssString_private_offset = g_type_add_instance_private (gxml_css_string_type_id, sizeof (GXmlCssStringPrivate));
		g_once_init_leave (&gxml_css_string_type_id__volatile, gxml_css_string_type_id);
	}
	return gxml_css_string_type_id__volatile;
}

static void
_vala_gxml_css_string_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec)
{
	GXmlCssString * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_STRING, GXmlCssString);
	switch (property_id) {
		case GXML_CSS_STRING_EOF_PROPERTY:
		g_value_set_boolean (value, gxml_css_string_get_eof (self));
		break;
		case GXML_CSS_STRING_TEXT_PROPERTY:
		g_value_set_string (value, gxml_css_string_get_text (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gxml_css_string_set_property (GObject * object,
                                    guint property_id,
                                    const GValue * value,
                                    GParamSpec * pspec)
{
	GXmlCssString * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_STRING, GXmlCssString);
	switch (property_id) {
		case GXML_CSS_STRING_TEXT_PROPERTY:
		gxml_css_string_set_text (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gxml_css_selector_get_instance_private (GXmlCssSelector* self)
{
	return G_STRUCT_MEMBER_P (self, GXmlCssSelector_private_offset);
}

GXmlCssSelector*
gxml_css_selector_construct (GType object_type,
                             GXmlCssSelectorType t,
                             const gchar* name)
{
	GXmlCssSelector * self = NULL;
	g_return_val_if_fail (name != NULL, NULL);
	self = (GXmlCssSelector*) g_object_new (object_type, "selector-type", t, "name", name, "value", "", NULL);
	return self;
}

GXmlCssSelector*
gxml_css_selector_new (GXmlCssSelectorType t,
                       const gchar* name)
{
	return gxml_css_selector_construct (GXML_TYPE_CSS_SELECTOR, t, name);
}

GXmlCssSelector*
gxml_css_selector_construct_with_value (GType object_type,
                                        GXmlCssSelectorType t,
                                        const gchar* name,
                                        const gchar* value)
{
	GXmlCssSelector * self = NULL;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (value != NULL, NULL);
	self = (GXmlCssSelector*) g_object_new (object_type, "selector-type", t, "name", name, "value", value, NULL);
	return self;
}

GXmlCssSelector*
gxml_css_selector_new_with_value (GXmlCssSelectorType t,
                                  const gchar* name,
                                  const gchar* value)
{
	return gxml_css_selector_construct_with_value (GXML_TYPE_CSS_SELECTOR, t, name, value);
}

GXmlCssSelectorType
gxml_css_selector_get_selector_type (GXmlCssSelector* self)
{
	GXmlCssSelectorType result;
	GXmlCssSelectorType _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_selector_type;
	result = _tmp0_;
	return result;
}

void
gxml_css_selector_set_selector_type (GXmlCssSelector* self,
                                     GXmlCssSelectorType value)
{
	g_return_if_fail (self != NULL);
	if (gxml_css_selector_get_selector_type (self) != value) {
		self->priv->_selector_type = value;
		g_object_notify_by_pspec ((GObject *) self, gxml_css_selector_properties[GXML_CSS_SELECTOR_SELECTOR_TYPE_PROPERTY]);
	}
}

const gchar*
gxml_css_selector_get_name (GXmlCssSelector* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

void
gxml_css_selector_set_name (GXmlCssSelector* self,
                            const gchar* value)
{
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, gxml_css_selector_get_name (self)) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gxml_css_selector_properties[GXML_CSS_SELECTOR_NAME_PROPERTY]);
	}
}

const gchar*
gxml_css_selector_get_value (GXmlCssSelector* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_value;
	result = _tmp0_;
	return result;
}

void
gxml_css_selector_set_value (GXmlCssSelector* self,
                             const gchar* value)
{
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, gxml_css_selector_get_value (self)) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_value);
		self->priv->_value = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gxml_css_selector_properties[GXML_CSS_SELECTOR_VALUE_PROPERTY]);
	}
}

GXmlCssCombiner
gxml_css_selector_get_combiner (GXmlCssSelector* self)
{
	GXmlCssCombiner result;
	GXmlCssCombiner _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_combiner;
	result = _tmp0_;
	return result;
}

void
gxml_css_selector_set_combiner (GXmlCssSelector* self,
                                GXmlCssCombiner value)
{
	g_return_if_fail (self != NULL);
	if (gxml_css_selector_get_combiner (self) != value) {
		self->priv->_combiner = value;
		g_object_notify_by_pspec ((GObject *) self, gxml_css_selector_properties[GXML_CSS_SELECTOR_COMBINER_PROPERTY]);
	}
}

static void
gxml_css_selector_class_init (GXmlCssSelectorClass * klass,
                              gpointer klass_data)
{
	gxml_css_selector_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GXmlCssSelector_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_css_selector_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_css_selector_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_css_selector_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_SELECTOR_SELECTOR_TYPE_PROPERTY, gxml_css_selector_properties[GXML_CSS_SELECTOR_SELECTOR_TYPE_PROPERTY] = g_param_spec_enum ("selector-type", "selector-type", "selector-type", GXML_TYPE_CSS_SELECTOR_TYPE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_SELECTOR_NAME_PROPERTY, gxml_css_selector_properties[GXML_CSS_SELECTOR_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_SELECTOR_VALUE_PROPERTY, gxml_css_selector_properties[GXML_CSS_SELECTOR_VALUE_PROPERTY] = g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_SELECTOR_COMBINER_PROPERTY, gxml_css_selector_properties[GXML_CSS_SELECTOR_COMBINER_PROPERTY] = g_param_spec_enum ("combiner", "combiner", "combiner", GXML_TYPE_CSS_COMBINER, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
gxml_css_selector_instance_init (GXmlCssSelector * self,
                                 gpointer klass)
{
	self->priv = gxml_css_selector_get_instance_private (self);
}

static void
gxml_css_selector_finalize (GObject * obj)
{
	GXmlCssSelector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_CSS_SELECTOR, GXmlCssSelector);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_value);
	G_OBJECT_CLASS (gxml_css_selector_parent_class)->finalize (obj);
}

GType
gxml_css_selector_get_type (void)
{
	static volatile gsize gxml_css_selector_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_css_selector_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlCssSelectorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_css_selector_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlCssSelector), 0, (GInstanceInitFunc) gxml_css_selector_instance_init, NULL };
		GType gxml_css_selector_type_id;
		gxml_css_selector_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlCssSelector", &g_define_type_info, 0);
		GXmlCssSelector_private_offset = g_type_add_instance_private (gxml_css_selector_type_id, sizeof (GXmlCssSelectorPrivate));
		g_once_init_leave (&gxml_css_selector_type_id__volatile, gxml_css_selector_type_id);
	}
	return gxml_css_selector_type_id__volatile;
}

static void
_vala_gxml_css_selector_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	GXmlCssSelector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_SELECTOR, GXmlCssSelector);
	switch (property_id) {
		case GXML_CSS_SELECTOR_SELECTOR_TYPE_PROPERTY:
		g_value_set_enum (value, gxml_css_selector_get_selector_type (self));
		break;
		case GXML_CSS_SELECTOR_NAME_PROPERTY:
		g_value_set_string (value, gxml_css_selector_get_name (self));
		break;
		case GXML_CSS_SELECTOR_VALUE_PROPERTY:
		g_value_set_string (value, gxml_css_selector_get_value (self));
		break;
		case GXML_CSS_SELECTOR_COMBINER_PROPERTY:
		g_value_set_enum (value, gxml_css_selector_get_combiner (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gxml_css_selector_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	GXmlCssSelector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_SELECTOR, GXmlCssSelector);
	switch (property_id) {
		case GXML_CSS_SELECTOR_SELECTOR_TYPE_PROPERTY:
		gxml_css_selector_set_selector_type (self, g_value_get_enum (value));
		break;
		case GXML_CSS_SELECTOR_NAME_PROPERTY:
		gxml_css_selector_set_name (self, g_value_get_string (value));
		break;
		case GXML_CSS_SELECTOR_VALUE_PROPERTY:
		gxml_css_selector_set_value (self, g_value_get_string (value));
		break;
		case GXML_CSS_SELECTOR_COMBINER_PROPERTY:
		gxml_css_selector_set_combiner (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

GXmlCssElementSelector*
gxml_css_element_selector_construct (GType object_type,
                                     const gchar* prefix,
                                     const gchar* local_name)
{
	GXmlCssElementSelector * self = NULL;
	g_return_val_if_fail (local_name != NULL, NULL);
	self = (GXmlCssElementSelector*) gxml_css_selector_construct (object_type, GXML_CSS_SELECTOR_TYPE_ELEMENT, "");
	gxml_css_selector_set_name ((GXmlCssSelector*) self, prefix);
	gxml_css_selector_set_value ((GXmlCssSelector*) self, local_name);
	return self;
}

GXmlCssElementSelector*
gxml_css_element_selector_new (const gchar* prefix,
                               const gchar* local_name)
{
	return gxml_css_element_selector_construct (GXML_TYPE_CSS_ELEMENT_SELECTOR, prefix, local_name);
}

gboolean
gxml_css_element_selector_get_prefixed (GXmlCssElementSelector* self)
{
	gboolean result;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = gxml_css_element_selector_get_prefix (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_ != NULL;
	_g_free0 (_tmp2_);
	result = _tmp3_;
	return result;
}

gchar*
gxml_css_element_selector_get_prefix (GXmlCssElementSelector* self)
{
	gchar* result;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gxml_css_selector_get_name ((GXmlCssSelector*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}

void
gxml_css_element_selector_set_prefix (GXmlCssElementSelector* self,
                                      const gchar* value)
{
	g_return_if_fail (self != NULL);
	gxml_css_selector_set_name ((GXmlCssSelector*) self, value);
	g_object_notify_by_pspec ((GObject *) self, gxml_css_element_selector_properties[GXML_CSS_ELEMENT_SELECTOR_PREFIX_PROPERTY]);
}

gchar*
gxml_css_element_selector_get_local_name (GXmlCssElementSelector* self)
{
	gchar* result;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gxml_css_selector_get_value ((GXmlCssSelector*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}

void
gxml_css_element_selector_set_local_name (GXmlCssElementSelector* self,
                                          const gchar* value)
{
	g_return_if_fail (self != NULL);
	gxml_css_selector_set_value ((GXmlCssSelector*) self, value);
	g_object_notify_by_pspec ((GObject *) self, gxml_css_element_selector_properties[GXML_CSS_ELEMENT_SELECTOR_LOCAL_NAME_PROPERTY]);
}

static void
gxml_css_element_selector_class_init (GXmlCssElementSelectorClass * klass,
                                      gpointer klass_data)
{
	gxml_css_element_selector_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_css_element_selector_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_css_element_selector_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_ELEMENT_SELECTOR_PREFIXED_PROPERTY, gxml_css_element_selector_properties[GXML_CSS_ELEMENT_SELECTOR_PREFIXED_PROPERTY] = g_param_spec_boolean ("prefixed", "prefixed", "prefixed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_ELEMENT_SELECTOR_PREFIX_PROPERTY, gxml_css_element_selector_properties[GXML_CSS_ELEMENT_SELECTOR_PREFIX_PROPERTY] = g_param_spec_string ("prefix", "prefix", "prefix", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_ELEMENT_SELECTOR_LOCAL_NAME_PROPERTY, gxml_css_element_selector_properties[GXML_CSS_ELEMENT_SELECTOR_LOCAL_NAME_PROPERTY] = g_param_spec_string ("local-name", "local-name", "local-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
gxml_css_element_selector_instance_init (GXmlCssElementSelector * self,
                                         gpointer klass)
{
}

GType
gxml_css_element_selector_get_type (void)
{
	static volatile gsize gxml_css_element_selector_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_css_element_selector_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlCssElementSelectorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_css_element_selector_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlCssElementSelector), 0, (GInstanceInitFunc) gxml_css_element_selector_instance_init, NULL };
		GType gxml_css_element_selector_type_id;
		gxml_css_element_selector_type_id = g_type_register_static (GXML_TYPE_CSS_SELECTOR, "GXmlCssElementSelector", &g_define_type_info, 0);
		g_once_init_leave (&gxml_css_element_selector_type_id__volatile, gxml_css_element_selector_type_id);
	}
	return gxml_css_element_selector_type_id__volatile;
}

static void
_vala_gxml_css_element_selector_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	GXmlCssElementSelector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_ELEMENT_SELECTOR, GXmlCssElementSelector);
	switch (property_id) {
		case GXML_CSS_ELEMENT_SELECTOR_PREFIXED_PROPERTY:
		g_value_set_boolean (value, gxml_css_element_selector_get_prefixed (self));
		break;
		case GXML_CSS_ELEMENT_SELECTOR_PREFIX_PROPERTY:
		g_value_take_string (value, gxml_css_element_selector_get_prefix (self));
		break;
		case GXML_CSS_ELEMENT_SELECTOR_LOCAL_NAME_PROPERTY:
		g_value_take_string (value, gxml_css_element_selector_get_local_name (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gxml_css_element_selector_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	GXmlCssElementSelector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_ELEMENT_SELECTOR, GXmlCssElementSelector);
	switch (property_id) {
		case GXML_CSS_ELEMENT_SELECTOR_PREFIX_PROPERTY:
		gxml_css_element_selector_set_prefix (self, g_value_get_string (value));
		break;
		case GXML_CSS_ELEMENT_SELECTOR_LOCAL_NAME_PROPERTY:
		gxml_css_element_selector_set_local_name (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gxml_css_attribute_selector_get_instance_private (GXmlCssAttributeSelector* self)
{
	return G_STRUCT_MEMBER_P (self, GXmlCssAttributeSelector_private_offset);
}

GXmlCssAttributeSelector*
gxml_css_attribute_selector_construct (GType object_type,
                                       const gchar* prefix,
                                       const gchar* local_name)
{
	GXmlCssAttributeSelector * self = NULL;
	gchar* _tmp0_ = NULL;
	g_return_val_if_fail (local_name != NULL, NULL);
	self = (GXmlCssAttributeSelector*) gxml_css_selector_construct (object_type, GXML_CSS_SELECTOR_TYPE_ATTRIBUTE, "");
	gxml_css_attribute_selector_set_prefix (self, prefix);
	gxml_css_attribute_selector_set_local_name (self, local_name);
	if (prefix == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup (local_name);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp1_;
	} else {
		gchar* _tmp2_;
		_tmp2_ = g_strdup_printf ("%s|%s", prefix, local_name);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp2_;
	}
	gxml_css_selector_set_name ((GXmlCssSelector*) self, _tmp0_);
	_g_free0 (_tmp0_);
	return self;
}

GXmlCssAttributeSelector*
gxml_css_attribute_selector_new (const gchar* prefix,
                                 const gchar* local_name)
{
	return gxml_css_attribute_selector_construct (GXML_TYPE_CSS_ATTRIBUTE_SELECTOR, prefix, local_name);
}

const gchar*
gxml_css_attribute_selector_get_prefix (GXmlCssAttributeSelector* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_prefix;
	result = _tmp0_;
	return result;
}

void
gxml_css_attribute_selector_set_prefix (GXmlCssAttributeSelector* self,
                                        const gchar* value)
{
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, gxml_css_attribute_selector_get_prefix (self)) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_prefix);
		self->priv->_prefix = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gxml_css_attribute_selector_properties[GXML_CSS_ATTRIBUTE_SELECTOR_PREFIX_PROPERTY]);
	}
}

const gchar*
gxml_css_attribute_selector_get_local_name (GXmlCssAttributeSelector* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_local_name;
	result = _tmp0_;
	return result;
}

void
gxml_css_attribute_selector_set_local_name (GXmlCssAttributeSelector* self,
                                            const gchar* value)
{
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, gxml_css_attribute_selector_get_local_name (self)) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_local_name);
		self->priv->_local_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gxml_css_attribute_selector_properties[GXML_CSS_ATTRIBUTE_SELECTOR_LOCAL_NAME_PROPERTY]);
	}
}

static void
gxml_css_attribute_selector_class_init (GXmlCssAttributeSelectorClass * klass,
                                        gpointer klass_data)
{
	gxml_css_attribute_selector_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GXmlCssAttributeSelector_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_css_attribute_selector_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_css_attribute_selector_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_css_attribute_selector_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_ATTRIBUTE_SELECTOR_PREFIX_PROPERTY, gxml_css_attribute_selector_properties[GXML_CSS_ATTRIBUTE_SELECTOR_PREFIX_PROPERTY] = g_param_spec_string ("prefix", "prefix", "prefix", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_ATTRIBUTE_SELECTOR_LOCAL_NAME_PROPERTY, gxml_css_attribute_selector_properties[GXML_CSS_ATTRIBUTE_SELECTOR_LOCAL_NAME_PROPERTY] = g_param_spec_string ("local-name", "local-name", "local-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
gxml_css_attribute_selector_instance_init (GXmlCssAttributeSelector * self,
                                           gpointer klass)
{
	self->priv = gxml_css_attribute_selector_get_instance_private (self);
}

static void
gxml_css_attribute_selector_finalize (GObject * obj)
{
	GXmlCssAttributeSelector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_CSS_ATTRIBUTE_SELECTOR, GXmlCssAttributeSelector);
	_g_free0 (self->priv->_prefix);
	_g_free0 (self->priv->_local_name);
	G_OBJECT_CLASS (gxml_css_attribute_selector_parent_class)->finalize (obj);
}

GType
gxml_css_attribute_selector_get_type (void)
{
	static volatile gsize gxml_css_attribute_selector_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_css_attribute_selector_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlCssAttributeSelectorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_css_attribute_selector_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlCssAttributeSelector), 0, (GInstanceInitFunc) gxml_css_attribute_selector_instance_init, NULL };
		GType gxml_css_attribute_selector_type_id;
		gxml_css_attribute_selector_type_id = g_type_register_static (GXML_TYPE_CSS_SELECTOR, "GXmlCssAttributeSelector", &g_define_type_info, 0);
		GXmlCssAttributeSelector_private_offset = g_type_add_instance_private (gxml_css_attribute_selector_type_id, sizeof (GXmlCssAttributeSelectorPrivate));
		g_once_init_leave (&gxml_css_attribute_selector_type_id__volatile, gxml_css_attribute_selector_type_id);
	}
	return gxml_css_attribute_selector_type_id__volatile;
}

static void
_vala_gxml_css_attribute_selector_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec)
{
	GXmlCssAttributeSelector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_ATTRIBUTE_SELECTOR, GXmlCssAttributeSelector);
	switch (property_id) {
		case GXML_CSS_ATTRIBUTE_SELECTOR_PREFIX_PROPERTY:
		g_value_set_string (value, gxml_css_attribute_selector_get_prefix (self));
		break;
		case GXML_CSS_ATTRIBUTE_SELECTOR_LOCAL_NAME_PROPERTY:
		g_value_set_string (value, gxml_css_attribute_selector_get_local_name (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gxml_css_attribute_selector_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec)
{
	GXmlCssAttributeSelector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_ATTRIBUTE_SELECTOR, GXmlCssAttributeSelector);
	switch (property_id) {
		case GXML_CSS_ATTRIBUTE_SELECTOR_PREFIX_PROPERTY:
		gxml_css_attribute_selector_set_prefix (self, g_value_get_string (value));
		break;
		case GXML_CSS_ATTRIBUTE_SELECTOR_LOCAL_NAME_PROPERTY:
		gxml_css_attribute_selector_set_local_name (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gxml_css_not_selector_get_instance_private (GXmlCssNotSelector* self)
{
	return G_STRUCT_MEMBER_P (self, GXmlCssNotSelector_private_offset);
}

GXmlCssNotSelector*
gxml_css_not_selector_construct (GType object_type)
{
	GXmlCssNotSelector * self = NULL;
	self = (GXmlCssNotSelector*) g_object_new (object_type, "selector-type", GXML_CSS_SELECTOR_TYPE_PSEUDO_CLASS, "name", "not", NULL);
	return self;
}

GXmlCssNotSelector*
gxml_css_not_selector_new (void)
{
	return gxml_css_not_selector_construct (GXML_TYPE_CSS_NOT_SELECTOR);
}

GeeList*
gxml_css_not_selector_get_selectors (GXmlCssNotSelector* self)
{
	GeeList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->list;
	result = (GeeList*) _tmp0_;
	return result;
}

static GObject *
gxml_css_not_selector_constructor (GType type,
                                   guint n_construct_properties,
                                   GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GXmlCssNotSelector * self;
	GeeArrayList* _tmp0_;
	parent_class = G_OBJECT_CLASS (gxml_css_not_selector_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_CSS_NOT_SELECTOR, GXmlCssNotSelector);
	_tmp0_ = gee_array_list_new (GXML_TYPE_CSS_SELECTOR, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->list);
	self->priv->list = _tmp0_;
	return obj;
}

static void
gxml_css_not_selector_class_init (GXmlCssNotSelectorClass * klass,
                                  gpointer klass_data)
{
	gxml_css_not_selector_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GXmlCssNotSelector_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_css_not_selector_get_property;
	G_OBJECT_CLASS (klass)->constructor = gxml_css_not_selector_constructor;
	G_OBJECT_CLASS (klass)->finalize = gxml_css_not_selector_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_NOT_SELECTOR_SELECTORS_PROPERTY, gxml_css_not_selector_properties[GXML_CSS_NOT_SELECTOR_SELECTORS_PROPERTY] = g_param_spec_object ("selectors", "selectors", "selectors", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gxml_css_not_selector_instance_init (GXmlCssNotSelector * self,
                                     gpointer klass)
{
	self->priv = gxml_css_not_selector_get_instance_private (self);
}

static void
gxml_css_not_selector_finalize (GObject * obj)
{
	GXmlCssNotSelector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_CSS_NOT_SELECTOR, GXmlCssNotSelector);
	_g_object_unref0 (self->priv->list);
	G_OBJECT_CLASS (gxml_css_not_selector_parent_class)->finalize (obj);
}

GType
gxml_css_not_selector_get_type (void)
{
	static volatile gsize gxml_css_not_selector_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_css_not_selector_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlCssNotSelectorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_css_not_selector_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlCssNotSelector), 0, (GInstanceInitFunc) gxml_css_not_selector_instance_init, NULL };
		GType gxml_css_not_selector_type_id;
		gxml_css_not_selector_type_id = g_type_register_static (GXML_TYPE_CSS_SELECTOR, "GXmlCssNotSelector", &g_define_type_info, 0);
		GXmlCssNotSelector_private_offset = g_type_add_instance_private (gxml_css_not_selector_type_id, sizeof (GXmlCssNotSelectorPrivate));
		g_once_init_leave (&gxml_css_not_selector_type_id__volatile, gxml_css_not_selector_type_id);
	}
	return gxml_css_not_selector_type_id__volatile;
}

static void
_vala_gxml_css_not_selector_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	GXmlCssNotSelector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_NOT_SELECTOR, GXmlCssNotSelector);
	switch (property_id) {
		case GXML_CSS_NOT_SELECTOR_SELECTORS_PROPERTY:
		g_value_set_object (value, gxml_css_not_selector_get_selectors (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gxml_css_selector_parser_get_instance_private (GXmlCssSelectorParser* self)
{
	return G_STRUCT_MEMBER_P (self, GXmlCssSelectorParser_private_offset);
}

static gboolean
_vala_unichar_array_contains (gunichar * stack,
                              int stack_length,
                              const gunichar needle)
{
	int i;
	for (i = 0; i < stack_length; i++) {
		if (needle == stack[i]) {
			return TRUE;
		}
	}
	return FALSE;
}

static gboolean
gxml_css_selector_parser_is_valid_char (gunichar u)
{
	gboolean result = FALSE;
	gunichar* array = NULL;
	gunichar* _tmp0_;
	gint array_length1;
	gint _array_size_;
	_tmp0_ = g_new0 (gunichar, 25);
	_tmp0_[0] = (gunichar) '=';
	_tmp0_[1] = (gunichar) '[';
	_tmp0_[2] = (gunichar) ']';
	_tmp0_[3] = (gunichar) '{';
	_tmp0_[4] = (gunichar) '}';
	_tmp0_[5] = (gunichar) '$';
	_tmp0_[6] = (gunichar) '&';
	_tmp0_[7] = (gunichar) '#';
	_tmp0_[8] = (gunichar) '|';
	_tmp0_[9] = (gunichar) '`';
	_tmp0_[10] = (gunichar) '^';
	_tmp0_[11] = (gunichar) '@';
	_tmp0_[12] = (gunichar) '+';
	_tmp0_[13] = (gunichar) '~';
	_tmp0_[14] = (gunichar) '*';
	_tmp0_[15] = (gunichar) '%';
	_tmp0_[16] = (gunichar) '!';
	_tmp0_[17] = (gunichar) '?';
	_tmp0_[18] = (gunichar) '<';
	_tmp0_[19] = (gunichar) '>';
	_tmp0_[20] = (gunichar) ':';
	_tmp0_[21] = (gunichar) '.';
	_tmp0_[22] = (gunichar) '"';
	_tmp0_[23] = (gunichar) '\'';
	_tmp0_[24] = (gunichar) ',';
	array = _tmp0_;
	array_length1 = 25;
	_array_size_ = array_length1;
	result = !_vala_unichar_array_contains (array, array_length1, u);
	array = (g_free (array), NULL);
	return result;
}

static gchar*
gxml_css_selector_parser_parse_identifier (GXmlCssString* str,
                                           GXmlCssStringFunc func,
                                           gpointer func_target)
{
	gchar* result = NULL;
	GString* builder = NULL;
	GString* _tmp0_;
	GString* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = g_string_new ("");
	builder = _tmp0_;
	while (TRUE) {
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_;
		gboolean _tmp3_;
		GString* _tmp4_;
		_tmp2_ = gxml_css_string_get_eof (str);
		_tmp3_ = _tmp2_;
		if (!_tmp3_) {
			_tmp1_ = func (str, func_target);
		} else {
			_tmp1_ = FALSE;
		}
		if (!_tmp1_) {
			break;
		}
		_tmp4_ = builder;
		g_string_append_unichar (_tmp4_, gxml_css_string_read (str));
	}
	_tmp5_ = builder;
	_tmp6_ = _tmp5_->str;
	_tmp7_ = g_strdup (_tmp6_);
	result = _tmp7_;
	_g_string_free0 (builder);
	return result;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gboolean result = FALSE;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static GXmlCssSelector*
gxml_css_selector_parser_parse_element (GXmlCssString* str,
                                        GError** error)
{
	GXmlCssSelector* result = NULL;
	GString* builder = NULL;
	GString* _tmp0_;
	GString* extra_builder = NULL;
	GString* _tmp1_;
	gboolean _tmp8_ = FALSE;
	GString* _tmp9_;
	const gchar* _tmp10_;
	GString* _tmp31_;
	GString* _tmp33_;
	const gchar* _tmp34_;
	GXmlCssElementSelector* _tmp35_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = g_string_new ("");
	builder = _tmp0_;
	_tmp1_ = g_string_new ("");
	extra_builder = _tmp1_;
	while (TRUE) {
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_;
		gboolean _tmp5_;
		GString* _tmp7_;
		_tmp4_ = gxml_css_string_get_eof (str);
		_tmp5_ = _tmp4_;
		if (!_tmp5_) {
			gboolean _tmp6_ = FALSE;
			if (gxml_css_string_peek (str) == ((gunichar) '*')) {
				_tmp6_ = TRUE;
			} else {
				_tmp6_ = gxml_css_selector_parser_is_valid_char (gxml_css_string_peek (str));
			}
			_tmp3_ = _tmp6_;
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			_tmp2_ = !g_unichar_isspace (gxml_css_string_peek (str));
		} else {
			_tmp2_ = FALSE;
		}
		if (!_tmp2_) {
			break;
		}
		_tmp7_ = builder;
		g_string_append_unichar (_tmp7_, gxml_css_string_read (str));
	}
	_tmp9_ = builder;
	_tmp10_ = _tmp9_->str;
	if (string_contains (_tmp10_, "*")) {
		GString* _tmp11_;
		_tmp11_ = builder;
		_tmp8_ = _tmp11_->len > ((gssize) 1);
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		GError* _tmp12_;
		_tmp12_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_IDENTIFIER, _ ("Invalid identifier"));
		_inner_error0_ = _tmp12_;
		g_propagate_error (error, _inner_error0_);
		_g_string_free0 (extra_builder);
		_g_string_free0 (builder);
		return NULL;
	}
	if (gxml_css_string_peek (str) == ((gunichar) '|')) {
		GString* _tmp19_;
		gboolean _tmp21_ = FALSE;
		GString* _tmp22_;
		const gchar* _tmp23_;
		GString* _tmp26_;
		const gchar* _tmp27_;
		GString* _tmp28_;
		const gchar* _tmp29_;
		GXmlCssElementSelector* _tmp30_;
		gxml_css_string_read (str);
		while (TRUE) {
			gboolean _tmp13_ = FALSE;
			gboolean _tmp14_ = FALSE;
			gboolean _tmp15_;
			gboolean _tmp16_;
			GString* _tmp18_;
			_tmp15_ = gxml_css_string_get_eof (str);
			_tmp16_ = _tmp15_;
			if (!_tmp16_) {
				gboolean _tmp17_ = FALSE;
				if (gxml_css_string_peek (str) == ((gunichar) '*')) {
					_tmp17_ = TRUE;
				} else {
					_tmp17_ = gxml_css_selector_parser_is_valid_char (gxml_css_string_peek (str));
				}
				_tmp14_ = _tmp17_;
			} else {
				_tmp14_ = FALSE;
			}
			if (_tmp14_) {
				_tmp13_ = !g_unichar_isspace (gxml_css_string_peek (str));
			} else {
				_tmp13_ = FALSE;
			}
			if (!_tmp13_) {
				break;
			}
			_tmp18_ = extra_builder;
			g_string_append_unichar (_tmp18_, gxml_css_string_read (str));
		}
		_tmp19_ = extra_builder;
		if (_tmp19_->len == ((gssize) 0)) {
			GError* _tmp20_;
			_tmp20_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_IDENTIFIER, _ ("string value is empty"));
			_inner_error0_ = _tmp20_;
			g_propagate_error (error, _inner_error0_);
			_g_string_free0 (extra_builder);
			_g_string_free0 (builder);
			return NULL;
		}
		_tmp22_ = extra_builder;
		_tmp23_ = _tmp22_->str;
		if (string_contains (_tmp23_, "*")) {
			GString* _tmp24_;
			_tmp24_ = extra_builder;
			_tmp21_ = _tmp24_->len > ((gssize) 1);
		} else {
			_tmp21_ = FALSE;
		}
		if (_tmp21_) {
			GError* _tmp25_;
			_tmp25_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_IDENTIFIER, _ ("Invalid identifier"));
			_inner_error0_ = _tmp25_;
			g_propagate_error (error, _inner_error0_);
			_g_string_free0 (extra_builder);
			_g_string_free0 (builder);
			return NULL;
		}
		_tmp26_ = builder;
		_tmp27_ = _tmp26_->str;
		_tmp28_ = extra_builder;
		_tmp29_ = _tmp28_->str;
		_tmp30_ = gxml_css_element_selector_new (_tmp27_, _tmp29_);
		result = (GXmlCssSelector*) _tmp30_;
		_g_string_free0 (extra_builder);
		_g_string_free0 (builder);
		return result;
	}
	_tmp31_ = builder;
	if (_tmp31_->len == ((gssize) 0)) {
		GError* _tmp32_;
		_tmp32_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_IDENTIFIER, _ ("string value is empty"));
		_inner_error0_ = _tmp32_;
		g_propagate_error (error, _inner_error0_);
		_g_string_free0 (extra_builder);
		_g_string_free0 (builder);
		return NULL;
	}
	_tmp33_ = builder;
	_tmp34_ = _tmp33_->str;
	_tmp35_ = gxml_css_element_selector_new (NULL, _tmp34_);
	result = (GXmlCssSelector*) _tmp35_;
	_g_string_free0 (extra_builder);
	_g_string_free0 (builder);
	return result;
}

static GXmlCssNotSelector*
gxml_css_selector_parser_parse_not_selector (GXmlCssString* str,
                                             GError** error)
{
	GXmlCssNotSelector* result = NULL;
	GXmlCssNotSelector* selector = NULL;
	GXmlCssNotSelector* _tmp1_;
	GXmlCssNotSelector* _tmp2_;
	GeeList* _tmp3_;
	GeeList* _tmp4_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (str != NULL, NULL);
	if (gxml_css_string_read (str) != ((gunichar) '(')) {
		GError* _tmp0_;
		_tmp0_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_NOT, _ ("Cannot find start of 'not selector' value"));
		_inner_error0_ = _tmp0_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp1_ = gxml_css_not_selector_new ();
	selector = _tmp1_;
	while (TRUE) {
		if (!g_unichar_isspace (gxml_css_string_peek (str))) {
			break;
		}
		gxml_css_string_read (str);
	}
	_tmp2_ = selector;
	_tmp3_ = gxml_css_not_selector_get_selectors (_tmp2_);
	_tmp4_ = _tmp3_;
	gxml_css_selector_parser_parse_selectors (str, _tmp4_, (gunichar) ')', &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (selector);
		return NULL;
	}
	if (gxml_css_string_read (str) != ((gunichar) ')')) {
		GError* _tmp5_;
		_tmp5_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_NOT, _ ("Cannot find end of 'not selector' value"));
		_inner_error0_ = _tmp5_;
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (selector);
		return NULL;
	}
	result = selector;
	return result;
}

static gboolean
_vala_string_array_contains (gchar* * stack,
                             int stack_length,
                             const gchar* needle)
{
	int i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}

static gboolean
uint64_try_parse (const gchar* str,
                  guint64* _result_,
                  const gchar* * unparsed)
{
	guint64 _vala__result_ = 0ULL;
	const gchar* _vala_unparsed = NULL;
	gboolean result = FALSE;
	gchar* endptr = NULL;
	gchar* _tmp0_ = NULL;
	guint64 _tmp1_;
	gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_val_if_fail (str != NULL, FALSE);
	_tmp1_ = g_ascii_strtoull (str, &_tmp0_, (guint) 0);
	endptr = _tmp0_;
	_vala__result_ = _tmp1_;
	_tmp2_ = endptr;
	_tmp3_ = strlen (str);
	_tmp4_ = _tmp3_;
	if (_tmp2_ == (((gchar*) str) + _tmp4_)) {
		_vala_unparsed = "";
		result = TRUE;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	} else {
		gchar* _tmp5_;
		_tmp5_ = endptr;
		_vala_unparsed = (const gchar*) _tmp5_;
		result = FALSE;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	}
	if (_result_) {
		*_result_ = _vala__result_;
	}
	if (unparsed) {
		*unparsed = _vala_unparsed;
	}
}

static GXmlCssSelector*
gxml_css_selector_parser_parse_pseudo (GXmlCssString* str,
                                       GError** error)
{
	GXmlCssSelector* result = NULL;
	gchar** pseudo_strv = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar** _tmp11_;
	gint pseudo_strv_length1;
	gint _pseudo_strv_size_;
	gchar** pseudo_value_strv = NULL;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar** _tmp16_;
	gint pseudo_value_strv_length1;
	gint _pseudo_value_strv_size_;
	GString* builder = NULL;
	GString* _tmp17_;
	GString* _tmp20_;
	const gchar* _tmp21_;
	gboolean _tmp25_ = FALSE;
	GString* _tmp26_;
	const gchar* _tmp27_;
	gchar** _tmp28_;
	gint _tmp28__length1;
	GString* _tmp38_;
	const gchar* _tmp39_;
	gchar** _tmp40_;
	gint _tmp40__length1;
	gboolean _tmp44_ = FALSE;
	GString* _tmp45_;
	const gchar* _tmp46_;
	gchar** _tmp47_;
	gint _tmp47__length1;
	GString* vbuilder = NULL;
	GString* _tmp54_;
	GString* _tmp58_;
	const gchar* _tmp59_;
	guint64 val = 0ULL;
	gboolean _tmp63_ = FALSE;
	gboolean _tmp64_ = FALSE;
	GString* _tmp65_;
	const gchar* _tmp66_;
	GString* _tmp75_;
	const gchar* _tmp76_;
	GString* _tmp77_;
	const gchar* _tmp78_;
	GXmlCssSelector* _tmp79_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = g_strdup ("checked");
	_tmp1_ = g_strdup ("enabled");
	_tmp2_ = g_strdup ("disabled");
	_tmp3_ = g_strdup ("root");
	_tmp4_ = g_strdup ("empty");
	_tmp5_ = g_strdup ("first-child");
	_tmp6_ = g_strdup ("last-child");
	_tmp7_ = g_strdup ("only-child");
	_tmp8_ = g_strdup ("first-of-type");
	_tmp9_ = g_strdup ("last-of-type");
	_tmp10_ = g_strdup ("only-of-type");
	_tmp11_ = g_new0 (gchar*, 11 + 1);
	_tmp11_[0] = _tmp0_;
	_tmp11_[1] = _tmp1_;
	_tmp11_[2] = _tmp2_;
	_tmp11_[3] = _tmp3_;
	_tmp11_[4] = _tmp4_;
	_tmp11_[5] = _tmp5_;
	_tmp11_[6] = _tmp6_;
	_tmp11_[7] = _tmp7_;
	_tmp11_[8] = _tmp8_;
	_tmp11_[9] = _tmp9_;
	_tmp11_[10] = _tmp10_;
	pseudo_strv = _tmp11_;
	pseudo_strv_length1 = 11;
	_pseudo_strv_size_ = pseudo_strv_length1;
	_tmp12_ = g_strdup ("nth-child");
	_tmp13_ = g_strdup ("nth-last-child");
	_tmp14_ = g_strdup ("nth-of-type");
	_tmp15_ = g_strdup ("nth-last-of-type");
	_tmp16_ = g_new0 (gchar*, 4 + 1);
	_tmp16_[0] = _tmp12_;
	_tmp16_[1] = _tmp13_;
	_tmp16_[2] = _tmp14_;
	_tmp16_[3] = _tmp15_;
	pseudo_value_strv = _tmp16_;
	pseudo_value_strv_length1 = 4;
	_pseudo_value_strv_size_ = pseudo_value_strv_length1;
	gxml_css_string_read (str);
	_tmp17_ = g_string_new ("");
	builder = _tmp17_;
	while (TRUE) {
		gboolean _tmp18_ = FALSE;
		GString* _tmp19_;
		if (g_unichar_isalpha (gxml_css_string_peek (str))) {
			_tmp18_ = TRUE;
		} else {
			_tmp18_ = gxml_css_string_peek (str) == ((gunichar) '-');
		}
		if (!_tmp18_) {
			break;
		}
		_tmp19_ = builder;
		g_string_append_unichar (_tmp19_, gxml_css_string_read (str));
	}
	_tmp20_ = builder;
	_tmp21_ = _tmp20_->str;
	if (g_strcmp0 (_tmp21_, "not") == 0) {
		GXmlCssNotSelector* _tmp22_ = NULL;
		GXmlCssNotSelector* _tmp23_;
		GXmlCssNotSelector* _tmp24_;
		_tmp23_ = gxml_css_selector_parser_parse_not_selector (str, &_inner_error0_);
		_tmp22_ = _tmp23_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_propagate_error (error, _inner_error0_);
			_g_string_free0 (builder);
			pseudo_value_strv = (_vala_array_free (pseudo_value_strv, pseudo_value_strv_length1, (GDestroyNotify) g_free), NULL);
			pseudo_strv = (_vala_array_free (pseudo_strv, pseudo_strv_length1, (GDestroyNotify) g_free), NULL);
			return NULL;
		}
		_tmp24_ = _tmp22_;
		_tmp22_ = NULL;
		result = (GXmlCssSelector*) _tmp24_;
		_g_object_unref0 (_tmp22_);
		_g_string_free0 (builder);
		pseudo_value_strv = (_vala_array_free (pseudo_value_strv, pseudo_value_strv_length1, (GDestroyNotify) g_free), NULL);
		pseudo_strv = (_vala_array_free (pseudo_strv, pseudo_strv_length1, (GDestroyNotify) g_free), NULL);
		return result;
	}
	_tmp26_ = builder;
	_tmp27_ = _tmp26_->str;
	_tmp28_ = pseudo_strv;
	_tmp28__length1 = pseudo_strv_length1;
	if (!_vala_string_array_contains (_tmp28_, _tmp28__length1, _tmp27_)) {
		GString* _tmp29_;
		const gchar* _tmp30_;
		gchar** _tmp31_;
		gint _tmp31__length1;
		_tmp29_ = builder;
		_tmp30_ = _tmp29_->str;
		_tmp31_ = pseudo_value_strv;
		_tmp31__length1 = pseudo_value_strv_length1;
		_tmp25_ = !_vala_string_array_contains (_tmp31_, _tmp31__length1, _tmp30_);
	} else {
		_tmp25_ = FALSE;
	}
	if (_tmp25_) {
		GString* _tmp32_;
		const gchar* _tmp33_;
		gchar* _tmp34_;
		gchar* _tmp35_;
		GError* _tmp36_;
		GError* _tmp37_;
		_tmp32_ = builder;
		_tmp33_ = _tmp32_->str;
		_tmp34_ = g_strdup_printf (_ ("Invalid '%s' pseudo class"), _tmp33_);
		_tmp35_ = _tmp34_;
		_tmp36_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_PSEUDO, _tmp35_);
		_tmp37_ = _tmp36_;
		_g_free0 (_tmp35_);
		_inner_error0_ = _tmp37_;
		g_propagate_error (error, _inner_error0_);
		_g_string_free0 (builder);
		pseudo_value_strv = (_vala_array_free (pseudo_value_strv, pseudo_value_strv_length1, (GDestroyNotify) g_free), NULL);
		pseudo_strv = (_vala_array_free (pseudo_strv, pseudo_strv_length1, (GDestroyNotify) g_free), NULL);
		return NULL;
	}
	_tmp38_ = builder;
	_tmp39_ = _tmp38_->str;
	_tmp40_ = pseudo_strv;
	_tmp40__length1 = pseudo_strv_length1;
	if (_vala_string_array_contains (_tmp40_, _tmp40__length1, _tmp39_)) {
		GString* _tmp41_;
		const gchar* _tmp42_;
		GXmlCssSelector* _tmp43_;
		_tmp41_ = builder;
		_tmp42_ = _tmp41_->str;
		_tmp43_ = gxml_css_selector_new (GXML_CSS_SELECTOR_TYPE_PSEUDO_CLASS, _tmp42_);
		result = _tmp43_;
		_g_string_free0 (builder);
		pseudo_value_strv = (_vala_array_free (pseudo_value_strv, pseudo_value_strv_length1, (GDestroyNotify) g_free), NULL);
		pseudo_strv = (_vala_array_free (pseudo_strv, pseudo_strv_length1, (GDestroyNotify) g_free), NULL);
		return result;
	}
	_tmp45_ = builder;
	_tmp46_ = _tmp45_->str;
	_tmp47_ = pseudo_value_strv;
	_tmp47__length1 = pseudo_value_strv_length1;
	if (_vala_string_array_contains (_tmp47_, _tmp47__length1, _tmp46_)) {
		_tmp44_ = gxml_css_string_read (str) != ((gunichar) '(');
	} else {
		_tmp44_ = FALSE;
	}
	if (_tmp44_) {
		GString* _tmp48_;
		const gchar* _tmp49_;
		gchar* _tmp50_;
		gchar* _tmp51_;
		GError* _tmp52_;
		GError* _tmp53_;
		_tmp48_ = builder;
		_tmp49_ = _tmp48_->str;
		_tmp50_ = g_strdup_printf (_ ("Invalid '%s' pseudo class : cannot find value"), _tmp49_);
		_tmp51_ = _tmp50_;
		_tmp52_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_PSEUDO, _tmp51_);
		_tmp53_ = _tmp52_;
		_g_free0 (_tmp51_);
		_inner_error0_ = _tmp53_;
		g_propagate_error (error, _inner_error0_);
		_g_string_free0 (builder);
		pseudo_value_strv = (_vala_array_free (pseudo_value_strv, pseudo_value_strv_length1, (GDestroyNotify) g_free), NULL);
		pseudo_strv = (_vala_array_free (pseudo_strv, pseudo_strv_length1, (GDestroyNotify) g_free), NULL);
		return NULL;
	}
	_tmp54_ = g_string_new ("");
	vbuilder = _tmp54_;
	while (TRUE) {
		gboolean _tmp55_ = FALSE;
		GString* _tmp56_;
		if (g_unichar_isalnum (gxml_css_string_peek (str))) {
			_tmp55_ = TRUE;
		} else {
			_tmp55_ = gxml_css_string_peek (str) == ((gunichar) '-');
		}
		if (!_tmp55_) {
			break;
		}
		_tmp56_ = vbuilder;
		g_string_append_unichar (_tmp56_, gxml_css_string_read (str));
	}
	if (gxml_css_string_read (str) != ((gunichar) ')')) {
		GError* _tmp57_;
		_tmp57_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_PSEUDO, _ ("Cannot find end of pseudo class value"));
		_inner_error0_ = _tmp57_;
		g_propagate_error (error, _inner_error0_);
		_g_string_free0 (vbuilder);
		_g_string_free0 (builder);
		pseudo_value_strv = (_vala_array_free (pseudo_value_strv, pseudo_value_strv_length1, (GDestroyNotify) g_free), NULL);
		pseudo_strv = (_vala_array_free (pseudo_strv, pseudo_strv_length1, (GDestroyNotify) g_free), NULL);
		return NULL;
	}
	_tmp58_ = builder;
	_tmp59_ = _tmp58_->str;
	if (g_strcmp0 (_tmp59_, "lang") == 0) {
		GString* _tmp60_;
		const gchar* _tmp61_;
		GXmlCssSelector* _tmp62_;
		_tmp60_ = vbuilder;
		_tmp61_ = _tmp60_->str;
		_tmp62_ = gxml_css_selector_new_with_value (GXML_CSS_SELECTOR_TYPE_PSEUDO_CLASS, "lang", _tmp61_);
		result = _tmp62_;
		_g_string_free0 (vbuilder);
		_g_string_free0 (builder);
		pseudo_value_strv = (_vala_array_free (pseudo_value_strv, pseudo_value_strv_length1, (GDestroyNotify) g_free), NULL);
		pseudo_strv = (_vala_array_free (pseudo_strv, pseudo_strv_length1, (GDestroyNotify) g_free), NULL);
		return result;
	}
	val = (guint64) 0;
	_tmp65_ = vbuilder;
	_tmp66_ = _tmp65_->str;
	if (g_strcmp0 (_tmp66_, "odd") != 0) {
		GString* _tmp67_;
		const gchar* _tmp68_;
		_tmp67_ = vbuilder;
		_tmp68_ = _tmp67_->str;
		_tmp64_ = g_strcmp0 (_tmp68_, "even") != 0;
	} else {
		_tmp64_ = FALSE;
	}
	if (_tmp64_) {
		gboolean _tmp69_ = FALSE;
		GString* _tmp70_;
		const gchar* _tmp71_;
		guint64 _tmp72_ = 0ULL;
		gboolean _tmp73_;
		_tmp70_ = vbuilder;
		_tmp71_ = _tmp70_->str;
		_tmp73_ = uint64_try_parse (_tmp71_, &_tmp72_, NULL);
		val = _tmp72_;
		if (!_tmp73_) {
			_tmp69_ = TRUE;
		} else {
			_tmp69_ = val == ((guint64) 0);
		}
		_tmp63_ = _tmp69_;
	} else {
		_tmp63_ = FALSE;
	}
	if (_tmp63_) {
		GError* _tmp74_;
		_tmp74_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_PSEUDO, _ ("Pseudo class value isn't a valid number"));
		_inner_error0_ = _tmp74_;
		g_propagate_error (error, _inner_error0_);
		_g_string_free0 (vbuilder);
		_g_string_free0 (builder);
		pseudo_value_strv = (_vala_array_free (pseudo_value_strv, pseudo_value_strv_length1, (GDestroyNotify) g_free), NULL);
		pseudo_strv = (_vala_array_free (pseudo_strv, pseudo_strv_length1, (GDestroyNotify) g_free), NULL);
		return NULL;
	}
	_tmp75_ = builder;
	_tmp76_ = _tmp75_->str;
	_tmp77_ = vbuilder;
	_tmp78_ = _tmp77_->str;
	_tmp79_ = gxml_css_selector_new_with_value (GXML_CSS_SELECTOR_TYPE_PSEUDO_CLASS, _tmp76_, _tmp78_);
	result = _tmp79_;
	_g_string_free0 (vbuilder);
	_g_string_free0 (builder);
	pseudo_value_strv = (_vala_array_free (pseudo_value_strv, pseudo_value_strv_length1, (GDestroyNotify) g_free), NULL);
	pseudo_strv = (_vala_array_free (pseudo_strv, pseudo_strv_length1, (GDestroyNotify) g_free), NULL);
	return result;
}

static GXmlCssSelector*
gxml_css_selector_parser_parse_class (GXmlCssString* str,
                                      GError** error)
{
	GXmlCssSelector* result = NULL;
	GString* builder = NULL;
	GString* _tmp0_;
	GString* _tmp7_;
	const gchar* _tmp8_;
	GXmlCssSelector* _tmp9_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (str != NULL, NULL);
	gxml_css_string_read (str);
	_tmp0_ = g_string_new ("");
	builder = _tmp0_;
	if (!g_unichar_isalpha (gxml_css_string_peek (str))) {
		GError* _tmp1_;
		_tmp1_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _ ("current class doesn't start with letter"));
		_inner_error0_ = _tmp1_;
		g_propagate_error (error, _inner_error0_);
		_g_string_free0 (builder);
		return NULL;
	}
	while (TRUE) {
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_;
		gboolean _tmp5_;
		GString* _tmp6_;
		_tmp4_ = gxml_css_string_get_eof (str);
		_tmp5_ = _tmp4_;
		if (!_tmp5_) {
			_tmp3_ = gxml_css_selector_parser_is_valid_char (gxml_css_string_peek (str));
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			_tmp2_ = !g_unichar_isspace (gxml_css_string_peek (str));
		} else {
			_tmp2_ = FALSE;
		}
		if (!_tmp2_) {
			break;
		}
		_tmp6_ = builder;
		g_string_append_unichar (_tmp6_, gxml_css_string_read (str));
	}
	_tmp7_ = builder;
	_tmp8_ = _tmp7_->str;
	_tmp9_ = gxml_css_selector_new (GXML_CSS_SELECTOR_TYPE_CLASS, _tmp8_);
	result = _tmp9_;
	_g_string_free0 (builder);
	return result;
}

static GXmlCssSelector*
gxml_css_selector_parser_parse_id (GXmlCssString* str,
                                   GError** error)
{
	GXmlCssSelector* result = NULL;
	GString* builder = NULL;
	GString* _tmp0_;
	GString* _tmp7_;
	const gchar* _tmp8_;
	GXmlCssSelector* _tmp9_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (str != NULL, NULL);
	gxml_css_string_read (str);
	_tmp0_ = g_string_new ("");
	builder = _tmp0_;
	if (!g_unichar_isalpha (gxml_css_string_peek (str))) {
		GError* _tmp1_;
		_tmp1_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _ ("current id doesn't start with letter"));
		_inner_error0_ = _tmp1_;
		g_propagate_error (error, _inner_error0_);
		_g_string_free0 (builder);
		return NULL;
	}
	while (TRUE) {
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_;
		gboolean _tmp5_;
		GString* _tmp6_;
		_tmp4_ = gxml_css_string_get_eof (str);
		_tmp5_ = _tmp4_;
		if (!_tmp5_) {
			_tmp3_ = gxml_css_selector_parser_is_valid_char (gxml_css_string_peek (str));
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			_tmp2_ = !g_unichar_isspace (gxml_css_string_peek (str));
		} else {
			_tmp2_ = FALSE;
		}
		if (!_tmp2_) {
			break;
		}
		_tmp6_ = builder;
		g_string_append_unichar (_tmp6_, gxml_css_string_read (str));
	}
	_tmp7_ = builder;
	_tmp8_ = _tmp7_->str;
	_tmp9_ = gxml_css_selector_new (GXML_CSS_SELECTOR_TYPE_ID, _tmp8_);
	result = _tmp9_;
	_g_string_free0 (builder);
	return result;
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		g_slice_free (Block1Data, _data1_);
	}
}

static gchar*
g_unichar_to_string (gunichar self)
{
	gchar* result = NULL;
	gchar* str = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	_tmp0_ = g_new0 (gchar, 7);
	str = (gchar*) _tmp0_;
	_tmp1_ = str;
	g_unichar_to_utf8 (self, _tmp1_);
	result = str;
	return result;
}

static gboolean
__lambda4_ (Block1Data* _data1_,
            GXmlCssString* s)
{
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	g_return_val_if_fail (s != NULL, FALSE);
	if (_data1_->quote == ((gunichar) 0)) {
		_tmp2_ = !g_unichar_isspace (gxml_css_string_peek (s));
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		_tmp1_ = gxml_css_selector_parser_is_valid_char (gxml_css_string_peek (s));
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp3_ = FALSE;
		if (_data1_->quote > ((gunichar) 0)) {
			_tmp3_ = gxml_css_string_peek (s) != _data1_->quote;
		} else {
			_tmp3_ = FALSE;
		}
		_tmp0_ = _tmp3_;
	}
	result = _tmp0_;
	return result;
}

static gboolean
___lambda4__gxml_css_string_func (GXmlCssString* str,
                                  gpointer self)
{
	gboolean result;
	result = __lambda4_ (self, str);
	return result;
}

static GXmlCssSelector*
gxml_css_selector_parser_parse_attribute (GXmlCssString* str,
                                          GError** error)
{
	GXmlCssSelector* result = NULL;
	Block1Data* _data1_;
	GString* builder = NULL;
	GString* _tmp0_;
	GString* extra_builder = NULL;
	GString* _tmp1_;
	gboolean prefixed = FALSE;
	gboolean _tmp8_ = FALSE;
	GString* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp26_ = NULL;
	gchar* prefix = NULL;
	gchar* _tmp29_;
	const gchar* _tmp30_ = NULL;
	gchar* local_name = NULL;
	gchar* _tmp35_;
	GXmlCssAttributeSelector* selector = NULL;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	GXmlCssAttributeSelector* _tmp38_;
	GXmlCssSelectorType ct = 0;
	GXmlCssSelectorType _tmp39_;
	GXmlCssAttributeSelector* _tmp41_;
	GXmlCssSelectorType _tmp42_;
	GXmlCssSelectorType _tmp43_;
	gboolean _tmp50_ = FALSE;
	gchar* attr_value = NULL;
	gchar* _tmp51_;
	GXmlCssAttributeSelector* _tmp52_;
	const gchar* _tmp53_;
	gboolean _tmp54_ = FALSE;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (str != NULL, NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	gxml_css_string_read (str);
	while (TRUE) {
		if (!g_unichar_isspace (gxml_css_string_peek (str))) {
			break;
		}
		gxml_css_string_read (str);
	}
	_tmp0_ = g_string_new ("");
	builder = _tmp0_;
	_tmp1_ = g_string_new ("");
	extra_builder = _tmp1_;
	prefixed = FALSE;
	while (TRUE) {
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_;
		gboolean _tmp5_;
		GString* _tmp7_;
		_tmp4_ = gxml_css_string_get_eof (str);
		_tmp5_ = _tmp4_;
		if (!_tmp5_) {
			gboolean _tmp6_ = FALSE;
			if (gxml_css_string_peek (str) == ((gunichar) '*')) {
				_tmp6_ = TRUE;
			} else {
				_tmp6_ = gxml_css_selector_parser_is_valid_char (gxml_css_string_peek (str));
			}
			_tmp3_ = _tmp6_;
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			_tmp2_ = !g_unichar_isspace (gxml_css_string_peek (str));
		} else {
			_tmp2_ = FALSE;
		}
		if (!_tmp2_) {
			break;
		}
		_tmp7_ = builder;
		g_string_append_unichar (_tmp7_, gxml_css_string_read (str));
	}
	_tmp9_ = builder;
	_tmp10_ = _tmp9_->str;
	if (string_contains (_tmp10_, "*")) {
		GString* _tmp11_;
		_tmp11_ = builder;
		_tmp8_ = _tmp11_->len > ((gssize) 1);
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		GError* _tmp12_;
		_tmp12_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _ ("Invalid attribute"));
		_inner_error0_ = _tmp12_;
		g_propagate_error (error, _inner_error0_);
		_g_string_free0 (extra_builder);
		_g_string_free0 (builder);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return NULL;
	}
	if (gxml_css_string_peek (str) == ((gunichar) '|')) {
		gxml_css_string_read (str);
		if (gxml_css_string_peek (str) == ((gunichar) '=')) {
			gxml_css_string_read_r (str);
		} else {
			GString* _tmp19_;
			gboolean _tmp21_ = FALSE;
			GString* _tmp22_;
			const gchar* _tmp23_;
			prefixed = TRUE;
			while (TRUE) {
				gboolean _tmp13_ = FALSE;
				gboolean _tmp14_ = FALSE;
				gboolean _tmp15_;
				gboolean _tmp16_;
				GString* _tmp18_;
				_tmp15_ = gxml_css_string_get_eof (str);
				_tmp16_ = _tmp15_;
				if (!_tmp16_) {
					gboolean _tmp17_ = FALSE;
					if (gxml_css_string_peek (str) == ((gunichar) '*')) {
						_tmp17_ = TRUE;
					} else {
						_tmp17_ = gxml_css_selector_parser_is_valid_char (gxml_css_string_peek (str));
					}
					_tmp14_ = _tmp17_;
				} else {
					_tmp14_ = FALSE;
				}
				if (_tmp14_) {
					_tmp13_ = !g_unichar_isspace (gxml_css_string_peek (str));
				} else {
					_tmp13_ = FALSE;
				}
				if (!_tmp13_) {
					break;
				}
				_tmp18_ = extra_builder;
				g_string_append_unichar (_tmp18_, gxml_css_string_read (str));
			}
			_tmp19_ = extra_builder;
			if (_tmp19_->len == ((gssize) 0)) {
				GError* _tmp20_;
				_tmp20_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _ ("string value is empty"));
				_inner_error0_ = _tmp20_;
				g_propagate_error (error, _inner_error0_);
				_g_string_free0 (extra_builder);
				_g_string_free0 (builder);
				block1_data_unref (_data1_);
				_data1_ = NULL;
				return NULL;
			}
			_tmp22_ = extra_builder;
			_tmp23_ = _tmp22_->str;
			if (string_contains (_tmp23_, "*")) {
				GString* _tmp24_;
				_tmp24_ = extra_builder;
				_tmp21_ = _tmp24_->len > ((gssize) 1);
			} else {
				_tmp21_ = FALSE;
			}
			if (_tmp21_) {
				GError* _tmp25_;
				_tmp25_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _ ("Invalid attribute"));
				_inner_error0_ = _tmp25_;
				g_propagate_error (error, _inner_error0_);
				_g_string_free0 (extra_builder);
				_g_string_free0 (builder);
				block1_data_unref (_data1_);
				_data1_ = NULL;
				return NULL;
			}
		}
	}
	if (prefixed) {
		GString* _tmp27_;
		const gchar* _tmp28_;
		_tmp27_ = builder;
		_tmp28_ = _tmp27_->str;
		_tmp26_ = _tmp28_;
	} else {
		_tmp26_ = NULL;
	}
	_tmp29_ = g_strdup (_tmp26_);
	prefix = _tmp29_;
	if (prefixed) {
		GString* _tmp31_;
		const gchar* _tmp32_;
		_tmp31_ = extra_builder;
		_tmp32_ = _tmp31_->str;
		_tmp30_ = _tmp32_;
	} else {
		GString* _tmp33_;
		const gchar* _tmp34_;
		_tmp33_ = builder;
		_tmp34_ = _tmp33_->str;
		_tmp30_ = _tmp34_;
	}
	_tmp35_ = g_strdup (_tmp30_);
	local_name = _tmp35_;
	_tmp36_ = prefix;
	_tmp37_ = local_name;
	_tmp38_ = gxml_css_attribute_selector_new (_tmp36_, _tmp37_);
	selector = _tmp38_;
	while (TRUE) {
		if (!g_unichar_isspace (gxml_css_string_peek (str))) {
			break;
		}
		gxml_css_string_read (str);
	}
	if (gxml_css_string_peek (str) == ((gunichar) ']')) {
		gxml_css_string_read (str);
		result = (GXmlCssSelector*) selector;
		_g_free0 (local_name);
		_g_free0 (prefix);
		_g_string_free0 (extra_builder);
		_g_string_free0 (builder);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return result;
	}
	ct = GXML_CSS_SELECTOR_TYPE_CLASS;
	if (gxml_css_string_peek (str) == ((gunichar) '=')) {
		ct = GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_EQUAL;
	} else {
		if (gxml_css_string_peek (str) == ((gunichar) '|')) {
			ct = GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_STARTS_WITH_WORD;
		} else {
			if (gxml_css_string_peek (str) == ((gunichar) '^')) {
				ct = GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_STARTS_WITH;
			} else {
				if (gxml_css_string_peek (str) == ((gunichar) '$')) {
					ct = GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_ENDS_WITH;
				} else {
					if (gxml_css_string_peek (str) == ((gunichar) '~')) {
						ct = GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_CONTAINS;
					} else {
						if (gxml_css_string_peek (str) == ((gunichar) '*')) {
							ct = GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_SUBSTRING;
						}
					}
				}
			}
		}
	}
	_tmp39_ = ct;
	if (_tmp39_ == GXML_CSS_SELECTOR_TYPE_CLASS) {
		GError* _tmp40_;
		_tmp40_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _ ("Invalid attribute selector"));
		_inner_error0_ = _tmp40_;
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (selector);
		_g_free0 (local_name);
		_g_free0 (prefix);
		_g_string_free0 (extra_builder);
		_g_string_free0 (builder);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return NULL;
	}
	_tmp41_ = selector;
	_tmp42_ = ct;
	gxml_css_selector_set_selector_type ((GXmlCssSelector*) _tmp41_, _tmp42_);
	_tmp43_ = ct;
	if (_tmp43_ != GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_EQUAL) {
		gxml_css_string_read (str);
	}
	if (gxml_css_string_peek (str) != ((gunichar) '=')) {
		gchar* _tmp44_;
		gchar* _tmp45_;
		gchar* _tmp46_;
		gchar* _tmp47_;
		GError* _tmp48_;
		GError* _tmp49_;
		_tmp44_ = g_unichar_to_string (gxml_css_string_peek (str));
		_tmp45_ = _tmp44_;
		_tmp46_ = g_strdup_printf (_ ("Invalid attribute selector. '=' expected but '%s' was found"), _tmp45_);
		_tmp47_ = _tmp46_;
		_tmp48_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _tmp47_);
		_tmp49_ = _tmp48_;
		_g_free0 (_tmp47_);
		_g_free0 (_tmp45_);
		_inner_error0_ = _tmp49_;
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (selector);
		_g_free0 (local_name);
		_g_free0 (prefix);
		_g_string_free0 (extra_builder);
		_g_string_free0 (builder);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return NULL;
	}
	gxml_css_string_read (str);
	while (TRUE) {
		if (!g_unichar_isspace (gxml_css_string_peek (str))) {
			break;
		}
		gxml_css_string_read (str);
	}
	_data1_->quote = (gunichar) 0;
	if (gxml_css_string_peek (str) == ((gunichar) '"')) {
		_tmp50_ = TRUE;
	} else {
		_tmp50_ = gxml_css_string_peek (str) == ((gunichar) '\'');
	}
	if (_tmp50_) {
		_data1_->quote = gxml_css_string_read (str);
	}
	_tmp51_ = gxml_css_selector_parser_parse_identifier (str, ___lambda4__gxml_css_string_func, _data1_);
	attr_value = _tmp51_;
	_tmp52_ = selector;
	_tmp53_ = attr_value;
	gxml_css_selector_set_value ((GXmlCssSelector*) _tmp52_, _tmp53_);
	if (_data1_->quote > ((gunichar) 0)) {
		_tmp54_ = _data1_->quote != gxml_css_string_read (str);
	} else {
		_tmp54_ = FALSE;
	}
	if (_tmp54_) {
		GError* _tmp55_;
		_tmp55_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _ ("Cannot find end of attribute value"));
		_inner_error0_ = _tmp55_;
		g_propagate_error (error, _inner_error0_);
		_g_free0 (attr_value);
		_g_object_unref0 (selector);
		_g_free0 (local_name);
		_g_free0 (prefix);
		_g_string_free0 (extra_builder);
		_g_string_free0 (builder);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return NULL;
	}
	while (TRUE) {
		if (!g_unichar_isspace (gxml_css_string_peek (str))) {
			break;
		}
		gxml_css_string_read (str);
	}
	if (gxml_css_string_read (str) != ((gunichar) ']')) {
		GError* _tmp56_;
		_tmp56_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _ ("Cannot find end of attribute selector"));
		_inner_error0_ = _tmp56_;
		g_propagate_error (error, _inner_error0_);
		_g_free0 (attr_value);
		_g_object_unref0 (selector);
		_g_free0 (local_name);
		_g_free0 (prefix);
		_g_string_free0 (extra_builder);
		_g_string_free0 (builder);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return NULL;
	}
	result = (GXmlCssSelector*) selector;
	_g_free0 (attr_value);
	_g_free0 (local_name);
	_g_free0 (prefix);
	_g_string_free0 (extra_builder);
	_g_string_free0 (builder);
	block1_data_unref (_data1_);
	_data1_ = NULL;
	return result;
}

static void
gxml_css_selector_parser_parse_selectors (GXmlCssString* str,
                                          GeeList* list,
                                          gunichar stop_char,
                                          GError** error)
{
	gint _tmp46_;
	gint _tmp47_;
	gint _tmp49_;
	gint _tmp50_;
	gpointer _tmp51_;
	GXmlCssSelector* _tmp52_;
	GXmlCssCombiner _tmp53_;
	GXmlCssCombiner _tmp54_;
	gboolean _tmp55_;
	gint _tmp60_;
	gint _tmp61_;
	gpointer _tmp62_;
	GXmlCssSelector* _tmp63_;
	GXmlCssCombiner _tmp64_;
	GXmlCssCombiner _tmp65_;
	gboolean _tmp66_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (str != NULL);
	g_return_if_fail (list != NULL);
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_;
		gboolean _tmp2_;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		gint _tmp15_;
		gint _tmp16_;
		gpointer _tmp17_;
		GXmlCssSelector* _tmp18_;
		gboolean _tmp19_;
		GXmlCssCombiner combiner = 0;
		gboolean _tmp38_ = FALSE;
		GXmlCssCombiner _tmp39_;
		gint _tmp41_;
		gint _tmp42_;
		gpointer _tmp43_;
		GXmlCssSelector* _tmp44_;
		GXmlCssCombiner _tmp45_;
		_tmp1_ = gxml_css_string_get_eof (str);
		_tmp2_ = _tmp1_;
		if (!_tmp2_) {
			_tmp0_ = gxml_css_string_peek (str) != stop_char;
		} else {
			_tmp0_ = FALSE;
		}
		if (!_tmp0_) {
			break;
		}
		if (g_unichar_isalpha (gxml_css_string_peek (str))) {
			_tmp4_ = TRUE;
		} else {
			_tmp4_ = gxml_css_string_peek (str) == ((gunichar) '*');
		}
		if (_tmp4_) {
			_tmp3_ = TRUE;
		} else {
			_tmp3_ = gxml_css_string_peek (str) == ((gunichar) '|');
		}
		if (_tmp3_) {
			GXmlCssSelector* _tmp5_ = NULL;
			GXmlCssSelector* _tmp6_;
			_tmp6_ = gxml_css_selector_parser_parse_element (str, &_inner_error0_);
			_tmp5_ = _tmp6_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				g_propagate_error (error, _inner_error0_);
				return;
			}
			gee_collection_add ((GeeCollection*) list, _tmp5_);
			_g_object_unref0 (_tmp5_);
		} else {
			if (gxml_css_string_peek (str) == ((gunichar) '.')) {
				GXmlCssSelector* _tmp7_ = NULL;
				GXmlCssSelector* _tmp8_;
				_tmp8_ = gxml_css_selector_parser_parse_class (str, &_inner_error0_);
				_tmp7_ = _tmp8_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					g_propagate_error (error, _inner_error0_);
					return;
				}
				gee_collection_add ((GeeCollection*) list, _tmp7_);
				_g_object_unref0 (_tmp7_);
			} else {
				if (gxml_css_string_peek (str) == ((gunichar) '#')) {
					GXmlCssSelector* _tmp9_ = NULL;
					GXmlCssSelector* _tmp10_;
					_tmp10_ = gxml_css_selector_parser_parse_id (str, &_inner_error0_);
					_tmp9_ = _tmp10_;
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						g_propagate_error (error, _inner_error0_);
						return;
					}
					gee_collection_add ((GeeCollection*) list, _tmp9_);
					_g_object_unref0 (_tmp9_);
				} else {
					if (gxml_css_string_peek (str) == ((gunichar) ':')) {
						GXmlCssSelector* _tmp11_ = NULL;
						GXmlCssSelector* _tmp12_;
						_tmp12_ = gxml_css_selector_parser_parse_pseudo (str, &_inner_error0_);
						_tmp11_ = _tmp12_;
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							g_propagate_error (error, _inner_error0_);
							return;
						}
						gee_collection_add ((GeeCollection*) list, _tmp11_);
						_g_object_unref0 (_tmp11_);
					} else {
						if (gxml_css_string_peek (str) == ((gunichar) '[')) {
							GXmlCssSelector* _tmp13_ = NULL;
							GXmlCssSelector* _tmp14_;
							_tmp14_ = gxml_css_selector_parser_parse_attribute (str, &_inner_error0_);
							_tmp13_ = _tmp14_;
							if (G_UNLIKELY (_inner_error0_ != NULL)) {
								g_propagate_error (error, _inner_error0_);
								return;
							}
							gee_collection_add ((GeeCollection*) list, _tmp13_);
							_g_object_unref0 (_tmp13_);
						}
					}
				}
			}
		}
		_tmp15_ = gee_collection_get_size ((GeeCollection*) list);
		_tmp16_ = _tmp15_;
		_tmp17_ = gee_list_get (list, _tmp16_ - 1);
		_tmp18_ = (GXmlCssSelector*) _tmp17_;
		_tmp19_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, GXML_TYPE_CSS_ELEMENT_SELECTOR);
		_g_object_unref0 (_tmp18_);
		if (_tmp19_) {
			GXmlCssElementSelector* sel = NULL;
			gint _tmp20_;
			gint _tmp21_;
			gpointer _tmp22_;
			GXmlCssSelector* _tmp23_;
			GXmlCssElementSelector* _tmp24_;
			gboolean _tmp25_ = FALSE;
			GXmlCssElementSelector* _tmp26_;
			gboolean _tmp27_;
			gboolean _tmp28_;
			_tmp20_ = gee_collection_get_size ((GeeCollection*) list);
			_tmp21_ = _tmp20_;
			_tmp22_ = gee_list_get (list, _tmp21_ - 1);
			_tmp23_ = (GXmlCssSelector*) _tmp22_;
			_tmp24_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, GXML_TYPE_CSS_ELEMENT_SELECTOR) ? ((GXmlCssElementSelector*) _tmp23_) : NULL;
			if (_tmp24_ == NULL) {
				_g_object_unref0 (_tmp23_);
			}
			sel = _tmp24_;
			_tmp26_ = sel;
			_tmp27_ = gxml_css_element_selector_get_prefixed (_tmp26_);
			_tmp28_ = _tmp27_;
			if (!_tmp28_) {
				GXmlCssElementSelector* _tmp29_;
				gchar* _tmp30_;
				gchar* _tmp31_;
				gchar* _tmp32_;
				_tmp29_ = sel;
				_tmp30_ = gxml_css_element_selector_get_local_name (_tmp29_);
				_tmp31_ = _tmp30_;
				_tmp32_ = _tmp31_;
				_tmp25_ = g_strcmp0 (_tmp32_, "*") == 0;
				_g_free0 (_tmp32_);
			} else {
				_tmp25_ = FALSE;
			}
			if (_tmp25_) {
				gint _tmp33_;
				gint _tmp34_;
				GXmlCssSelector* _tmp35_;
				GXmlCssSelector* _tmp36_;
				_tmp33_ = gee_collection_get_size ((GeeCollection*) list);
				_tmp34_ = _tmp33_;
				_tmp35_ = gxml_css_selector_new (GXML_CSS_SELECTOR_TYPE_ALL, "");
				_tmp36_ = _tmp35_;
				gee_list_set (list, _tmp34_ - 1, _tmp36_);
				_g_object_unref0 (_tmp36_);
			}
			_g_object_unref0 (sel);
		}
		combiner = 0;
		if (g_unichar_isspace (gxml_css_string_peek (str))) {
			combiner = GXML_CSS_COMBINER_INSIDE;
		}
		while (TRUE) {
			if (!g_unichar_isspace (gxml_css_string_peek (str))) {
				break;
			}
			gxml_css_string_read (str);
		}
		if (gxml_css_string_peek (str) == ((gunichar) ',')) {
			combiner = GXML_CSS_COMBINER_AND;
		} else {
			if (gxml_css_string_peek (str) == ((gunichar) '>')) {
				combiner = GXML_CSS_COMBINER_PARENT;
			} else {
				if (gxml_css_string_peek (str) == ((gunichar) '+')) {
					combiner = GXML_CSS_COMBINER_AFTER;
				} else {
					if (gxml_css_string_peek (str) == ((gunichar) '~')) {
						combiner = GXML_CSS_COMBINER_PRECEDED;
					} else {
						GXmlCssCombiner _tmp37_;
						_tmp37_ = combiner;
						if (_tmp37_ == 0) {
							combiner = GXML_CSS_COMBINER_NONE;
						}
					}
				}
			}
		}
		_tmp39_ = combiner;
		if (_tmp39_ != GXML_CSS_COMBINER_NONE) {
			GXmlCssCombiner _tmp40_;
			_tmp40_ = combiner;
			_tmp38_ = _tmp40_ != GXML_CSS_COMBINER_INSIDE;
		} else {
			_tmp38_ = FALSE;
		}
		if (_tmp38_) {
			gxml_css_string_read (str);
		}
		_tmp41_ = gee_collection_get_size ((GeeCollection*) list);
		_tmp42_ = _tmp41_;
		_tmp43_ = gee_list_get (list, _tmp42_ - 1);
		_tmp44_ = (GXmlCssSelector*) _tmp43_;
		_tmp45_ = combiner;
		gxml_css_selector_set_combiner (_tmp44_, _tmp45_);
		_g_object_unref0 (_tmp44_);
		while (TRUE) {
			if (!g_unichar_isspace (gxml_css_string_peek (str))) {
				break;
			}
			gxml_css_string_read (str);
		}
	}
	_tmp46_ = gee_collection_get_size ((GeeCollection*) list);
	_tmp47_ = _tmp46_;
	if (_tmp47_ == 0) {
		GError* _tmp48_;
		_tmp48_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_NULL, _ ("No selectors found"));
		_inner_error0_ = _tmp48_;
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp49_ = gee_collection_get_size ((GeeCollection*) list);
	_tmp50_ = _tmp49_;
	_tmp51_ = gee_list_get (list, _tmp50_ - 1);
	_tmp52_ = (GXmlCssSelector*) _tmp51_;
	_tmp53_ = gxml_css_selector_get_combiner (_tmp52_);
	_tmp54_ = _tmp53_;
	_tmp55_ = _tmp54_ == GXML_CSS_COMBINER_NONE;
	_g_object_unref0 (_tmp52_);
	if (_tmp55_) {
		gint _tmp56_;
		gint _tmp57_;
		gpointer _tmp58_;
		GXmlCssSelector* _tmp59_;
		_tmp56_ = gee_collection_get_size ((GeeCollection*) list);
		_tmp57_ = _tmp56_;
		_tmp58_ = gee_list_get (list, _tmp57_ - 1);
		_tmp59_ = (GXmlCssSelector*) _tmp58_;
		gxml_css_selector_set_combiner (_tmp59_, GXML_CSS_COMBINER_NULL);
		_g_object_unref0 (_tmp59_);
	}
	_tmp60_ = gee_collection_get_size ((GeeCollection*) list);
	_tmp61_ = _tmp60_;
	_tmp62_ = gee_list_get (list, _tmp61_ - 1);
	_tmp63_ = (GXmlCssSelector*) _tmp62_;
	_tmp64_ = gxml_css_selector_get_combiner (_tmp63_);
	_tmp65_ = _tmp64_;
	_tmp66_ = _tmp65_ != GXML_CSS_COMBINER_NULL;
	_g_object_unref0 (_tmp63_);
	if (_tmp66_) {
		gint _tmp67_;
		gint _tmp68_;
		gpointer _tmp69_;
		GXmlCssSelector* _tmp70_;
		GXmlCssCombiner _tmp71_;
		GXmlCssCombiner _tmp72_;
		GEnumValue* _tmp73_;
		gchar* _tmp74_;
		gchar* _tmp75_;
		GError* _tmp76_;
		GError* _tmp77_;
		_tmp67_ = gee_collection_get_size ((GeeCollection*) list);
		_tmp68_ = _tmp67_;
		_tmp69_ = gee_list_get (list, _tmp68_ - 1);
		_tmp70_ = (GXmlCssSelector*) _tmp69_;
		_tmp71_ = gxml_css_selector_get_combiner (_tmp70_);
		_tmp72_ = _tmp71_;
		_tmp73_ = g_enum_get_value (g_type_class_ref (GXML_TYPE_CSS_COMBINER), _tmp72_);
		_tmp74_ = g_strdup_printf (_ ("Last selector has combiner assigned (%s)"), (_tmp73_ != NULL) ? _tmp73_->value_name : NULL);
		_tmp75_ = _tmp74_;
		_tmp76_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_COMBINER, _tmp75_);
		_tmp77_ = _tmp76_;
		_g_free0 (_tmp75_);
		_g_object_unref0 (_tmp70_);
		_inner_error0_ = _tmp77_;
		g_propagate_error (error, _inner_error0_);
		return;
	}
}

void
gxml_css_selector_parser_parse (GXmlCssSelectorParser* self,
                                const gchar* selectors,
                                GError** error)
{
	GeeArrayList* _tmp0_;
	GXmlCssString* str = NULL;
	GXmlCssString* _tmp1_;
	GeeArrayList* _tmp2_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (selectors != NULL);
	_tmp0_ = self->priv->list;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
	_tmp1_ = gxml_css_string_new (selectors);
	str = _tmp1_;
	_tmp2_ = self->priv->list;
	gxml_css_selector_parser_parse_selectors (str, (GeeList*) _tmp2_, (gunichar) 0, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (str);
		return;
	}
	_g_object_unref0 (str);
}

static gboolean
gxml_css_selector_parser_match_pseudo (GXmlDomElement* element,
                                       GXmlCssSelector* selector,
                                       GError** error)
{
	gboolean result = FALSE;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	gboolean _tmp28_ = FALSE;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp51_;
	const gchar* _tmp52_;
	const gchar* _tmp57_;
	const gchar* _tmp58_;
	const gchar* _tmp63_;
	const gchar* _tmp64_;
	const gchar* _tmp73_;
	const gchar* _tmp74_;
	const gchar* _tmp89_;
	const gchar* _tmp90_;
	const gchar* _tmp105_;
	const gchar* _tmp106_;
	const gchar* _tmp136_;
	const gchar* _tmp137_;
	const gchar* _tmp189_;
	const gchar* _tmp190_;
	const gchar* _tmp258_;
	const gchar* _tmp259_;
	const gchar* _tmp310_;
	const gchar* _tmp311_;
	g_return_val_if_fail (element != NULL, FALSE);
	g_return_val_if_fail (selector != NULL, FALSE);
	_tmp0_ = gxml_css_selector_get_name (selector);
	_tmp1_ = _tmp0_;
	if (g_strcmp0 (_tmp1_, "root") == 0) {
		GXmlDomDocument* _tmp2_;
		GXmlDomDocument* _tmp3_;
		GXmlDomElement* _tmp4_;
		GXmlDomElement* _tmp5_;
		GXmlDomElement* _tmp6_;
		gboolean _tmp7_;
		_tmp2_ = gxml_dom_node_get_owner_document ((GXmlDomNode*) element);
		_tmp3_ = _tmp2_;
		_tmp4_ = gxml_dom_document_get_document_element (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = _tmp5_;
		_tmp7_ = element == _tmp6_;
		_g_object_unref0 (_tmp6_);
		result = _tmp7_;
		return result;
	}
	_tmp8_ = gxml_css_selector_get_name (selector);
	_tmp9_ = _tmp8_;
	if (g_strcmp0 (_tmp9_, "empty") == 0) {
		GXmlDomHTMLCollection* _tmp10_;
		GXmlDomHTMLCollection* _tmp11_;
		GXmlDomHTMLCollection* _tmp12_;
		gint _tmp13_;
		gint _tmp14_;
		gboolean _tmp15_;
		_tmp10_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) element);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp13_ = gxml_dom_html_collection_get_length (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = _tmp14_ == 0;
		_g_object_unref0 (_tmp12_);
		result = _tmp15_;
		return result;
	}
	_tmp16_ = gxml_css_selector_get_name (selector);
	_tmp17_ = _tmp16_;
	if (g_strcmp0 (_tmp17_, "checked") == 0) {
		gchar* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gboolean _tmp21_;
		GXmlDomNamedNodeMap* _tmp22_;
		GXmlDomNamedNodeMap* _tmp23_;
		GXmlDomNamedNodeMap* _tmp24_;
		GXmlDomNode* _tmp25_;
		GXmlDomNode* _tmp26_;
		gboolean _tmp27_;
		_tmp18_ = gxml_dom_element_get_local_name (element);
		_tmp19_ = _tmp18_;
		_tmp20_ = _tmp19_;
		_tmp21_ = g_strcmp0 (_tmp20_, "input") != 0;
		_g_free0 (_tmp20_);
		if (_tmp21_) {
			result = FALSE;
			return result;
		}
		_tmp22_ = gxml_dom_element_get_attributes (element);
		_tmp23_ = _tmp22_;
		_tmp24_ = _tmp23_;
		_tmp25_ = gxml_dom_named_node_map_get_named_item (_tmp24_, "checked");
		_tmp26_ = _tmp25_;
		_tmp27_ = _tmp26_ != NULL;
		_g_object_unref0 (_tmp26_);
		_g_object_unref0 (_tmp24_);
		result = _tmp27_;
		return result;
	}
	_tmp29_ = gxml_css_selector_get_name (selector);
	_tmp30_ = _tmp29_;
	if (g_strcmp0 (_tmp30_, "enabled") == 0) {
		_tmp28_ = TRUE;
	} else {
		const gchar* _tmp31_;
		const gchar* _tmp32_;
		_tmp31_ = gxml_css_selector_get_name (selector);
		_tmp32_ = _tmp31_;
		_tmp28_ = g_strcmp0 (_tmp32_, "disabled") == 0;
	}
	if (_tmp28_) {
		gchar* _tmp33_;
		gchar* _tmp34_;
		gchar* _tmp35_;
		gboolean _tmp36_;
		const gchar* _tmp37_;
		const gchar* _tmp38_;
		GXmlDomNamedNodeMap* _tmp45_;
		GXmlDomNamedNodeMap* _tmp46_;
		GXmlDomNamedNodeMap* _tmp47_;
		GXmlDomNode* _tmp48_;
		GXmlDomNode* _tmp49_;
		gboolean _tmp50_;
		_tmp33_ = gxml_dom_element_get_local_name (element);
		_tmp34_ = _tmp33_;
		_tmp35_ = _tmp34_;
		_tmp36_ = g_strcmp0 (_tmp35_, "input") != 0;
		_g_free0 (_tmp35_);
		if (_tmp36_) {
			result = FALSE;
			return result;
		}
		_tmp37_ = gxml_css_selector_get_name (selector);
		_tmp38_ = _tmp37_;
		if (g_strcmp0 (_tmp38_, "disabled") == 0) {
			GXmlDomNamedNodeMap* _tmp39_;
			GXmlDomNamedNodeMap* _tmp40_;
			GXmlDomNamedNodeMap* _tmp41_;
			GXmlDomNode* _tmp42_;
			GXmlDomNode* _tmp43_;
			gboolean _tmp44_;
			_tmp39_ = gxml_dom_element_get_attributes (element);
			_tmp40_ = _tmp39_;
			_tmp41_ = _tmp40_;
			_tmp42_ = gxml_dom_named_node_map_get_named_item (_tmp41_, "disabled");
			_tmp43_ = _tmp42_;
			_tmp44_ = _tmp43_ != NULL;
			_g_object_unref0 (_tmp43_);
			_g_object_unref0 (_tmp41_);
			result = _tmp44_;
			return result;
		}
		_tmp45_ = gxml_dom_element_get_attributes (element);
		_tmp46_ = _tmp45_;
		_tmp47_ = _tmp46_;
		_tmp48_ = gxml_dom_named_node_map_get_named_item (_tmp47_, "disabled");
		_tmp49_ = _tmp48_;
		_tmp50_ = _tmp49_ == NULL;
		_g_object_unref0 (_tmp49_);
		_g_object_unref0 (_tmp47_);
		result = _tmp50_;
		return result;
	}
	_tmp51_ = gxml_css_selector_get_name (selector);
	_tmp52_ = _tmp51_;
	if (g_strcmp0 (_tmp52_, "first-child") == 0) {
		GXmlDomElement* _tmp53_;
		GXmlDomElement* _tmp54_;
		GXmlDomElement* _tmp55_;
		gboolean _tmp56_;
		_tmp53_ = gxml_dom_non_document_type_child_node_get_previous_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
		_tmp54_ = _tmp53_;
		_tmp55_ = _tmp54_;
		_tmp56_ = _tmp55_ == NULL;
		_g_object_unref0 (_tmp55_);
		result = _tmp56_;
		return result;
	}
	_tmp57_ = gxml_css_selector_get_name (selector);
	_tmp58_ = _tmp57_;
	if (g_strcmp0 (_tmp58_, "last-child") == 0) {
		GXmlDomElement* _tmp59_;
		GXmlDomElement* _tmp60_;
		GXmlDomElement* _tmp61_;
		gboolean _tmp62_;
		_tmp59_ = gxml_dom_non_document_type_child_node_get_next_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
		_tmp60_ = _tmp59_;
		_tmp61_ = _tmp60_;
		_tmp62_ = _tmp61_ == NULL;
		_g_object_unref0 (_tmp61_);
		result = _tmp62_;
		return result;
	}
	_tmp63_ = gxml_css_selector_get_name (selector);
	_tmp64_ = _tmp63_;
	if (g_strcmp0 (_tmp64_, "only-child") == 0) {
		gboolean _tmp65_ = FALSE;
		GXmlDomElement* _tmp66_;
		GXmlDomElement* _tmp67_;
		GXmlDomElement* _tmp68_;
		gboolean _tmp69_;
		_tmp66_ = gxml_dom_non_document_type_child_node_get_previous_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
		_tmp67_ = _tmp66_;
		_tmp68_ = _tmp67_;
		_tmp69_ = _tmp68_ == NULL;
		_g_object_unref0 (_tmp68_);
		if (_tmp69_) {
			GXmlDomElement* _tmp70_;
			GXmlDomElement* _tmp71_;
			GXmlDomElement* _tmp72_;
			_tmp70_ = gxml_dom_non_document_type_child_node_get_next_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
			_tmp71_ = _tmp70_;
			_tmp72_ = _tmp71_;
			_tmp65_ = _tmp72_ == NULL;
			_g_object_unref0 (_tmp72_);
		} else {
			_tmp65_ = FALSE;
		}
		result = _tmp65_;
		return result;
	}
	_tmp73_ = gxml_css_selector_get_name (selector);
	_tmp74_ = _tmp73_;
	if (g_strcmp0 (_tmp74_, "first-of-type") == 0) {
		GXmlDomElement* e = NULL;
		GXmlDomElement* _tmp75_;
		GXmlDomElement* _tmp76_;
		gboolean res = FALSE;
		_tmp75_ = gxml_dom_non_document_type_child_node_get_previous_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
		_tmp76_ = _tmp75_;
		e = _tmp76_;
		res = TRUE;
		while (TRUE) {
			GXmlDomElement* _tmp77_;
			GXmlDomElement* _tmp78_;
			gchar* _tmp79_;
			gchar* _tmp80_;
			gchar* _tmp81_;
			gchar* _tmp82_;
			gchar* _tmp83_;
			gchar* _tmp84_;
			gboolean _tmp85_;
			GXmlDomElement* _tmp86_;
			GXmlDomElement* _tmp87_;
			GXmlDomElement* _tmp88_;
			_tmp77_ = e;
			if (!(_tmp77_ != NULL)) {
				break;
			}
			_tmp78_ = e;
			_tmp79_ = gxml_dom_element_get_local_name (_tmp78_);
			_tmp80_ = _tmp79_;
			_tmp81_ = _tmp80_;
			_tmp82_ = gxml_dom_element_get_local_name (element);
			_tmp83_ = _tmp82_;
			_tmp84_ = _tmp83_;
			_tmp85_ = g_strcmp0 (_tmp81_, _tmp84_) == 0;
			_g_free0 (_tmp84_);
			_g_free0 (_tmp81_);
			if (_tmp85_) {
				res = FALSE;
			}
			_tmp86_ = e;
			_tmp87_ = gxml_dom_non_document_type_child_node_get_previous_element_sibling ((GXmlDomNonDocumentTypeChildNode*) _tmp86_);
			_tmp88_ = _tmp87_;
			_g_object_unref0 (e);
			e = _tmp88_;
		}
		result = res;
		_g_object_unref0 (e);
		return result;
	}
	_tmp89_ = gxml_css_selector_get_name (selector);
	_tmp90_ = _tmp89_;
	if (g_strcmp0 (_tmp90_, "last-of-type") == 0) {
		GXmlDomElement* e = NULL;
		GXmlDomElement* _tmp91_;
		GXmlDomElement* _tmp92_;
		gboolean res = FALSE;
		_tmp91_ = gxml_dom_non_document_type_child_node_get_next_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
		_tmp92_ = _tmp91_;
		e = _tmp92_;
		res = TRUE;
		while (TRUE) {
			GXmlDomElement* _tmp93_;
			GXmlDomElement* _tmp94_;
			gchar* _tmp95_;
			gchar* _tmp96_;
			gchar* _tmp97_;
			gchar* _tmp98_;
			gchar* _tmp99_;
			gchar* _tmp100_;
			gboolean _tmp101_;
			GXmlDomElement* _tmp102_;
			GXmlDomElement* _tmp103_;
			GXmlDomElement* _tmp104_;
			_tmp93_ = e;
			if (!(_tmp93_ != NULL)) {
				break;
			}
			_tmp94_ = e;
			_tmp95_ = gxml_dom_element_get_local_name (_tmp94_);
			_tmp96_ = _tmp95_;
			_tmp97_ = _tmp96_;
			_tmp98_ = gxml_dom_element_get_local_name (element);
			_tmp99_ = _tmp98_;
			_tmp100_ = _tmp99_;
			_tmp101_ = g_strcmp0 (_tmp97_, _tmp100_) == 0;
			_g_free0 (_tmp100_);
			_g_free0 (_tmp97_);
			if (_tmp101_) {
				res = FALSE;
			}
			_tmp102_ = e;
			_tmp103_ = gxml_dom_non_document_type_child_node_get_next_element_sibling ((GXmlDomNonDocumentTypeChildNode*) _tmp102_);
			_tmp104_ = _tmp103_;
			_g_object_unref0 (e);
			e = _tmp104_;
		}
		result = res;
		_g_object_unref0 (e);
		return result;
	}
	_tmp105_ = gxml_css_selector_get_name (selector);
	_tmp106_ = _tmp105_;
	if (g_strcmp0 (_tmp106_, "only-of-type") == 0) {
		GXmlDomElement* e = NULL;
		GXmlDomElement* _tmp107_;
		GXmlDomElement* _tmp108_;
		GXmlDomElement* f = NULL;
		GXmlDomElement* _tmp109_;
		GXmlDomElement* _tmp110_;
		gboolean eres = FALSE;
		gboolean fres = FALSE;
		gboolean _tmp135_ = FALSE;
		_tmp107_ = gxml_dom_non_document_type_child_node_get_previous_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
		_tmp108_ = _tmp107_;
		e = _tmp108_;
		_tmp109_ = gxml_dom_non_document_type_child_node_get_next_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
		_tmp110_ = _tmp109_;
		f = _tmp110_;
		eres = TRUE;
		fres = TRUE;
		while (TRUE) {
			GXmlDomElement* _tmp111_;
			GXmlDomElement* _tmp112_;
			gchar* _tmp113_;
			gchar* _tmp114_;
			gchar* _tmp115_;
			gchar* _tmp116_;
			gchar* _tmp117_;
			gchar* _tmp118_;
			gboolean _tmp119_;
			GXmlDomElement* _tmp120_;
			GXmlDomElement* _tmp121_;
			GXmlDomElement* _tmp122_;
			_tmp111_ = e;
			if (!(_tmp111_ != NULL)) {
				break;
			}
			_tmp112_ = e;
			_tmp113_ = gxml_dom_element_get_local_name (_tmp112_);
			_tmp114_ = _tmp113_;
			_tmp115_ = _tmp114_;
			_tmp116_ = gxml_dom_element_get_local_name (element);
			_tmp117_ = _tmp116_;
			_tmp118_ = _tmp117_;
			_tmp119_ = g_strcmp0 (_tmp115_, _tmp118_) == 0;
			_g_free0 (_tmp118_);
			_g_free0 (_tmp115_);
			if (_tmp119_) {
				eres = FALSE;
			}
			_tmp120_ = e;
			_tmp121_ = gxml_dom_non_document_type_child_node_get_previous_element_sibling ((GXmlDomNonDocumentTypeChildNode*) _tmp120_);
			_tmp122_ = _tmp121_;
			_g_object_unref0 (e);
			e = _tmp122_;
		}
		while (TRUE) {
			GXmlDomElement* _tmp123_;
			GXmlDomElement* _tmp124_;
			gchar* _tmp125_;
			gchar* _tmp126_;
			gchar* _tmp127_;
			gchar* _tmp128_;
			gchar* _tmp129_;
			gchar* _tmp130_;
			gboolean _tmp131_;
			GXmlDomElement* _tmp132_;
			GXmlDomElement* _tmp133_;
			GXmlDomElement* _tmp134_;
			_tmp123_ = f;
			if (!(_tmp123_ != NULL)) {
				break;
			}
			_tmp124_ = f;
			_tmp125_ = gxml_dom_element_get_local_name (_tmp124_);
			_tmp126_ = _tmp125_;
			_tmp127_ = _tmp126_;
			_tmp128_ = gxml_dom_element_get_local_name (element);
			_tmp129_ = _tmp128_;
			_tmp130_ = _tmp129_;
			_tmp131_ = g_strcmp0 (_tmp127_, _tmp130_) == 0;
			_g_free0 (_tmp130_);
			_g_free0 (_tmp127_);
			if (_tmp131_) {
				fres = FALSE;
			}
			_tmp132_ = f;
			_tmp133_ = gxml_dom_non_document_type_child_node_get_next_element_sibling ((GXmlDomNonDocumentTypeChildNode*) _tmp132_);
			_tmp134_ = _tmp133_;
			_g_object_unref0 (f);
			f = _tmp134_;
		}
		if (eres) {
			_tmp135_ = fres;
		} else {
			_tmp135_ = FALSE;
		}
		result = _tmp135_;
		_g_object_unref0 (f);
		_g_object_unref0 (e);
		return result;
	}
	_tmp136_ = gxml_css_selector_get_name (selector);
	_tmp137_ = _tmp136_;
	if (g_strcmp0 (_tmp137_, "nth-child") == 0) {
		GXmlDomElement* _tmp138_;
		GXmlDomElement* _tmp139_;
		GXmlDomElement* _tmp140_;
		gboolean _tmp141_;
		gboolean _tmp142_ = FALSE;
		const gchar* _tmp143_;
		const gchar* _tmp144_;
		gint index = 0;
		const gchar* _tmp169_;
		const gchar* _tmp170_;
		GXmlDomElement* _tmp171_;
		GXmlDomElement* _tmp172_;
		GXmlDomElement* _tmp173_;
		GXmlDomHTMLCollection* _tmp174_;
		GXmlDomHTMLCollection* _tmp175_;
		GXmlDomHTMLCollection* _tmp176_;
		gint _tmp177_;
		gint _tmp178_;
		gboolean _tmp179_;
		GXmlDomElement* _tmp180_;
		GXmlDomElement* _tmp181_;
		GXmlDomElement* _tmp182_;
		GXmlDomHTMLCollection* _tmp183_;
		GXmlDomHTMLCollection* _tmp184_;
		GXmlDomHTMLCollection* _tmp185_;
		GXmlDomElement* _tmp186_;
		GXmlDomElement* _tmp187_;
		gboolean _tmp188_;
		_tmp138_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
		_tmp139_ = _tmp138_;
		_tmp140_ = _tmp139_;
		_tmp141_ = _tmp140_ == NULL;
		_g_object_unref0 (_tmp140_);
		if (_tmp141_) {
			result = FALSE;
			return result;
		}
		_tmp143_ = gxml_css_selector_get_value (selector);
		_tmp144_ = _tmp143_;
		if (g_strcmp0 (_tmp144_, "even") == 0) {
			_tmp142_ = TRUE;
		} else {
			const gchar* _tmp145_;
			const gchar* _tmp146_;
			_tmp145_ = gxml_css_selector_get_value (selector);
			_tmp146_ = _tmp145_;
			_tmp142_ = g_strcmp0 (_tmp146_, "odd") == 0;
		}
		if (_tmp142_) {
			{
				gint _tmp147_ = 0;
				const gchar* _tmp148_;
				const gchar* _tmp149_;
				gint i = 0;
				_tmp148_ = gxml_css_selector_get_value (selector);
				_tmp149_ = _tmp148_;
				if (g_strcmp0 (_tmp149_, "even") == 0) {
					_tmp147_ = 1;
				} else {
					_tmp147_ = 0;
				}
				i = _tmp147_;
				{
					gboolean _tmp150_ = FALSE;
					_tmp150_ = TRUE;
					while (TRUE) {
						GXmlDomElement* _tmp151_;
						GXmlDomElement* _tmp152_;
						GXmlDomElement* _tmp153_;
						GXmlDomHTMLCollection* _tmp154_;
						GXmlDomHTMLCollection* _tmp155_;
						GXmlDomHTMLCollection* _tmp156_;
						gint _tmp157_;
						gint _tmp158_;
						gboolean _tmp159_;
						GXmlDomElement* child = NULL;
						GXmlDomElement* _tmp160_;
						GXmlDomElement* _tmp161_;
						GXmlDomElement* _tmp162_;
						GXmlDomHTMLCollection* _tmp163_;
						GXmlDomHTMLCollection* _tmp164_;
						GXmlDomHTMLCollection* _tmp165_;
						GXmlDomElement* _tmp166_;
						GXmlDomElement* _tmp167_;
						GXmlDomElement* _tmp168_;
						if (!_tmp150_) {
							i = i + 2;
						}
						_tmp150_ = FALSE;
						_tmp151_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
						_tmp152_ = _tmp151_;
						_tmp153_ = _tmp152_;
						_tmp154_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp153_);
						_tmp155_ = _tmp154_;
						_tmp156_ = _tmp155_;
						_tmp157_ = gxml_dom_html_collection_get_length (_tmp156_);
						_tmp158_ = _tmp157_;
						_tmp159_ = !(i < _tmp158_);
						_g_object_unref0 (_tmp156_);
						_g_object_unref0 (_tmp153_);
						if (_tmp159_) {
							break;
						}
						_tmp160_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
						_tmp161_ = _tmp160_;
						_tmp162_ = _tmp161_;
						_tmp163_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp162_);
						_tmp164_ = _tmp163_;
						_tmp165_ = _tmp164_;
						_tmp166_ = gxml_dom_html_collection_item (_tmp165_, i);
						_tmp167_ = _tmp166_;
						_g_object_unref0 (_tmp165_);
						_g_object_unref0 (_tmp162_);
						child = _tmp167_;
						_tmp168_ = child;
						if (_tmp168_ == element) {
							result = TRUE;
							_g_object_unref0 (child);
							return result;
						}
						_g_object_unref0 (child);
					}
				}
			}
			result = FALSE;
			return result;
		}
		_tmp169_ = gxml_css_selector_get_value (selector);
		_tmp170_ = _tmp169_;
		index = atoi (_tmp170_) - 1;
		_tmp171_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
		_tmp172_ = _tmp171_;
		_tmp173_ = _tmp172_;
		_tmp174_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp173_);
		_tmp175_ = _tmp174_;
		_tmp176_ = _tmp175_;
		_tmp177_ = gxml_dom_html_collection_get_length (_tmp176_);
		_tmp178_ = _tmp177_;
		_tmp179_ = index >= _tmp178_;
		_g_object_unref0 (_tmp176_);
		_g_object_unref0 (_tmp173_);
		if (_tmp179_) {
			result = FALSE;
			return result;
		}
		_tmp180_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
		_tmp181_ = _tmp180_;
		_tmp182_ = _tmp181_;
		_tmp183_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp182_);
		_tmp184_ = _tmp183_;
		_tmp185_ = _tmp184_;
		_tmp186_ = gxml_dom_html_collection_item (_tmp185_, index);
		_tmp187_ = _tmp186_;
		_tmp188_ = element == _tmp187_;
		_g_object_unref0 (_tmp187_);
		_g_object_unref0 (_tmp185_);
		_g_object_unref0 (_tmp182_);
		result = _tmp188_;
		return result;
	}
	_tmp189_ = gxml_css_selector_get_name (selector);
	_tmp190_ = _tmp189_;
	if (g_strcmp0 (_tmp190_, "nth-last-child") == 0) {
		GXmlDomElement* _tmp191_;
		GXmlDomElement* _tmp192_;
		GXmlDomElement* _tmp193_;
		gboolean _tmp194_;
		gboolean _tmp195_ = FALSE;
		const gchar* _tmp196_;
		const gchar* _tmp197_;
		gint index = 0;
		const gchar* _tmp230_;
		const gchar* _tmp231_;
		GXmlDomElement* _tmp232_;
		GXmlDomElement* _tmp233_;
		GXmlDomElement* _tmp234_;
		GXmlDomHTMLCollection* _tmp235_;
		GXmlDomHTMLCollection* _tmp236_;
		GXmlDomHTMLCollection* _tmp237_;
		gint _tmp238_;
		gint _tmp239_;
		gboolean _tmp240_;
		GXmlDomElement* _tmp241_;
		GXmlDomElement* _tmp242_;
		GXmlDomElement* _tmp243_;
		GXmlDomHTMLCollection* _tmp244_;
		GXmlDomHTMLCollection* _tmp245_;
		GXmlDomHTMLCollection* _tmp246_;
		GXmlDomElement* _tmp247_;
		GXmlDomElement* _tmp248_;
		GXmlDomElement* _tmp249_;
		GXmlDomHTMLCollection* _tmp250_;
		GXmlDomHTMLCollection* _tmp251_;
		GXmlDomHTMLCollection* _tmp252_;
		gint _tmp253_;
		gint _tmp254_;
		GXmlDomElement* _tmp255_;
		GXmlDomElement* _tmp256_;
		gboolean _tmp257_;
		_tmp191_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
		_tmp192_ = _tmp191_;
		_tmp193_ = _tmp192_;
		_tmp194_ = _tmp193_ == NULL;
		_g_object_unref0 (_tmp193_);
		if (_tmp194_) {
			result = FALSE;
			return result;
		}
		_tmp196_ = gxml_css_selector_get_value (selector);
		_tmp197_ = _tmp196_;
		if (g_strcmp0 (_tmp197_, "even") == 0) {
			_tmp195_ = TRUE;
		} else {
			const gchar* _tmp198_;
			const gchar* _tmp199_;
			_tmp198_ = gxml_css_selector_get_value (selector);
			_tmp199_ = _tmp198_;
			_tmp195_ = g_strcmp0 (_tmp199_, "odd") == 0;
		}
		if (_tmp195_) {
			{
				gint _tmp200_ = 0;
				const gchar* _tmp201_;
				const gchar* _tmp202_;
				gint i = 0;
				_tmp201_ = gxml_css_selector_get_value (selector);
				_tmp202_ = _tmp201_;
				if (g_strcmp0 (_tmp202_, "even") == 0) {
					_tmp200_ = 1;
				} else {
					_tmp200_ = 0;
				}
				i = _tmp200_;
				{
					gboolean _tmp203_ = FALSE;
					_tmp203_ = TRUE;
					while (TRUE) {
						GXmlDomElement* _tmp204_;
						GXmlDomElement* _tmp205_;
						GXmlDomElement* _tmp206_;
						GXmlDomHTMLCollection* _tmp207_;
						GXmlDomHTMLCollection* _tmp208_;
						GXmlDomHTMLCollection* _tmp209_;
						gint _tmp210_;
						gint _tmp211_;
						gboolean _tmp212_;
						GXmlDomElement* child = NULL;
						GXmlDomElement* _tmp213_;
						GXmlDomElement* _tmp214_;
						GXmlDomElement* _tmp215_;
						GXmlDomHTMLCollection* _tmp216_;
						GXmlDomHTMLCollection* _tmp217_;
						GXmlDomHTMLCollection* _tmp218_;
						GXmlDomElement* _tmp219_;
						GXmlDomElement* _tmp220_;
						GXmlDomElement* _tmp221_;
						GXmlDomHTMLCollection* _tmp222_;
						GXmlDomHTMLCollection* _tmp223_;
						GXmlDomHTMLCollection* _tmp224_;
						gint _tmp225_;
						gint _tmp226_;
						GXmlDomElement* _tmp227_;
						GXmlDomElement* _tmp228_;
						GXmlDomElement* _tmp229_;
						if (!_tmp203_) {
							i = i + 2;
						}
						_tmp203_ = FALSE;
						_tmp204_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
						_tmp205_ = _tmp204_;
						_tmp206_ = _tmp205_;
						_tmp207_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp206_);
						_tmp208_ = _tmp207_;
						_tmp209_ = _tmp208_;
						_tmp210_ = gxml_dom_html_collection_get_length (_tmp209_);
						_tmp211_ = _tmp210_;
						_tmp212_ = !(i < _tmp211_);
						_g_object_unref0 (_tmp209_);
						_g_object_unref0 (_tmp206_);
						if (_tmp212_) {
							break;
						}
						_tmp213_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
						_tmp214_ = _tmp213_;
						_tmp215_ = _tmp214_;
						_tmp216_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp215_);
						_tmp217_ = _tmp216_;
						_tmp218_ = _tmp217_;
						_tmp219_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
						_tmp220_ = _tmp219_;
						_tmp221_ = _tmp220_;
						_tmp222_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp221_);
						_tmp223_ = _tmp222_;
						_tmp224_ = _tmp223_;
						_tmp225_ = gxml_dom_html_collection_get_length (_tmp224_);
						_tmp226_ = _tmp225_;
						_tmp227_ = gxml_dom_html_collection_item (_tmp218_, (_tmp226_ - 1) - i);
						_tmp228_ = _tmp227_;
						_g_object_unref0 (_tmp224_);
						_g_object_unref0 (_tmp221_);
						_g_object_unref0 (_tmp218_);
						_g_object_unref0 (_tmp215_);
						child = _tmp228_;
						_tmp229_ = child;
						if (_tmp229_ == element) {
							result = TRUE;
							_g_object_unref0 (child);
							return result;
						}
						_g_object_unref0 (child);
					}
				}
			}
			result = FALSE;
			return result;
		}
		_tmp230_ = gxml_css_selector_get_value (selector);
		_tmp231_ = _tmp230_;
		index = atoi (_tmp231_) - 1;
		_tmp232_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
		_tmp233_ = _tmp232_;
		_tmp234_ = _tmp233_;
		_tmp235_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp234_);
		_tmp236_ = _tmp235_;
		_tmp237_ = _tmp236_;
		_tmp238_ = gxml_dom_html_collection_get_length (_tmp237_);
		_tmp239_ = _tmp238_;
		_tmp240_ = index >= _tmp239_;
		_g_object_unref0 (_tmp237_);
		_g_object_unref0 (_tmp234_);
		if (_tmp240_) {
			result = FALSE;
			return result;
		}
		_tmp241_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
		_tmp242_ = _tmp241_;
		_tmp243_ = _tmp242_;
		_tmp244_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp243_);
		_tmp245_ = _tmp244_;
		_tmp246_ = _tmp245_;
		_tmp247_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
		_tmp248_ = _tmp247_;
		_tmp249_ = _tmp248_;
		_tmp250_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp249_);
		_tmp251_ = _tmp250_;
		_tmp252_ = _tmp251_;
		_tmp253_ = gxml_dom_html_collection_get_length (_tmp252_);
		_tmp254_ = _tmp253_;
		_tmp255_ = gxml_dom_html_collection_item (_tmp246_, (_tmp254_ - 1) - index);
		_tmp256_ = _tmp255_;
		_tmp257_ = element == _tmp256_;
		_g_object_unref0 (_tmp256_);
		_g_object_unref0 (_tmp252_);
		_g_object_unref0 (_tmp249_);
		_g_object_unref0 (_tmp246_);
		_g_object_unref0 (_tmp243_);
		result = _tmp257_;
		return result;
	}
	_tmp258_ = gxml_css_selector_get_name (selector);
	_tmp259_ = _tmp258_;
	if (g_strcmp0 (_tmp259_, "nth-of-type") == 0) {
		GXmlDomElement* _tmp260_;
		GXmlDomElement* _tmp261_;
		GXmlDomElement* _tmp262_;
		gboolean _tmp263_;
		GeeArrayList* list = NULL;
		GeeArrayList* _tmp264_;
		gboolean _tmp286_ = FALSE;
		const gchar* _tmp287_;
		const gchar* _tmp288_;
		gint index = 0;
		const gchar* _tmp301_;
		const gchar* _tmp302_;
		GeeArrayList* _tmp303_;
		gint _tmp304_;
		gint _tmp305_;
		GeeArrayList* _tmp306_;
		gpointer _tmp307_;
		GXmlDomElement* _tmp308_;
		gboolean _tmp309_;
		_tmp260_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
		_tmp261_ = _tmp260_;
		_tmp262_ = _tmp261_;
		_tmp263_ = _tmp262_ == NULL;
		_g_object_unref0 (_tmp262_);
		if (_tmp263_) {
			result = FALSE;
			return result;
		}
		_tmp264_ = gee_array_list_new (GXML_TYPE_DOM_ELEMENT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
		list = _tmp264_;
		{
			GXmlDomHTMLCollection* _child_list = NULL;
			GXmlDomElement* _tmp265_;
			GXmlDomElement* _tmp266_;
			GXmlDomElement* _tmp267_;
			GXmlDomHTMLCollection* _tmp268_;
			GXmlDomHTMLCollection* _tmp269_;
			GXmlDomHTMLCollection* _tmp270_;
			gint _child_size = 0;
			GXmlDomHTMLCollection* _tmp271_;
			gint _tmp272_;
			gint _tmp273_;
			gint _child_index = 0;
			_tmp265_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
			_tmp266_ = _tmp265_;
			_tmp267_ = _tmp266_;
			_tmp268_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp267_);
			_tmp269_ = _tmp268_;
			_tmp270_ = _tmp269_;
			_g_object_unref0 (_tmp267_);
			_child_list = _tmp270_;
			_tmp271_ = _child_list;
			_tmp272_ = gee_collection_get_size ((GeeCollection*) _tmp271_);
			_tmp273_ = _tmp272_;
			_child_size = _tmp273_;
			_child_index = -1;
			while (TRUE) {
				GXmlDomElement* child = NULL;
				GXmlDomHTMLCollection* _tmp274_;
				gpointer _tmp275_;
				GXmlDomElement* _tmp276_;
				gchar* _tmp277_;
				gchar* _tmp278_;
				gchar* _tmp279_;
				gchar* _tmp280_;
				gchar* _tmp281_;
				gchar* _tmp282_;
				gboolean _tmp283_;
				_child_index = _child_index + 1;
				if (!(_child_index < _child_size)) {
					break;
				}
				_tmp274_ = _child_list;
				_tmp275_ = gee_list_get ((GeeList*) _tmp274_, _child_index);
				child = (GXmlDomElement*) _tmp275_;
				_tmp276_ = child;
				_tmp277_ = gxml_dom_element_get_local_name (_tmp276_);
				_tmp278_ = _tmp277_;
				_tmp279_ = _tmp278_;
				_tmp280_ = gxml_dom_element_get_local_name (element);
				_tmp281_ = _tmp280_;
				_tmp282_ = _tmp281_;
				_tmp283_ = g_strcmp0 (_tmp279_, _tmp282_) == 0;
				_g_free0 (_tmp282_);
				_g_free0 (_tmp279_);
				if (_tmp283_) {
					GeeArrayList* _tmp284_;
					GXmlDomElement* _tmp285_;
					_tmp284_ = list;
					_tmp285_ = child;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp284_, _tmp285_);
				}
				_g_object_unref0 (child);
			}
			_g_object_unref0 (_child_list);
		}
		_tmp287_ = gxml_css_selector_get_value (selector);
		_tmp288_ = _tmp287_;
		if (g_strcmp0 (_tmp288_, "even") == 0) {
			_tmp286_ = TRUE;
		} else {
			const gchar* _tmp289_;
			const gchar* _tmp290_;
			_tmp289_ = gxml_css_selector_get_value (selector);
			_tmp290_ = _tmp289_;
			_tmp286_ = g_strcmp0 (_tmp290_, "odd") == 0;
		}
		if (_tmp286_) {
			{
				gint _tmp291_ = 0;
				const gchar* _tmp292_;
				const gchar* _tmp293_;
				gint i = 0;
				_tmp292_ = gxml_css_selector_get_value (selector);
				_tmp293_ = _tmp292_;
				if (g_strcmp0 (_tmp293_, "even") == 0) {
					_tmp291_ = 1;
				} else {
					_tmp291_ = 0;
				}
				i = _tmp291_;
				{
					gboolean _tmp294_ = FALSE;
					_tmp294_ = TRUE;
					while (TRUE) {
						GeeArrayList* _tmp295_;
						gint _tmp296_;
						gint _tmp297_;
						GXmlDomElement* child = NULL;
						GeeArrayList* _tmp298_;
						gpointer _tmp299_;
						GXmlDomElement* _tmp300_;
						if (!_tmp294_) {
							i = i + 2;
						}
						_tmp294_ = FALSE;
						_tmp295_ = list;
						_tmp296_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp295_);
						_tmp297_ = _tmp296_;
						if (!(i < _tmp297_)) {
							break;
						}
						_tmp298_ = list;
						_tmp299_ = gee_abstract_list_get ((GeeAbstractList*) _tmp298_, i);
						child = (GXmlDomElement*) _tmp299_;
						_tmp300_ = child;
						if (_tmp300_ == element) {
							result = TRUE;
							_g_object_unref0 (child);
							_g_object_unref0 (list);
							return result;
						}
						_g_object_unref0 (child);
					}
				}
			}
			result = FALSE;
			_g_object_unref0 (list);
			return result;
		}
		_tmp301_ = gxml_css_selector_get_value (selector);
		_tmp302_ = _tmp301_;
		index = atoi (_tmp302_) - 1;
		_tmp303_ = list;
		_tmp304_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp303_);
		_tmp305_ = _tmp304_;
		if (index >= _tmp305_) {
			result = FALSE;
			_g_object_unref0 (list);
			return result;
		}
		_tmp306_ = list;
		_tmp307_ = gee_abstract_list_get ((GeeAbstractList*) _tmp306_, index);
		_tmp308_ = (GXmlDomElement*) _tmp307_;
		_tmp309_ = _tmp308_ == element;
		_g_object_unref0 (_tmp308_);
		result = _tmp309_;
		_g_object_unref0 (list);
		return result;
	}
	_tmp310_ = gxml_css_selector_get_name (selector);
	_tmp311_ = _tmp310_;
	if (g_strcmp0 (_tmp311_, "nth-last-of-type") == 0) {
		GXmlDomElement* _tmp312_;
		GXmlDomElement* _tmp313_;
		GXmlDomElement* _tmp314_;
		gboolean _tmp315_;
		GeeArrayList* list = NULL;
		GeeArrayList* _tmp316_;
		gboolean _tmp338_ = FALSE;
		const gchar* _tmp339_;
		const gchar* _tmp340_;
		gint index = 0;
		const gchar* _tmp356_;
		const gchar* _tmp357_;
		GeeArrayList* _tmp358_;
		gint _tmp359_;
		gint _tmp360_;
		GeeArrayList* _tmp361_;
		GeeArrayList* _tmp362_;
		gint _tmp363_;
		gint _tmp364_;
		gpointer _tmp365_;
		GXmlDomElement* _tmp366_;
		gboolean _tmp367_;
		_tmp312_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
		_tmp313_ = _tmp312_;
		_tmp314_ = _tmp313_;
		_tmp315_ = _tmp314_ == NULL;
		_g_object_unref0 (_tmp314_);
		if (_tmp315_) {
			result = FALSE;
			return result;
		}
		_tmp316_ = gee_array_list_new (GXML_TYPE_DOM_ELEMENT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
		list = _tmp316_;
		{
			GXmlDomHTMLCollection* _child_list = NULL;
			GXmlDomElement* _tmp317_;
			GXmlDomElement* _tmp318_;
			GXmlDomElement* _tmp319_;
			GXmlDomHTMLCollection* _tmp320_;
			GXmlDomHTMLCollection* _tmp321_;
			GXmlDomHTMLCollection* _tmp322_;
			gint _child_size = 0;
			GXmlDomHTMLCollection* _tmp323_;
			gint _tmp324_;
			gint _tmp325_;
			gint _child_index = 0;
			_tmp317_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
			_tmp318_ = _tmp317_;
			_tmp319_ = _tmp318_;
			_tmp320_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) _tmp319_);
			_tmp321_ = _tmp320_;
			_tmp322_ = _tmp321_;
			_g_object_unref0 (_tmp319_);
			_child_list = _tmp322_;
			_tmp323_ = _child_list;
			_tmp324_ = gee_collection_get_size ((GeeCollection*) _tmp323_);
			_tmp325_ = _tmp324_;
			_child_size = _tmp325_;
			_child_index = -1;
			while (TRUE) {
				GXmlDomElement* child = NULL;
				GXmlDomHTMLCollection* _tmp326_;
				gpointer _tmp327_;
				GXmlDomElement* _tmp328_;
				gchar* _tmp329_;
				gchar* _tmp330_;
				gchar* _tmp331_;
				gchar* _tmp332_;
				gchar* _tmp333_;
				gchar* _tmp334_;
				gboolean _tmp335_;
				_child_index = _child_index + 1;
				if (!(_child_index < _child_size)) {
					break;
				}
				_tmp326_ = _child_list;
				_tmp327_ = gee_list_get ((GeeList*) _tmp326_, _child_index);
				child = (GXmlDomElement*) _tmp327_;
				_tmp328_ = child;
				_tmp329_ = gxml_dom_element_get_local_name (_tmp328_);
				_tmp330_ = _tmp329_;
				_tmp331_ = _tmp330_;
				_tmp332_ = gxml_dom_element_get_local_name (element);
				_tmp333_ = _tmp332_;
				_tmp334_ = _tmp333_;
				_tmp335_ = g_strcmp0 (_tmp331_, _tmp334_) == 0;
				_g_free0 (_tmp334_);
				_g_free0 (_tmp331_);
				if (_tmp335_) {
					GeeArrayList* _tmp336_;
					GXmlDomElement* _tmp337_;
					_tmp336_ = list;
					_tmp337_ = child;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp336_, _tmp337_);
				}
				_g_object_unref0 (child);
			}
			_g_object_unref0 (_child_list);
		}
		_tmp339_ = gxml_css_selector_get_value (selector);
		_tmp340_ = _tmp339_;
		if (g_strcmp0 (_tmp340_, "even") == 0) {
			_tmp338_ = TRUE;
		} else {
			const gchar* _tmp341_;
			const gchar* _tmp342_;
			_tmp341_ = gxml_css_selector_get_value (selector);
			_tmp342_ = _tmp341_;
			_tmp338_ = g_strcmp0 (_tmp342_, "odd") == 0;
		}
		if (_tmp338_) {
			{
				gint _tmp343_ = 0;
				const gchar* _tmp344_;
				const gchar* _tmp345_;
				gint i = 0;
				_tmp344_ = gxml_css_selector_get_value (selector);
				_tmp345_ = _tmp344_;
				if (g_strcmp0 (_tmp345_, "even") == 0) {
					_tmp343_ = 1;
				} else {
					_tmp343_ = 0;
				}
				i = _tmp343_;
				{
					gboolean _tmp346_ = FALSE;
					_tmp346_ = TRUE;
					while (TRUE) {
						GeeArrayList* _tmp347_;
						gint _tmp348_;
						gint _tmp349_;
						GXmlDomElement* child = NULL;
						GeeArrayList* _tmp350_;
						GeeArrayList* _tmp351_;
						gint _tmp352_;
						gint _tmp353_;
						gpointer _tmp354_;
						GXmlDomElement* _tmp355_;
						if (!_tmp346_) {
							i = i + 2;
						}
						_tmp346_ = FALSE;
						_tmp347_ = list;
						_tmp348_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp347_);
						_tmp349_ = _tmp348_;
						if (!(i < _tmp349_)) {
							break;
						}
						_tmp350_ = list;
						_tmp351_ = list;
						_tmp352_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp351_);
						_tmp353_ = _tmp352_;
						_tmp354_ = gee_abstract_list_get ((GeeAbstractList*) _tmp350_, (_tmp353_ - 1) - i);
						child = (GXmlDomElement*) _tmp354_;
						_tmp355_ = child;
						if (_tmp355_ == element) {
							result = TRUE;
							_g_object_unref0 (child);
							_g_object_unref0 (list);
							return result;
						}
						_g_object_unref0 (child);
					}
				}
			}
			result = FALSE;
			_g_object_unref0 (list);
			return result;
		}
		_tmp356_ = gxml_css_selector_get_value (selector);
		_tmp357_ = _tmp356_;
		index = atoi (_tmp357_) - 1;
		_tmp358_ = list;
		_tmp359_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp358_);
		_tmp360_ = _tmp359_;
		if (index >= _tmp360_) {
			result = FALSE;
			_g_object_unref0 (list);
			return result;
		}
		_tmp361_ = list;
		_tmp362_ = list;
		_tmp363_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp362_);
		_tmp364_ = _tmp363_;
		_tmp365_ = gee_abstract_list_get ((GeeAbstractList*) _tmp361_, (_tmp364_ - 1) - index);
		_tmp366_ = (GXmlDomElement*) _tmp365_;
		_tmp367_ = _tmp366_ == element;
		_g_object_unref0 (_tmp366_);
		if (_tmp367_) {
			result = TRUE;
			_g_object_unref0 (list);
			return result;
		}
		_g_object_unref0 (list);
	}
	result = FALSE;
	return result;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static gint
string_index_of (const gchar* self,
                 const gchar* needle,
                 gint start_index)
{
	gint result = 0;
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (needle != NULL, 0);
	_tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

static gint
string_last_index_of (const gchar* self,
                      const gchar* needle,
                      gint start_index)
{
	gint result = 0;
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (needle != NULL, 0);
	_tmp0_ = g_strrstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

static gboolean
gxml_css_selector_parser_match_attribute (GXmlDomElement* element,
                                          GXmlCssAttributeSelector* selector,
                                          GError** error)
{
	gboolean result = FALSE;
	GeeArrayList* list = NULL;
	GeeArrayList* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GeeArrayList* _tmp149_;
	gint _tmp150_;
	gint _tmp151_;
	g_return_val_if_fail (element != NULL, FALSE);
	g_return_val_if_fail (selector != NULL, FALSE);
	_tmp0_ = gee_array_list_new (GXML_TYPE_DOM_NODE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	list = _tmp0_;
	_tmp1_ = gxml_css_attribute_selector_get_prefix (selector);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = gxml_css_attribute_selector_get_prefix (selector);
		_tmp4_ = _tmp3_;
		if (g_strcmp0 (_tmp4_, "") == 0) {
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp5_ = FALSE;
					_tmp5_ = TRUE;
					while (TRUE) {
						GXmlDomNamedNodeMap* _tmp7_;
						GXmlDomNamedNodeMap* _tmp8_;
						GXmlDomNamedNodeMap* _tmp9_;
						gint _tmp10_;
						gint _tmp11_;
						gboolean _tmp12_;
						GXmlDomNamedNodeMap* _tmp13_;
						GXmlDomNamedNodeMap* _tmp14_;
						GXmlDomNamedNodeMap* _tmp15_;
						GXmlDomNode* _tmp16_;
						GXmlDomNode* _tmp17_;
						gboolean _tmp18_;
						gboolean _tmp19_ = FALSE;
						GXmlDomNamedNodeMap* _tmp20_;
						GXmlDomNamedNodeMap* _tmp21_;
						GXmlDomNamedNodeMap* _tmp22_;
						GXmlDomNode* _tmp23_;
						GXmlDomNode* _tmp24_;
						gchar* _tmp25_;
						gchar* _tmp26_;
						gchar* _tmp27_;
						const gchar* _tmp28_;
						const gchar* _tmp29_;
						gboolean _tmp30_;
						if (!_tmp5_) {
							gint _tmp6_;
							_tmp6_ = i;
							i = _tmp6_ + 1;
						}
						_tmp5_ = FALSE;
						_tmp7_ = gxml_dom_element_get_attributes (element);
						_tmp8_ = _tmp7_;
						_tmp9_ = _tmp8_;
						_tmp10_ = gxml_dom_named_node_map_get_length (_tmp9_);
						_tmp11_ = _tmp10_;
						_tmp12_ = !(i < _tmp11_);
						_g_object_unref0 (_tmp9_);
						if (_tmp12_) {
							break;
						}
						_tmp13_ = gxml_dom_element_get_attributes (element);
						_tmp14_ = _tmp13_;
						_tmp15_ = _tmp14_;
						_tmp16_ = gxml_dom_named_node_map_item (_tmp15_, i);
						_tmp17_ = _tmp16_;
						_tmp18_ = _tmp17_ == NULL;
						_g_object_unref0 (_tmp17_);
						_g_object_unref0 (_tmp15_);
						if (_tmp18_) {
							continue;
						}
						_tmp20_ = gxml_dom_element_get_attributes (element);
						_tmp21_ = _tmp20_;
						_tmp22_ = _tmp21_;
						_tmp23_ = gxml_dom_named_node_map_item (_tmp22_, i);
						_tmp24_ = _tmp23_;
						_tmp25_ = gxml_dom_node_get_node_name (_tmp24_);
						_tmp26_ = _tmp25_;
						_tmp27_ = _tmp26_;
						_tmp28_ = gxml_css_attribute_selector_get_local_name (selector);
						_tmp29_ = _tmp28_;
						_tmp30_ = g_strcmp0 (_tmp27_, _tmp29_) == 0;
						_g_free0 (_tmp27_);
						_g_object_unref0 (_tmp24_);
						_g_object_unref0 (_tmp22_);
						if (_tmp30_) {
							_tmp19_ = TRUE;
						} else {
							const gchar* _tmp31_;
							const gchar* _tmp32_;
							_tmp31_ = gxml_css_attribute_selector_get_local_name (selector);
							_tmp32_ = _tmp31_;
							_tmp19_ = g_strcmp0 (_tmp32_, "*") == 0;
						}
						if (_tmp19_) {
							GeeArrayList* _tmp33_;
							GXmlDomNamedNodeMap* _tmp34_;
							GXmlDomNamedNodeMap* _tmp35_;
							GXmlDomNamedNodeMap* _tmp36_;
							GXmlDomNode* _tmp37_;
							GXmlDomNode* _tmp38_;
							_tmp33_ = list;
							_tmp34_ = gxml_dom_element_get_attributes (element);
							_tmp35_ = _tmp34_;
							_tmp36_ = _tmp35_;
							_tmp37_ = gxml_dom_named_node_map_item (_tmp36_, i);
							_tmp38_ = _tmp37_;
							gee_abstract_collection_add ((GeeAbstractCollection*) _tmp33_, _tmp38_);
							_g_object_unref0 (_tmp38_);
							_g_object_unref0 (_tmp36_);
						}
					}
				}
			}
		} else {
			const gchar* _tmp39_;
			const gchar* _tmp40_;
			_tmp39_ = gxml_css_attribute_selector_get_prefix (selector);
			_tmp40_ = _tmp39_;
			if (g_strcmp0 (_tmp40_, "*") == 0) {
				{
					gint i = 0;
					i = 0;
					{
						gboolean _tmp41_ = FALSE;
						_tmp41_ = TRUE;
						while (TRUE) {
							GXmlDomNamedNodeMap* _tmp43_;
							GXmlDomNamedNodeMap* _tmp44_;
							GXmlDomNamedNodeMap* _tmp45_;
							gint _tmp46_;
							gint _tmp47_;
							gboolean _tmp48_;
							GXmlDomNamedNodeMap* _tmp49_;
							GXmlDomNamedNodeMap* _tmp50_;
							GXmlDomNamedNodeMap* _tmp51_;
							GXmlDomNode* _tmp52_;
							GXmlDomNode* _tmp53_;
							gboolean _tmp54_;
							gchar* attr_name = NULL;
							GXmlDomNamedNodeMap* _tmp55_;
							GXmlDomNamedNodeMap* _tmp56_;
							GXmlDomNamedNodeMap* _tmp57_;
							GXmlDomNode* _tmp58_;
							GXmlDomNode* _tmp59_;
							gchar* _tmp60_;
							gchar* _tmp61_;
							gchar* _tmp62_;
							gboolean _tmp63_ = FALSE;
							const gchar* _tmp64_;
							gchar** _tmp65_;
							gchar** _tmp66_;
							gchar** _tmp67_;
							gint _tmp67__length1;
							gboolean _tmp68_;
							if (!_tmp41_) {
								gint _tmp42_;
								_tmp42_ = i;
								i = _tmp42_ + 1;
							}
							_tmp41_ = FALSE;
							_tmp43_ = gxml_dom_element_get_attributes (element);
							_tmp44_ = _tmp43_;
							_tmp45_ = _tmp44_;
							_tmp46_ = gxml_dom_named_node_map_get_length (_tmp45_);
							_tmp47_ = _tmp46_;
							_tmp48_ = !(i < _tmp47_);
							_g_object_unref0 (_tmp45_);
							if (_tmp48_) {
								break;
							}
							_tmp49_ = gxml_dom_element_get_attributes (element);
							_tmp50_ = _tmp49_;
							_tmp51_ = _tmp50_;
							_tmp52_ = gxml_dom_named_node_map_item (_tmp51_, i);
							_tmp53_ = _tmp52_;
							_tmp54_ = _tmp53_ == NULL;
							_g_object_unref0 (_tmp53_);
							_g_object_unref0 (_tmp51_);
							if (_tmp54_) {
								continue;
							}
							_tmp55_ = gxml_dom_element_get_attributes (element);
							_tmp56_ = _tmp55_;
							_tmp57_ = _tmp56_;
							_tmp58_ = gxml_dom_named_node_map_item (_tmp57_, i);
							_tmp59_ = _tmp58_;
							_tmp60_ = gxml_dom_node_get_node_name (_tmp59_);
							_tmp61_ = _tmp60_;
							_tmp62_ = _tmp61_;
							_g_object_unref0 (_tmp59_);
							_g_object_unref0 (_tmp57_);
							attr_name = _tmp62_;
							_tmp64_ = attr_name;
							_tmp66_ = _tmp65_ = g_strsplit (_tmp64_, ":", 0);
							_tmp67_ = _tmp66_;
							_tmp67__length1 = _vala_array_length (_tmp65_);
							_tmp68_ = _vala_array_length (_tmp65_) == 2;
							_tmp67_ = (_vala_array_free (_tmp67_, _tmp67__length1, (GDestroyNotify) g_free), NULL);
							if (_tmp68_) {
								gboolean _tmp69_ = FALSE;
								const gchar* _tmp70_;
								gchar** _tmp71_;
								gchar** _tmp72_;
								gchar** _tmp73_;
								gint _tmp73__length1;
								const gchar* _tmp74_;
								const gchar* _tmp75_;
								const gchar* _tmp76_;
								gboolean _tmp77_;
								_tmp70_ = attr_name;
								_tmp72_ = _tmp71_ = g_strsplit (_tmp70_, ":", 0);
								_tmp73_ = _tmp72_;
								_tmp73__length1 = _vala_array_length (_tmp71_);
								_tmp74_ = _tmp73_[1];
								_tmp75_ = gxml_css_attribute_selector_get_local_name (selector);
								_tmp76_ = _tmp75_;
								_tmp77_ = g_strcmp0 (_tmp74_, _tmp76_) == 0;
								_tmp73_ = (_vala_array_free (_tmp73_, _tmp73__length1, (GDestroyNotify) g_free), NULL);
								if (_tmp77_) {
									_tmp69_ = TRUE;
								} else {
									const gchar* _tmp78_;
									const gchar* _tmp79_;
									_tmp78_ = gxml_css_attribute_selector_get_local_name (selector);
									_tmp79_ = _tmp78_;
									_tmp69_ = g_strcmp0 (_tmp79_, "*") == 0;
								}
								_tmp63_ = _tmp69_;
							} else {
								_tmp63_ = FALSE;
							}
							if (_tmp63_) {
								GeeArrayList* _tmp80_;
								GXmlDomNamedNodeMap* _tmp81_;
								GXmlDomNamedNodeMap* _tmp82_;
								GXmlDomNamedNodeMap* _tmp83_;
								GXmlDomNode* _tmp84_;
								GXmlDomNode* _tmp85_;
								_tmp80_ = list;
								_tmp81_ = gxml_dom_element_get_attributes (element);
								_tmp82_ = _tmp81_;
								_tmp83_ = _tmp82_;
								_tmp84_ = gxml_dom_named_node_map_item (_tmp83_, i);
								_tmp85_ = _tmp84_;
								gee_abstract_collection_add ((GeeAbstractCollection*) _tmp80_, _tmp85_);
								_g_object_unref0 (_tmp85_);
								_g_object_unref0 (_tmp83_);
							}
							_g_free0 (attr_name);
						}
					}
				}
			} else {
				{
					gint i = 0;
					i = 0;
					{
						gboolean _tmp86_ = FALSE;
						_tmp86_ = TRUE;
						while (TRUE) {
							GXmlDomNamedNodeMap* _tmp88_;
							GXmlDomNamedNodeMap* _tmp89_;
							GXmlDomNamedNodeMap* _tmp90_;
							gint _tmp91_;
							gint _tmp92_;
							gboolean _tmp93_;
							GXmlDomNamedNodeMap* _tmp94_;
							GXmlDomNamedNodeMap* _tmp95_;
							GXmlDomNamedNodeMap* _tmp96_;
							GXmlDomNode* _tmp97_;
							GXmlDomNode* _tmp98_;
							gboolean _tmp99_;
							gchar* attr_name = NULL;
							GXmlDomNamedNodeMap* _tmp100_;
							GXmlDomNamedNodeMap* _tmp101_;
							GXmlDomNamedNodeMap* _tmp102_;
							GXmlDomNode* _tmp103_;
							GXmlDomNode* _tmp104_;
							gchar* _tmp105_;
							gchar* _tmp106_;
							gchar* _tmp107_;
							gboolean _tmp108_ = FALSE;
							gboolean _tmp109_ = FALSE;
							const gchar* _tmp110_;
							gchar** _tmp111_;
							gchar** _tmp112_;
							gchar** _tmp113_;
							gint _tmp113__length1;
							gboolean _tmp114_;
							if (!_tmp86_) {
								gint _tmp87_;
								_tmp87_ = i;
								i = _tmp87_ + 1;
							}
							_tmp86_ = FALSE;
							_tmp88_ = gxml_dom_element_get_attributes (element);
							_tmp89_ = _tmp88_;
							_tmp90_ = _tmp89_;
							_tmp91_ = gxml_dom_named_node_map_get_length (_tmp90_);
							_tmp92_ = _tmp91_;
							_tmp93_ = !(i < _tmp92_);
							_g_object_unref0 (_tmp90_);
							if (_tmp93_) {
								break;
							}
							_tmp94_ = gxml_dom_element_get_attributes (element);
							_tmp95_ = _tmp94_;
							_tmp96_ = _tmp95_;
							_tmp97_ = gxml_dom_named_node_map_item (_tmp96_, i);
							_tmp98_ = _tmp97_;
							_tmp99_ = _tmp98_ == NULL;
							_g_object_unref0 (_tmp98_);
							_g_object_unref0 (_tmp96_);
							if (_tmp99_) {
								continue;
							}
							_tmp100_ = gxml_dom_element_get_attributes (element);
							_tmp101_ = _tmp100_;
							_tmp102_ = _tmp101_;
							_tmp103_ = gxml_dom_named_node_map_item (_tmp102_, i);
							_tmp104_ = _tmp103_;
							_tmp105_ = gxml_dom_node_get_node_name (_tmp104_);
							_tmp106_ = _tmp105_;
							_tmp107_ = _tmp106_;
							_g_object_unref0 (_tmp104_);
							_g_object_unref0 (_tmp102_);
							attr_name = _tmp107_;
							_tmp110_ = attr_name;
							_tmp112_ = _tmp111_ = g_strsplit (_tmp110_, ":", 0);
							_tmp113_ = _tmp112_;
							_tmp113__length1 = _vala_array_length (_tmp111_);
							_tmp114_ = _vala_array_length (_tmp111_) == 2;
							_tmp113_ = (_vala_array_free (_tmp113_, _tmp113__length1, (GDestroyNotify) g_free), NULL);
							if (_tmp114_) {
								const gchar* _tmp115_;
								gchar** _tmp116_;
								gchar** _tmp117_;
								gchar** _tmp118_;
								gint _tmp118__length1;
								const gchar* _tmp119_;
								const gchar* _tmp120_;
								const gchar* _tmp121_;
								_tmp115_ = attr_name;
								_tmp117_ = _tmp116_ = g_strsplit (_tmp115_, ":", 0);
								_tmp118_ = _tmp117_;
								_tmp118__length1 = _vala_array_length (_tmp116_);
								_tmp119_ = _tmp118_[0];
								_tmp120_ = gxml_css_attribute_selector_get_prefix (selector);
								_tmp121_ = _tmp120_;
								_tmp109_ = g_strcmp0 (_tmp119_, _tmp121_) == 0;
								_tmp118_ = (_vala_array_free (_tmp118_, _tmp118__length1, (GDestroyNotify) g_free), NULL);
							} else {
								_tmp109_ = FALSE;
							}
							if (_tmp109_) {
								gboolean _tmp122_ = FALSE;
								const gchar* _tmp123_;
								gchar** _tmp124_;
								gchar** _tmp125_;
								gchar** _tmp126_;
								gint _tmp126__length1;
								const gchar* _tmp127_;
								const gchar* _tmp128_;
								const gchar* _tmp129_;
								gboolean _tmp130_;
								_tmp123_ = attr_name;
								_tmp125_ = _tmp124_ = g_strsplit (_tmp123_, ":", 0);
								_tmp126_ = _tmp125_;
								_tmp126__length1 = _vala_array_length (_tmp124_);
								_tmp127_ = _tmp126_[1];
								_tmp128_ = gxml_css_attribute_selector_get_local_name (selector);
								_tmp129_ = _tmp128_;
								_tmp130_ = g_strcmp0 (_tmp127_, _tmp129_) == 0;
								_tmp126_ = (_vala_array_free (_tmp126_, _tmp126__length1, (GDestroyNotify) g_free), NULL);
								if (_tmp130_) {
									_tmp122_ = TRUE;
								} else {
									const gchar* _tmp131_;
									const gchar* _tmp132_;
									_tmp131_ = gxml_css_attribute_selector_get_local_name (selector);
									_tmp132_ = _tmp131_;
									_tmp122_ = g_strcmp0 (_tmp132_, "*") == 0;
								}
								_tmp108_ = _tmp122_;
							} else {
								_tmp108_ = FALSE;
							}
							if (_tmp108_) {
								GeeArrayList* _tmp133_;
								GXmlDomNamedNodeMap* _tmp134_;
								GXmlDomNamedNodeMap* _tmp135_;
								GXmlDomNamedNodeMap* _tmp136_;
								GXmlDomNode* _tmp137_;
								GXmlDomNode* _tmp138_;
								_tmp133_ = list;
								_tmp134_ = gxml_dom_element_get_attributes (element);
								_tmp135_ = _tmp134_;
								_tmp136_ = _tmp135_;
								_tmp137_ = gxml_dom_named_node_map_item (_tmp136_, i);
								_tmp138_ = _tmp137_;
								gee_abstract_collection_add ((GeeAbstractCollection*) _tmp133_, _tmp138_);
								_g_object_unref0 (_tmp138_);
								_g_object_unref0 (_tmp136_);
							}
							_g_free0 (attr_name);
						}
					}
				}
			}
		}
	} else {
		GXmlDomNode* attr = NULL;
		GXmlDomNamedNodeMap* _tmp139_;
		GXmlDomNamedNodeMap* _tmp140_;
		GXmlDomNamedNodeMap* _tmp141_;
		const gchar* _tmp142_;
		const gchar* _tmp143_;
		GXmlDomNode* _tmp144_;
		GXmlDomNode* _tmp145_;
		GXmlDomNode* _tmp146_;
		_tmp139_ = gxml_dom_element_get_attributes (element);
		_tmp140_ = _tmp139_;
		_tmp141_ = _tmp140_;
		_tmp142_ = gxml_css_attribute_selector_get_local_name (selector);
		_tmp143_ = _tmp142_;
		_tmp144_ = gxml_dom_named_node_map_get_named_item (_tmp141_, _tmp143_);
		_tmp145_ = _tmp144_;
		_g_object_unref0 (_tmp141_);
		attr = _tmp145_;
		_tmp146_ = attr;
		if (_tmp146_ != NULL) {
			GeeArrayList* _tmp147_;
			GXmlDomNode* _tmp148_;
			_tmp147_ = list;
			_tmp148_ = attr;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp147_, _tmp148_);
		}
		_g_object_unref0 (attr);
	}
	_tmp149_ = list;
	_tmp150_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp149_);
	_tmp151_ = _tmp150_;
	if (_tmp151_ == 0) {
		result = FALSE;
		_g_object_unref0 (list);
		return result;
	}
	{
		GeeArrayList* _attr_list = NULL;
		GeeArrayList* _tmp152_;
		GeeArrayList* _tmp153_;
		gint _attr_size = 0;
		GeeArrayList* _tmp154_;
		gint _tmp155_;
		gint _tmp156_;
		gint _attr_index = 0;
		_tmp152_ = list;
		_tmp153_ = _g_object_ref0 (_tmp152_);
		_attr_list = _tmp153_;
		_tmp154_ = _attr_list;
		_tmp155_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp154_);
		_tmp156_ = _tmp155_;
		_attr_size = _tmp156_;
		_attr_index = -1;
		while (TRUE) {
			GXmlDomNode* attr = NULL;
			GeeArrayList* _tmp157_;
			gpointer _tmp158_;
			GXmlCssSelectorType _tmp159_;
			GXmlCssSelectorType _tmp160_;
			gboolean _tmp161_ = FALSE;
			GXmlCssSelectorType _tmp162_;
			GXmlCssSelectorType _tmp163_;
			gboolean _tmp170_ = FALSE;
			gboolean _tmp171_ = FALSE;
			GXmlCssSelectorType _tmp172_;
			GXmlCssSelectorType _tmp173_;
			gboolean _tmp187_ = FALSE;
			gboolean _tmp188_ = FALSE;
			GXmlCssSelectorType _tmp189_;
			GXmlCssSelectorType _tmp190_;
			gboolean _tmp201_ = FALSE;
			gboolean _tmp202_ = FALSE;
			GXmlCssSelectorType _tmp203_;
			GXmlCssSelectorType _tmp204_;
			gboolean _tmp219_ = FALSE;
			gboolean _tmp220_ = FALSE;
			GXmlCssSelectorType _tmp221_;
			GXmlCssSelectorType _tmp222_;
			gboolean _tmp233_ = FALSE;
			gboolean _tmp234_ = FALSE;
			GXmlCssSelectorType _tmp235_;
			GXmlCssSelectorType _tmp236_;
			_attr_index = _attr_index + 1;
			if (!(_attr_index < _attr_size)) {
				break;
			}
			_tmp157_ = _attr_list;
			_tmp158_ = gee_abstract_list_get ((GeeAbstractList*) _tmp157_, _attr_index);
			attr = (GXmlDomNode*) _tmp158_;
			_tmp159_ = gxml_css_selector_get_selector_type ((GXmlCssSelector*) selector);
			_tmp160_ = _tmp159_;
			if (_tmp160_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE) {
				result = TRUE;
				_g_object_unref0 (attr);
				_g_object_unref0 (_attr_list);
				_g_object_unref0 (list);
				return result;
			}
			_tmp162_ = gxml_css_selector_get_selector_type ((GXmlCssSelector*) selector);
			_tmp163_ = _tmp162_;
			if (_tmp163_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_EQUAL) {
				GXmlDomNode* _tmp164_;
				gchar* _tmp165_;
				gchar* _tmp166_;
				gchar* _tmp167_;
				const gchar* _tmp168_;
				const gchar* _tmp169_;
				_tmp164_ = attr;
				_tmp165_ = gxml_dom_node_get_node_value (_tmp164_);
				_tmp166_ = _tmp165_;
				_tmp167_ = _tmp166_;
				_tmp168_ = gxml_css_selector_get_value ((GXmlCssSelector*) selector);
				_tmp169_ = _tmp168_;
				_tmp161_ = g_strcmp0 (_tmp167_, _tmp169_) == 0;
				_g_free0 (_tmp167_);
			} else {
				_tmp161_ = FALSE;
			}
			if (_tmp161_) {
				result = TRUE;
				_g_object_unref0 (attr);
				_g_object_unref0 (_attr_list);
				_g_object_unref0 (list);
				return result;
			}
			_tmp172_ = gxml_css_selector_get_selector_type ((GXmlCssSelector*) selector);
			_tmp173_ = _tmp172_;
			if (_tmp173_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_CONTAINS) {
				GXmlDomNode* _tmp174_;
				gchar* _tmp175_;
				gchar* _tmp176_;
				gchar* _tmp177_;
				_tmp174_ = attr;
				_tmp175_ = gxml_dom_node_get_node_value (_tmp174_);
				_tmp176_ = _tmp175_;
				_tmp177_ = _tmp176_;
				_tmp171_ = _tmp177_ != NULL;
				_g_free0 (_tmp177_);
			} else {
				_tmp171_ = FALSE;
			}
			if (_tmp171_) {
				const gchar* _tmp178_;
				const gchar* _tmp179_;
				GXmlDomNode* _tmp180_;
				gchar* _tmp181_;
				gchar* _tmp182_;
				gchar* _tmp183_;
				gchar** _tmp184_;
				gchar** _tmp185_;
				gchar** _tmp186_;
				gint _tmp186__length1;
				_tmp178_ = gxml_css_selector_get_value ((GXmlCssSelector*) selector);
				_tmp179_ = _tmp178_;
				_tmp180_ = attr;
				_tmp181_ = gxml_dom_node_get_node_value (_tmp180_);
				_tmp182_ = _tmp181_;
				_tmp183_ = _tmp182_;
				_tmp185_ = _tmp184_ = g_strsplit (_tmp183_, " ", 0);
				_tmp186_ = _tmp185_;
				_tmp186__length1 = _vala_array_length (_tmp184_);
				_tmp170_ = _vala_string_array_contains (_tmp186_, _vala_array_length (_tmp184_), _tmp179_);
				_tmp186_ = (_vala_array_free (_tmp186_, _tmp186__length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (_tmp183_);
			} else {
				_tmp170_ = FALSE;
			}
			if (_tmp170_) {
				result = TRUE;
				_g_object_unref0 (attr);
				_g_object_unref0 (_attr_list);
				_g_object_unref0 (list);
				return result;
			}
			_tmp189_ = gxml_css_selector_get_selector_type ((GXmlCssSelector*) selector);
			_tmp190_ = _tmp189_;
			if (_tmp190_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_SUBSTRING) {
				GXmlDomNode* _tmp191_;
				gchar* _tmp192_;
				gchar* _tmp193_;
				gchar* _tmp194_;
				_tmp191_ = attr;
				_tmp192_ = gxml_dom_node_get_node_value (_tmp191_);
				_tmp193_ = _tmp192_;
				_tmp194_ = _tmp193_;
				_tmp188_ = _tmp194_ != NULL;
				_g_free0 (_tmp194_);
			} else {
				_tmp188_ = FALSE;
			}
			if (_tmp188_) {
				GXmlDomNode* _tmp195_;
				gchar* _tmp196_;
				gchar* _tmp197_;
				gchar* _tmp198_;
				const gchar* _tmp199_;
				const gchar* _tmp200_;
				_tmp195_ = attr;
				_tmp196_ = gxml_dom_node_get_node_value (_tmp195_);
				_tmp197_ = _tmp196_;
				_tmp198_ = _tmp197_;
				_tmp199_ = gxml_css_selector_get_value ((GXmlCssSelector*) selector);
				_tmp200_ = _tmp199_;
				_tmp187_ = string_contains (_tmp198_, _tmp200_);
				_g_free0 (_tmp198_);
			} else {
				_tmp187_ = FALSE;
			}
			if (_tmp187_) {
				result = TRUE;
				_g_object_unref0 (attr);
				_g_object_unref0 (_attr_list);
				_g_object_unref0 (list);
				return result;
			}
			_tmp203_ = gxml_css_selector_get_selector_type ((GXmlCssSelector*) selector);
			_tmp204_ = _tmp203_;
			if (_tmp204_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_STARTS_WITH_WORD) {
				GXmlDomNode* _tmp205_;
				gchar* _tmp206_;
				gchar* _tmp207_;
				gchar* _tmp208_;
				_tmp205_ = attr;
				_tmp206_ = gxml_dom_node_get_node_value (_tmp205_);
				_tmp207_ = _tmp206_;
				_tmp208_ = _tmp207_;
				_tmp202_ = _tmp208_ != NULL;
				_g_free0 (_tmp208_);
			} else {
				_tmp202_ = FALSE;
			}
			if (_tmp202_) {
				GXmlDomNode* _tmp209_;
				gchar* _tmp210_;
				gchar* _tmp211_;
				gchar* _tmp212_;
				gchar** _tmp213_;
				gchar** _tmp214_;
				gchar** _tmp215_;
				gint _tmp215__length1;
				const gchar* _tmp216_;
				const gchar* _tmp217_;
				const gchar* _tmp218_;
				_tmp209_ = attr;
				_tmp210_ = gxml_dom_node_get_node_value (_tmp209_);
				_tmp211_ = _tmp210_;
				_tmp212_ = _tmp211_;
				_tmp214_ = _tmp213_ = g_strsplit (_tmp212_, "-", 0);
				_tmp215_ = _tmp214_;
				_tmp215__length1 = _vala_array_length (_tmp213_);
				_tmp216_ = _tmp215_[0];
				_tmp217_ = gxml_css_selector_get_value ((GXmlCssSelector*) selector);
				_tmp218_ = _tmp217_;
				_tmp201_ = g_strcmp0 (_tmp216_, _tmp218_) == 0;
				_tmp215_ = (_vala_array_free (_tmp215_, _tmp215__length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (_tmp212_);
			} else {
				_tmp201_ = FALSE;
			}
			if (_tmp201_) {
				result = TRUE;
				_g_object_unref0 (attr);
				_g_object_unref0 (_attr_list);
				_g_object_unref0 (list);
				return result;
			}
			_tmp221_ = gxml_css_selector_get_selector_type ((GXmlCssSelector*) selector);
			_tmp222_ = _tmp221_;
			if (_tmp222_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_STARTS_WITH) {
				GXmlDomNode* _tmp223_;
				gchar* _tmp224_;
				gchar* _tmp225_;
				gchar* _tmp226_;
				_tmp223_ = attr;
				_tmp224_ = gxml_dom_node_get_node_value (_tmp223_);
				_tmp225_ = _tmp224_;
				_tmp226_ = _tmp225_;
				_tmp220_ = _tmp226_ != NULL;
				_g_free0 (_tmp226_);
			} else {
				_tmp220_ = FALSE;
			}
			if (_tmp220_) {
				GXmlDomNode* _tmp227_;
				gchar* _tmp228_;
				gchar* _tmp229_;
				gchar* _tmp230_;
				const gchar* _tmp231_;
				const gchar* _tmp232_;
				_tmp227_ = attr;
				_tmp228_ = gxml_dom_node_get_node_value (_tmp227_);
				_tmp229_ = _tmp228_;
				_tmp230_ = _tmp229_;
				_tmp231_ = gxml_css_selector_get_value ((GXmlCssSelector*) selector);
				_tmp232_ = _tmp231_;
				_tmp219_ = string_index_of (_tmp230_, _tmp232_, 0) == 0;
				_g_free0 (_tmp230_);
			} else {
				_tmp219_ = FALSE;
			}
			if (_tmp219_) {
				result = TRUE;
				_g_object_unref0 (attr);
				_g_object_unref0 (_attr_list);
				_g_object_unref0 (list);
				return result;
			}
			_tmp235_ = gxml_css_selector_get_selector_type ((GXmlCssSelector*) selector);
			_tmp236_ = _tmp235_;
			if (_tmp236_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_ENDS_WITH) {
				GXmlDomNode* _tmp237_;
				gchar* _tmp238_;
				gchar* _tmp239_;
				gchar* _tmp240_;
				_tmp237_ = attr;
				_tmp238_ = gxml_dom_node_get_node_value (_tmp237_);
				_tmp239_ = _tmp238_;
				_tmp240_ = _tmp239_;
				_tmp234_ = _tmp240_ != NULL;
				_g_free0 (_tmp240_);
			} else {
				_tmp234_ = FALSE;
			}
			if (_tmp234_) {
				GXmlDomNode* _tmp241_;
				gchar* _tmp242_;
				gchar* _tmp243_;
				gchar* _tmp244_;
				const gchar* _tmp245_;
				const gchar* _tmp246_;
				GXmlDomNode* _tmp247_;
				gchar* _tmp248_;
				gchar* _tmp249_;
				gchar* _tmp250_;
				gint _tmp251_;
				gint _tmp252_;
				const gchar* _tmp253_;
				const gchar* _tmp254_;
				gint _tmp255_;
				gint _tmp256_;
				_tmp241_ = attr;
				_tmp242_ = gxml_dom_node_get_node_value (_tmp241_);
				_tmp243_ = _tmp242_;
				_tmp244_ = _tmp243_;
				_tmp245_ = gxml_css_selector_get_value ((GXmlCssSelector*) selector);
				_tmp246_ = _tmp245_;
				_tmp247_ = attr;
				_tmp248_ = gxml_dom_node_get_node_value (_tmp247_);
				_tmp249_ = _tmp248_;
				_tmp250_ = _tmp249_;
				_tmp251_ = strlen (_tmp250_);
				_tmp252_ = _tmp251_;
				_tmp253_ = gxml_css_selector_get_value ((GXmlCssSelector*) selector);
				_tmp254_ = _tmp253_;
				_tmp255_ = strlen (_tmp254_);
				_tmp256_ = _tmp255_;
				_tmp233_ = string_last_index_of (_tmp244_, _tmp246_, 0) == (_tmp252_ - _tmp256_);
				_g_free0 (_tmp250_);
				_g_free0 (_tmp244_);
			} else {
				_tmp233_ = FALSE;
			}
			if (_tmp233_) {
				result = TRUE;
				_g_object_unref0 (attr);
				_g_object_unref0 (_attr_list);
				_g_object_unref0 (list);
				return result;
			}
			_g_object_unref0 (attr);
		}
		_g_object_unref0 (_attr_list);
	}
	result = FALSE;
	_g_object_unref0 (list);
	return result;
}

static gboolean
gxml_css_selector_parser_match_node (GXmlDomElement* element,
                                     GXmlCssSelector* selector,
                                     GError** error)
{
	gboolean result = FALSE;
	GXmlCssSelectorType _tmp0_;
	GXmlCssSelectorType _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	GXmlCssSelectorType _tmp4_;
	GXmlCssSelectorType _tmp5_;
	gboolean _tmp16_ = FALSE;
	GXmlCssSelectorType _tmp17_;
	GXmlCssSelectorType _tmp18_;
	GXmlCssSelectorType _tmp105_;
	GXmlCssSelectorType _tmp106_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (element != NULL, FALSE);
	g_return_val_if_fail (selector != NULL, FALSE);
	_tmp0_ = gxml_css_selector_get_selector_type (selector);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == GXML_CSS_SELECTOR_TYPE_ALL) {
		result = TRUE;
		return result;
	}
	_tmp4_ = gxml_css_selector_get_selector_type (selector);
	_tmp5_ = _tmp4_;
	if (_tmp5_ == GXML_CSS_SELECTOR_TYPE_CLASS) {
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = gxml_dom_element_get_attribute (element, "class");
		_tmp7_ = _tmp6_;
		_tmp3_ = _tmp7_ != NULL;
		_g_free0 (_tmp7_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		gboolean _tmp8_ = FALSE;
		GXmlDomTokenList* _tmp9_;
		GXmlDomTokenList* _tmp10_;
		GXmlDomTokenList* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		gboolean _tmp14_;
		_tmp9_ = gxml_dom_element_get_class_list (element);
		_tmp10_ = _tmp9_;
		_tmp11_ = _tmp10_;
		_tmp12_ = gxml_css_selector_get_name (selector);
		_tmp13_ = _tmp12_;
		_tmp14_ = gxml_dom_token_list_contains (_tmp11_, _tmp13_, &_inner_error0_);
		_g_object_unref0 (_tmp11_);
		_tmp8_ = _tmp14_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp15_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			return _tmp15_;
		}
		_tmp2_ = _tmp8_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		result = TRUE;
		return result;
	}
	_tmp17_ = gxml_css_selector_get_selector_type (selector);
	_tmp18_ = _tmp17_;
	if (_tmp18_ == GXML_CSS_SELECTOR_TYPE_ID) {
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		_tmp19_ = gxml_dom_element_get_id (element);
		_tmp20_ = _tmp19_;
		_tmp21_ = _tmp20_;
		_tmp22_ = gxml_css_selector_get_name (selector);
		_tmp23_ = _tmp22_;
		_tmp16_ = g_strcmp0 (_tmp21_, _tmp23_) == 0;
		_g_free0 (_tmp21_);
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		result = TRUE;
		return result;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (selector, GXML_TYPE_CSS_ATTRIBUTE_SELECTOR)) {
		gboolean _tmp24_ = FALSE;
		_tmp24_ = gxml_css_selector_parser_match_attribute (element, G_TYPE_CHECK_INSTANCE_TYPE (selector, GXML_TYPE_CSS_ATTRIBUTE_SELECTOR) ? ((GXmlCssAttributeSelector*) selector) : NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp25_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			return _tmp25_;
		}
		result = _tmp24_;
		return result;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (selector, GXML_TYPE_CSS_ELEMENT_SELECTOR)) {
		GXmlCssElementSelector* sel = NULL;
		GXmlCssElementSelector* _tmp26_;
		gboolean _tmp27_ = FALSE;
		GXmlCssElementSelector* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		gboolean _tmp32_;
		gboolean _tmp41_ = FALSE;
		GXmlCssElementSelector* _tmp42_;
		gboolean _tmp43_;
		gboolean _tmp44_;
		GXmlCssElementSelector* _tmp72_;
		gchar* _tmp73_;
		gchar* _tmp74_;
		gchar* _tmp75_;
		gboolean _tmp76_;
		gboolean _tmp85_ = FALSE;
		GXmlCssElementSelector* _tmp86_;
		gchar* _tmp87_;
		gchar* _tmp88_;
		gchar* _tmp89_;
		gchar* _tmp90_;
		gchar* _tmp91_;
		gchar* _tmp92_;
		gboolean _tmp93_;
		_tmp26_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (selector, GXML_TYPE_CSS_ELEMENT_SELECTOR) ? ((GXmlCssElementSelector*) selector) : NULL);
		sel = _tmp26_;
		_tmp28_ = sel;
		_tmp29_ = gxml_css_element_selector_get_local_name (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp31_ = _tmp30_;
		_tmp32_ = g_strcmp0 (_tmp31_, "*") == 0;
		_g_free0 (_tmp31_);
		if (_tmp32_) {
			gboolean _tmp33_ = FALSE;
			GXmlCssElementSelector* _tmp34_;
			gboolean _tmp35_;
			gboolean _tmp36_;
			_tmp34_ = sel;
			_tmp35_ = gxml_css_element_selector_get_prefixed (_tmp34_);
			_tmp36_ = _tmp35_;
			if (!_tmp36_) {
				_tmp33_ = TRUE;
			} else {
				GXmlCssElementSelector* _tmp37_;
				gchar* _tmp38_;
				gchar* _tmp39_;
				gchar* _tmp40_;
				_tmp37_ = sel;
				_tmp38_ = gxml_css_element_selector_get_prefix (_tmp37_);
				_tmp39_ = _tmp38_;
				_tmp40_ = _tmp39_;
				_tmp33_ = g_strcmp0 (_tmp40_, "*") == 0;
				_g_free0 (_tmp40_);
			}
			_tmp27_ = _tmp33_;
		} else {
			_tmp27_ = FALSE;
		}
		if (_tmp27_) {
			result = TRUE;
			_g_object_unref0 (sel);
			return result;
		}
		_tmp42_ = sel;
		_tmp43_ = gxml_css_element_selector_get_prefixed (_tmp42_);
		_tmp44_ = _tmp43_;
		if (_tmp44_) {
			GXmlCssElementSelector* _tmp45_;
			gchar* _tmp46_;
			gchar* _tmp47_;
			gchar* _tmp48_;
			_tmp45_ = sel;
			_tmp46_ = gxml_css_element_selector_get_prefix (_tmp45_);
			_tmp47_ = _tmp46_;
			_tmp48_ = _tmp47_;
			_tmp41_ = g_strcmp0 (_tmp48_, "") == 0;
			_g_free0 (_tmp48_);
		} else {
			_tmp41_ = FALSE;
		}
		if (_tmp41_) {
			gboolean _tmp49_ = FALSE;
			gchar* _tmp50_;
			gchar* _tmp51_;
			gchar* _tmp52_;
			gboolean _tmp53_;
			gboolean _tmp59_ = FALSE;
			GXmlCssElementSelector* _tmp60_;
			gchar* _tmp61_;
			gchar* _tmp62_;
			gchar* _tmp63_;
			gboolean _tmp64_;
			_tmp50_ = gxml_dom_element_get_prefix (element);
			_tmp51_ = _tmp50_;
			_tmp52_ = _tmp51_;
			_tmp53_ = _tmp52_ != NULL;
			_g_free0 (_tmp52_);
			if (_tmp53_) {
				gchar* _tmp54_;
				gchar* _tmp55_;
				gchar* _tmp56_;
				gint _tmp57_;
				gint _tmp58_;
				_tmp54_ = gxml_dom_element_get_prefix (element);
				_tmp55_ = _tmp54_;
				_tmp56_ = _tmp55_;
				_tmp57_ = strlen (_tmp56_);
				_tmp58_ = _tmp57_;
				_tmp49_ = _tmp58_ > 0;
				_g_free0 (_tmp56_);
			} else {
				_tmp49_ = FALSE;
			}
			if (_tmp49_) {
				result = FALSE;
				_g_object_unref0 (sel);
				return result;
			}
			_tmp60_ = sel;
			_tmp61_ = gxml_css_element_selector_get_local_name (_tmp60_);
			_tmp62_ = _tmp61_;
			_tmp63_ = _tmp62_;
			_tmp64_ = g_strcmp0 (_tmp63_, "*") == 0;
			_g_free0 (_tmp63_);
			if (_tmp64_) {
				_tmp59_ = TRUE;
			} else {
				gchar* _tmp65_;
				gchar* _tmp66_;
				gchar* _tmp67_;
				GXmlCssElementSelector* _tmp68_;
				gchar* _tmp69_;
				gchar* _tmp70_;
				gchar* _tmp71_;
				_tmp65_ = gxml_dom_element_get_local_name (element);
				_tmp66_ = _tmp65_;
				_tmp67_ = _tmp66_;
				_tmp68_ = sel;
				_tmp69_ = gxml_css_element_selector_get_local_name (_tmp68_);
				_tmp70_ = _tmp69_;
				_tmp71_ = _tmp70_;
				_tmp59_ = g_strcmp0 (_tmp67_, _tmp71_) == 0;
				_g_free0 (_tmp71_);
				_g_free0 (_tmp67_);
			}
			result = _tmp59_;
			_g_object_unref0 (sel);
			return result;
		}
		_tmp72_ = sel;
		_tmp73_ = gxml_css_element_selector_get_prefix (_tmp72_);
		_tmp74_ = _tmp73_;
		_tmp75_ = _tmp74_;
		_tmp76_ = g_strcmp0 (_tmp75_, "*") == 0;
		_g_free0 (_tmp75_);
		if (_tmp76_) {
			GXmlCssElementSelector* _tmp77_;
			gchar* _tmp78_;
			gchar* _tmp79_;
			gchar* _tmp80_;
			gchar* _tmp81_;
			gchar* _tmp82_;
			gchar* _tmp83_;
			gboolean _tmp84_;
			_tmp77_ = sel;
			_tmp78_ = gxml_css_element_selector_get_local_name (_tmp77_);
			_tmp79_ = _tmp78_;
			_tmp80_ = _tmp79_;
			_tmp81_ = gxml_dom_element_get_local_name (element);
			_tmp82_ = _tmp81_;
			_tmp83_ = _tmp82_;
			_tmp84_ = g_strcmp0 (_tmp80_, _tmp83_) == 0;
			_g_free0 (_tmp83_);
			_g_free0 (_tmp80_);
			result = _tmp84_;
			_g_object_unref0 (sel);
			return result;
		}
		_tmp86_ = sel;
		_tmp87_ = gxml_css_element_selector_get_local_name (_tmp86_);
		_tmp88_ = _tmp87_;
		_tmp89_ = _tmp88_;
		_tmp90_ = gxml_dom_element_get_local_name (element);
		_tmp91_ = _tmp90_;
		_tmp92_ = _tmp91_;
		_tmp93_ = g_strcmp0 (_tmp89_, _tmp92_) == 0;
		_g_free0 (_tmp92_);
		_g_free0 (_tmp89_);
		if (_tmp93_) {
			GXmlCssElementSelector* _tmp94_;
			gchar* _tmp95_;
			gchar* _tmp96_;
			gchar* _tmp97_;
			gchar* _tmp98_;
			gchar* _tmp99_;
			gchar* _tmp100_;
			_tmp94_ = sel;
			_tmp95_ = gxml_css_element_selector_get_prefix (_tmp94_);
			_tmp96_ = _tmp95_;
			_tmp97_ = _tmp96_;
			_tmp98_ = gxml_dom_element_get_prefix (element);
			_tmp99_ = _tmp98_;
			_tmp100_ = _tmp99_;
			_tmp85_ = g_strcmp0 (_tmp97_, _tmp100_) == 0;
			_g_free0 (_tmp100_);
			_g_free0 (_tmp97_);
		} else {
			_tmp85_ = FALSE;
		}
		result = _tmp85_;
		_g_object_unref0 (sel);
		return result;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (selector, GXML_TYPE_CSS_NOT_SELECTOR)) {
		gboolean _tmp101_ = FALSE;
		GeeList* _tmp102_;
		GeeList* _tmp103_;
		_tmp102_ = gxml_css_not_selector_get_selectors (G_TYPE_CHECK_INSTANCE_TYPE (selector, GXML_TYPE_CSS_NOT_SELECTOR) ? ((GXmlCssNotSelector*) selector) : NULL);
		_tmp103_ = _tmp102_;
		_tmp101_ = gxml_css_selector_parser_match_element (element, element, (GeeCollection*) _tmp103_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp104_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			return _tmp104_;
		}
		result = !_tmp101_;
		return result;
	}
	_tmp105_ = gxml_css_selector_get_selector_type (selector);
	_tmp106_ = _tmp105_;
	if (_tmp106_ == GXML_CSS_SELECTOR_TYPE_PSEUDO_CLASS) {
		gboolean _tmp107_ = FALSE;
		_tmp107_ = gxml_css_selector_parser_match_pseudo (element, selector, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp108_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			return _tmp108_;
		}
		result = _tmp107_;
		return result;
	}
	result = FALSE;
	return result;
}

static gboolean
gxml_css_selector_parser_match_element (GXmlDomElement* root,
                                        GXmlDomElement* element,
                                        GeeCollection* selectors,
                                        GError** error)
{
	gboolean result = FALSE;
	GeeArrayList* list = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GXmlCssSelector* selector = NULL;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gpointer _tmp6_;
	GeeArrayList* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	GeeArrayList* _tmp13_;
	GeeArrayList* _tmp14_;
	gint _tmp15_;
	gint _tmp16_;
	gpointer _tmp17_;
	GXmlCssSelector* _tmp18_;
	GXmlCssCombiner _tmp19_;
	GXmlCssCombiner _tmp20_;
	gboolean _tmp21_;
	GeeArrayList* _tmp29_;
	GeeArrayList* _tmp30_;
	gint _tmp31_;
	gint _tmp32_;
	gpointer _tmp33_;
	GXmlCssSelector* _tmp34_;
	GXmlCssCombiner _tmp35_;
	GXmlCssCombiner _tmp36_;
	gboolean _tmp37_;
	GeeArrayList* _tmp45_;
	GeeArrayList* _tmp46_;
	gint _tmp47_;
	gint _tmp48_;
	gpointer _tmp49_;
	GXmlCssSelector* _tmp50_;
	GXmlCssCombiner _tmp51_;
	GXmlCssCombiner _tmp52_;
	gboolean _tmp53_;
	GeeArrayList* _tmp69_;
	GeeArrayList* _tmp70_;
	gint _tmp71_;
	gint _tmp72_;
	gpointer _tmp73_;
	GXmlCssSelector* _tmp74_;
	GXmlCssCombiner _tmp75_;
	GXmlCssCombiner _tmp76_;
	gboolean _tmp77_;
	GeeArrayList* _tmp91_;
	GeeArrayList* _tmp92_;
	gint _tmp93_;
	gint _tmp94_;
	gpointer _tmp95_;
	GXmlCssSelector* _tmp96_;
	GXmlCssCombiner _tmp97_;
	GXmlCssCombiner _tmp98_;
	gboolean _tmp99_;
	GeeArrayList* _tmp111_;
	GeeArrayList* _tmp112_;
	gint _tmp113_;
	gint _tmp114_;
	gpointer _tmp115_;
	GXmlCssSelector* _tmp116_;
	GXmlCssCombiner _tmp117_;
	GXmlCssCombiner _tmp118_;
	gboolean _tmp119_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (root != NULL, FALSE);
	g_return_val_if_fail (element != NULL, FALSE);
	g_return_val_if_fail (selectors != NULL, FALSE);
	_tmp0_ = gee_array_list_new (GXML_TYPE_CSS_SELECTOR, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	list = _tmp0_;
	_tmp1_ = list;
	gee_array_list_add_all (_tmp1_, selectors);
	_tmp2_ = list;
	_tmp3_ = list;
	_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_abstract_list_remove_at ((GeeAbstractList*) _tmp2_, _tmp5_ - 1);
	selector = (GXmlCssSelector*) _tmp6_;
	_tmp7_ = list;
	_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_ == 0) {
		gboolean _tmp10_ = FALSE;
		GXmlCssSelector* _tmp11_;
		_tmp11_ = selector;
		_tmp10_ = gxml_css_selector_parser_match_node (element, _tmp11_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp12_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (selector);
			_g_object_unref0 (list);
			return _tmp12_;
		}
		result = _tmp10_;
		_g_object_unref0 (selector);
		_g_object_unref0 (list);
		return result;
	}
	_tmp13_ = list;
	_tmp14_ = list;
	_tmp15_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, _tmp16_ - 1);
	_tmp18_ = (GXmlCssSelector*) _tmp17_;
	_tmp19_ = gxml_css_selector_get_combiner (_tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = _tmp20_ == GXML_CSS_COMBINER_AND;
	_g_object_unref0 (_tmp18_);
	if (_tmp21_) {
		gboolean _tmp22_ = FALSE;
		gboolean _tmp23_ = FALSE;
		GXmlCssSelector* _tmp24_;
		_tmp24_ = selector;
		_tmp23_ = gxml_css_selector_parser_match_node (element, _tmp24_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp25_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (selector);
			_g_object_unref0 (list);
			return _tmp25_;
		}
		if (_tmp23_) {
			_tmp22_ = TRUE;
		} else {
			gboolean _tmp26_ = FALSE;
			GeeArrayList* _tmp27_;
			_tmp27_ = list;
			_tmp26_ = gxml_css_selector_parser_match_element (root, root, (GeeCollection*) _tmp27_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp28_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (selector);
				_g_object_unref0 (list);
				return _tmp28_;
			}
			_tmp22_ = _tmp26_;
		}
		result = _tmp22_;
		_g_object_unref0 (selector);
		_g_object_unref0 (list);
		return result;
	}
	_tmp29_ = list;
	_tmp30_ = list;
	_tmp31_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp30_);
	_tmp32_ = _tmp31_;
	_tmp33_ = gee_abstract_list_get ((GeeAbstractList*) _tmp29_, _tmp32_ - 1);
	_tmp34_ = (GXmlCssSelector*) _tmp33_;
	_tmp35_ = gxml_css_selector_get_combiner (_tmp34_);
	_tmp36_ = _tmp35_;
	_tmp37_ = _tmp36_ == GXML_CSS_COMBINER_NONE;
	_g_object_unref0 (_tmp34_);
	if (_tmp37_) {
		gboolean _tmp38_ = FALSE;
		gboolean _tmp39_ = FALSE;
		GXmlCssSelector* _tmp40_;
		_tmp40_ = selector;
		_tmp39_ = gxml_css_selector_parser_match_node (element, _tmp40_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp41_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (selector);
			_g_object_unref0 (list);
			return _tmp41_;
		}
		if (_tmp39_) {
			gboolean _tmp42_ = FALSE;
			GeeArrayList* _tmp43_;
			_tmp43_ = list;
			_tmp42_ = gxml_css_selector_parser_match_element (root, element, (GeeCollection*) _tmp43_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp44_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (selector);
				_g_object_unref0 (list);
				return _tmp44_;
			}
			_tmp38_ = _tmp42_;
		} else {
			_tmp38_ = FALSE;
		}
		result = _tmp38_;
		_g_object_unref0 (selector);
		_g_object_unref0 (list);
		return result;
	}
	_tmp45_ = list;
	_tmp46_ = list;
	_tmp47_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp46_);
	_tmp48_ = _tmp47_;
	_tmp49_ = gee_abstract_list_get ((GeeAbstractList*) _tmp45_, _tmp48_ - 1);
	_tmp50_ = (GXmlCssSelector*) _tmp49_;
	_tmp51_ = gxml_css_selector_get_combiner (_tmp50_);
	_tmp52_ = _tmp51_;
	_tmp53_ = _tmp52_ == GXML_CSS_COMBINER_AFTER;
	_g_object_unref0 (_tmp50_);
	if (_tmp53_) {
		GXmlDomElement* _tmp54_;
		GXmlDomElement* _tmp55_;
		GXmlDomElement* _tmp56_;
		gboolean _tmp57_;
		gboolean _tmp58_ = FALSE;
		gboolean _tmp59_ = FALSE;
		GXmlCssSelector* _tmp60_;
		_tmp54_ = gxml_dom_non_document_type_child_node_get_previous_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
		_tmp55_ = _tmp54_;
		_tmp56_ = _tmp55_;
		_tmp57_ = _tmp56_ == NULL;
		_g_object_unref0 (_tmp56_);
		if (_tmp57_) {
			result = FALSE;
			_g_object_unref0 (selector);
			_g_object_unref0 (list);
			return result;
		}
		_tmp60_ = selector;
		_tmp59_ = gxml_css_selector_parser_match_node (element, _tmp60_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp61_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (selector);
			_g_object_unref0 (list);
			return _tmp61_;
		}
		if (_tmp59_) {
			gboolean _tmp62_ = FALSE;
			GXmlDomElement* _tmp63_;
			GXmlDomElement* _tmp64_;
			GXmlDomElement* _tmp65_;
			GeeArrayList* _tmp66_;
			gboolean _tmp67_;
			_tmp63_ = gxml_dom_non_document_type_child_node_get_previous_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
			_tmp64_ = _tmp63_;
			_tmp65_ = _tmp64_;
			_tmp66_ = list;
			_tmp67_ = gxml_css_selector_parser_match_element (root, _tmp65_, (GeeCollection*) _tmp66_, &_inner_error0_);
			_g_object_unref0 (_tmp65_);
			_tmp62_ = _tmp67_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp68_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (selector);
				_g_object_unref0 (list);
				return _tmp68_;
			}
			_tmp58_ = _tmp62_;
		} else {
			_tmp58_ = FALSE;
		}
		result = _tmp58_;
		_g_object_unref0 (selector);
		_g_object_unref0 (list);
		return result;
	}
	_tmp69_ = list;
	_tmp70_ = list;
	_tmp71_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp70_);
	_tmp72_ = _tmp71_;
	_tmp73_ = gee_abstract_list_get ((GeeAbstractList*) _tmp69_, _tmp72_ - 1);
	_tmp74_ = (GXmlCssSelector*) _tmp73_;
	_tmp75_ = gxml_css_selector_get_combiner (_tmp74_);
	_tmp76_ = _tmp75_;
	_tmp77_ = _tmp76_ == GXML_CSS_COMBINER_PRECEDED;
	_g_object_unref0 (_tmp74_);
	if (_tmp77_) {
		gboolean res = FALSE;
		GXmlCssSelector* _tmp78_;
		GXmlDomElement* prev = NULL;
		GXmlDomElement* _tmp80_;
		GXmlDomElement* _tmp81_;
		_tmp78_ = selector;
		res = gxml_css_selector_parser_match_node (element, _tmp78_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp79_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (selector);
			_g_object_unref0 (list);
			return _tmp79_;
		}
		_tmp80_ = gxml_dom_non_document_type_child_node_get_previous_element_sibling ((GXmlDomNonDocumentTypeChildNode*) element);
		_tmp81_ = _tmp80_;
		prev = _tmp81_;
		while (TRUE) {
			GXmlDomElement* _tmp82_;
			gboolean _tmp83_ = FALSE;
			GXmlDomElement* _tmp88_;
			GXmlDomElement* _tmp89_;
			GXmlDomElement* _tmp90_;
			_tmp82_ = prev;
			if (!(_tmp82_ != NULL)) {
				break;
			}
			if (res) {
				gboolean _tmp84_ = FALSE;
				GXmlDomElement* _tmp85_;
				GeeArrayList* _tmp86_;
				_tmp85_ = prev;
				_tmp86_ = list;
				_tmp84_ = gxml_css_selector_parser_match_element (root, _tmp85_, (GeeCollection*) _tmp86_, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					gboolean _tmp87_ = FALSE;
					g_propagate_error (error, _inner_error0_);
					_g_object_unref0 (prev);
					_g_object_unref0 (selector);
					_g_object_unref0 (list);
					return _tmp87_;
				}
				_tmp83_ = _tmp84_;
			} else {
				_tmp83_ = FALSE;
			}
			if (_tmp83_) {
				result = TRUE;
				_g_object_unref0 (prev);
				_g_object_unref0 (selector);
				_g_object_unref0 (list);
				return result;
			}
			_tmp88_ = prev;
			_tmp89_ = gxml_dom_non_document_type_child_node_get_previous_element_sibling ((GXmlDomNonDocumentTypeChildNode*) _tmp88_);
			_tmp90_ = _tmp89_;
			_g_object_unref0 (prev);
			prev = _tmp90_;
		}
		_g_object_unref0 (prev);
	}
	_tmp91_ = list;
	_tmp92_ = list;
	_tmp93_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp92_);
	_tmp94_ = _tmp93_;
	_tmp95_ = gee_abstract_list_get ((GeeAbstractList*) _tmp91_, _tmp94_ - 1);
	_tmp96_ = (GXmlCssSelector*) _tmp95_;
	_tmp97_ = gxml_css_selector_get_combiner (_tmp96_);
	_tmp98_ = _tmp97_;
	_tmp99_ = _tmp98_ == GXML_CSS_COMBINER_PARENT;
	_g_object_unref0 (_tmp96_);
	if (_tmp99_) {
		gboolean _tmp100_ = FALSE;
		gboolean _tmp101_ = FALSE;
		GXmlCssSelector* _tmp102_;
		_tmp102_ = selector;
		_tmp101_ = gxml_css_selector_parser_match_node (element, _tmp102_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp103_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (selector);
			_g_object_unref0 (list);
			return _tmp103_;
		}
		if (_tmp101_) {
			gboolean _tmp104_ = FALSE;
			GXmlDomElement* _tmp105_;
			GXmlDomElement* _tmp106_;
			GXmlDomElement* _tmp107_;
			GeeArrayList* _tmp108_;
			gboolean _tmp109_;
			_tmp105_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
			_tmp106_ = _tmp105_;
			_tmp107_ = _tmp106_;
			_tmp108_ = list;
			_tmp109_ = gxml_css_selector_parser_match_element (root, _tmp107_, (GeeCollection*) _tmp108_, &_inner_error0_);
			_g_object_unref0 (_tmp107_);
			_tmp104_ = _tmp109_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp110_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (selector);
				_g_object_unref0 (list);
				return _tmp110_;
			}
			_tmp100_ = _tmp104_;
		} else {
			_tmp100_ = FALSE;
		}
		result = _tmp100_;
		_g_object_unref0 (selector);
		_g_object_unref0 (list);
		return result;
	}
	_tmp111_ = list;
	_tmp112_ = list;
	_tmp113_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp112_);
	_tmp114_ = _tmp113_;
	_tmp115_ = gee_abstract_list_get ((GeeAbstractList*) _tmp111_, _tmp114_ - 1);
	_tmp116_ = (GXmlCssSelector*) _tmp115_;
	_tmp117_ = gxml_css_selector_get_combiner (_tmp116_);
	_tmp118_ = _tmp117_;
	_tmp119_ = _tmp118_ == GXML_CSS_COMBINER_INSIDE;
	_g_object_unref0 (_tmp116_);
	if (_tmp119_) {
		GXmlDomElement* parent = NULL;
		GXmlDomElement* _tmp120_;
		GXmlDomElement* _tmp121_;
		gboolean res = FALSE;
		GXmlCssSelector* _tmp122_;
		_tmp120_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) element);
		_tmp121_ = _tmp120_;
		parent = _tmp121_;
		_tmp122_ = selector;
		res = gxml_css_selector_parser_match_node (element, _tmp122_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp123_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (parent);
			_g_object_unref0 (selector);
			_g_object_unref0 (list);
			return _tmp123_;
		}
		while (TRUE) {
			GXmlDomElement* _tmp124_;
			gboolean _tmp125_ = FALSE;
			GXmlDomElement* _tmp130_;
			GXmlDomElement* _tmp131_;
			GXmlDomElement* _tmp132_;
			_tmp124_ = parent;
			if (!(_tmp124_ != NULL)) {
				break;
			}
			if (res) {
				gboolean _tmp126_ = FALSE;
				GXmlDomElement* _tmp127_;
				GeeArrayList* _tmp128_;
				_tmp127_ = parent;
				_tmp128_ = list;
				_tmp126_ = gxml_css_selector_parser_match_element (root, _tmp127_, (GeeCollection*) _tmp128_, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					gboolean _tmp129_ = FALSE;
					g_propagate_error (error, _inner_error0_);
					_g_object_unref0 (parent);
					_g_object_unref0 (selector);
					_g_object_unref0 (list);
					return _tmp129_;
				}
				_tmp125_ = _tmp126_;
			} else {
				_tmp125_ = FALSE;
			}
			if (_tmp125_) {
				result = TRUE;
				_g_object_unref0 (parent);
				_g_object_unref0 (selector);
				_g_object_unref0 (list);
				return result;
			}
			_tmp130_ = parent;
			_tmp131_ = gxml_dom_node_get_parent_element ((GXmlDomNode*) _tmp130_);
			_tmp132_ = _tmp131_;
			_g_object_unref0 (parent);
			parent = _tmp132_;
		}
		_g_object_unref0 (parent);
	}
	result = FALSE;
	_g_object_unref0 (selector);
	_g_object_unref0 (list);
	return result;
}

gboolean
gxml_css_selector_parser_match (GXmlCssSelectorParser* self,
                                GXmlDomElement* element,
                                GError** error)
{
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	GeeArrayList* _tmp1_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (element != NULL, FALSE);
	_tmp1_ = self->priv->list;
	_tmp0_ = gxml_css_selector_parser_match_element (element, element, (GeeCollection*) _tmp1_, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp2_ = FALSE;
		g_propagate_error (error, _inner_error0_);
		return _tmp2_;
	}
	result = _tmp0_;
	return result;
}

GXmlDomNodeList*
gxml_css_selector_parser_query_selector_all (GXmlCssSelectorParser* self,
                                             GXmlDomElement* element,
                                             GError** error)
{
	GXmlDomNodeList* result = NULL;
	GXmlGomNodeList* list = NULL;
	GXmlGomNodeList* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (element != NULL, NULL);
	_tmp0_ = gxml_gom_node_list_new ();
	list = _tmp0_;
	{
		GXmlDomHTMLCollection* _child_list = NULL;
		GXmlDomHTMLCollection* _tmp1_;
		GXmlDomHTMLCollection* _tmp2_;
		gint _child_size = 0;
		GXmlDomHTMLCollection* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _child_index = 0;
		_tmp1_ = gxml_dom_parent_node_get_children ((GXmlDomParentNode*) element);
		_tmp2_ = _tmp1_;
		_child_list = _tmp2_;
		_tmp3_ = _child_list;
		_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_child_size = _tmp5_;
		_child_index = -1;
		while (TRUE) {
			GXmlDomElement* child = NULL;
			GXmlDomHTMLCollection* _tmp6_;
			gpointer _tmp7_;
			gboolean _tmp8_ = FALSE;
			GXmlDomElement* _tmp9_;
			GXmlDomNodeList* _tmp12_ = NULL;
			GXmlDomElement* _tmp13_;
			GXmlDomNodeList* _tmp14_;
			GXmlGomNodeList* _tmp15_;
			_child_index = _child_index + 1;
			if (!(_child_index < _child_size)) {
				break;
			}
			_tmp6_ = _child_list;
			_tmp7_ = gee_list_get ((GeeList*) _tmp6_, _child_index);
			child = (GXmlDomElement*) _tmp7_;
			_tmp9_ = child;
			_tmp8_ = gxml_css_selector_parser_match (self, _tmp9_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (child);
				_g_object_unref0 (_child_list);
				_g_object_unref0 (list);
				return NULL;
			}
			if (_tmp8_) {
				GXmlGomNodeList* _tmp10_;
				GXmlDomElement* _tmp11_;
				_tmp10_ = list;
				_tmp11_ = child;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp10_, (GXmlDomNode*) _tmp11_);
			}
			_tmp13_ = child;
			_tmp14_ = gxml_css_selector_parser_query_selector_all (self, _tmp13_, &_inner_error0_);
			_tmp12_ = _tmp14_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (child);
				_g_object_unref0 (_child_list);
				_g_object_unref0 (list);
				return NULL;
			}
			_tmp15_ = list;
			gee_array_list_add_all ((GeeArrayList*) _tmp15_, (GeeCollection*) _tmp12_);
			_g_object_unref0 (_tmp12_);
			_g_object_unref0 (child);
		}
		_g_object_unref0 (_child_list);
	}
	result = (GXmlDomNodeList*) list;
	return result;
}

GXmlCssSelectorParser*
gxml_css_selector_parser_construct (GType object_type)
{
	GXmlCssSelectorParser * self = NULL;
	self = (GXmlCssSelectorParser*) g_object_new (object_type, NULL);
	return self;
}

GXmlCssSelectorParser*
gxml_css_selector_parser_new (void)
{
	return gxml_css_selector_parser_construct (GXML_TYPE_CSS_SELECTOR_PARSER);
}

GeeList*
gxml_css_selector_parser_get_selectors (GXmlCssSelectorParser* self)
{
	GeeList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->list;
	result = (GeeList*) _tmp0_;
	return result;
}

static GObject *
gxml_css_selector_parser_constructor (GType type,
                                      guint n_construct_properties,
                                      GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GXmlCssSelectorParser * self;
	GeeArrayList* _tmp0_;
	parent_class = G_OBJECT_CLASS (gxml_css_selector_parser_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_CSS_SELECTOR_PARSER, GXmlCssSelectorParser);
	_tmp0_ = gee_array_list_new (GXML_TYPE_CSS_SELECTOR, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->list);
	self->priv->list = _tmp0_;
	return obj;
}

static void
gxml_css_selector_parser_class_init (GXmlCssSelectorParserClass * klass,
                                     gpointer klass_data)
{
	gxml_css_selector_parser_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GXmlCssSelectorParser_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_css_selector_parser_get_property;
	G_OBJECT_CLASS (klass)->constructor = gxml_css_selector_parser_constructor;
	G_OBJECT_CLASS (klass)->finalize = gxml_css_selector_parser_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_SELECTOR_PARSER_SELECTORS_PROPERTY, gxml_css_selector_parser_properties[GXML_CSS_SELECTOR_PARSER_SELECTORS_PROPERTY] = g_param_spec_object ("selectors", "selectors", "selectors", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gxml_css_selector_parser_instance_init (GXmlCssSelectorParser * self,
                                        gpointer klass)
{
	self->priv = gxml_css_selector_parser_get_instance_private (self);
}

static void
gxml_css_selector_parser_finalize (GObject * obj)
{
	GXmlCssSelectorParser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_CSS_SELECTOR_PARSER, GXmlCssSelectorParser);
	_g_object_unref0 (self->priv->list);
	G_OBJECT_CLASS (gxml_css_selector_parser_parent_class)->finalize (obj);
}

GType
gxml_css_selector_parser_get_type (void)
{
	static volatile gsize gxml_css_selector_parser_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_css_selector_parser_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlCssSelectorParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_css_selector_parser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlCssSelectorParser), 0, (GInstanceInitFunc) gxml_css_selector_parser_instance_init, NULL };
		GType gxml_css_selector_parser_type_id;
		gxml_css_selector_parser_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlCssSelectorParser", &g_define_type_info, 0);
		GXmlCssSelectorParser_private_offset = g_type_add_instance_private (gxml_css_selector_parser_type_id, sizeof (GXmlCssSelectorParserPrivate));
		g_once_init_leave (&gxml_css_selector_parser_type_id__volatile, gxml_css_selector_parser_type_id);
	}
	return gxml_css_selector_parser_type_id__volatile;
}

static void
_vala_gxml_css_selector_parser_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	GXmlCssSelectorParser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_SELECTOR_PARSER, GXmlCssSelectorParser);
	switch (property_id) {
		case GXML_CSS_SELECTOR_PARSER_SELECTORS_PROPERTY:
		g_value_set_object (value, gxml_css_selector_parser_get_selectors (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gint array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gint array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gint
_vala_array_length (gpointer array)
{
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

