/* CssSelectorParser.c generated by valac 0.34.13, 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  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.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <libxml/tree.h>


#define GXML_TYPE_CSS_SELECTOR_TYPE (gxml_css_selector_type_get_type ())

#define GXML_TYPE_CSS_SELECTOR_DATA (gxml_css_selector_data_get_type ())
#define GXML_CSS_SELECTOR_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_CSS_SELECTOR_DATA, GXmlCssSelectorData))
#define GXML_CSS_SELECTOR_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_CSS_SELECTOR_DATA, GXmlCssSelectorDataClass))
#define GXML_IS_CSS_SELECTOR_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_CSS_SELECTOR_DATA))
#define GXML_IS_CSS_SELECTOR_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_CSS_SELECTOR_DATA))
#define GXML_CSS_SELECTOR_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_CSS_SELECTOR_DATA, GXmlCssSelectorDataClass))

typedef struct _GXmlCssSelectorData GXmlCssSelectorData;
typedef struct _GXmlCssSelectorDataClass GXmlCssSelectorDataClass;
typedef struct _GXmlCssSelectorDataPrivate GXmlCssSelectorDataPrivate;
#define _g_free0(var) (var = (g_free (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;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))

#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;

#define GXML_DOM_EVENT_TYPE_PHASE (gxml_dom_event_phase_get_type ())

#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_DOM_NODE_TYPE_DOCUMENT_POSITION (gxml_dom_node_document_position_get_type ())

#define GXML_DOM_NODE_TYPE_NODE_TYPE (gxml_dom_node_node_type_get_type ())

#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 (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_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_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_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_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_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;

#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_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_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;

#define GXML_TYPE_NODE_TYPE (gxml_node_type_get_type ())

#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_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_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_GDOM_TOKEN_LIST (gxml_gdom_token_list_get_type ())
#define GXML_GDOM_TOKEN_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GDOM_TOKEN_LIST, GXmlGDomTokenList))
#define GXML_GDOM_TOKEN_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GDOM_TOKEN_LIST, GXmlGDomTokenListClass))
#define GXML_IS_GDOM_TOKEN_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GDOM_TOKEN_LIST))
#define GXML_IS_GDOM_TOKEN_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GDOM_TOKEN_LIST))
#define GXML_GDOM_TOKEN_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GDOM_TOKEN_LIST, GXmlGDomTokenListClass))

typedef struct _GXmlGDomTokenList GXmlGDomTokenList;
typedef struct _GXmlGDomTokenListClass GXmlGDomTokenListClass;

#define GXML_TYPE_GOM_NODE (gxml_gom_node_get_type ())
#define GXML_GOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_NODE, GXmlGomNode))
#define GXML_GOM_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_NODE, GXmlGomNodeClass))
#define GXML_IS_GOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_NODE))
#define GXML_IS_GOM_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_NODE))
#define GXML_GOM_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_NODE, GXmlGomNodeClass))

typedef struct _GXmlGomNode GXmlGomNode;
typedef struct _GXmlGomNodeClass GXmlGomNodeClass;

#define GXML_TYPE_GOM_ELEMENT (gxml_gom_element_get_type ())
#define GXML_GOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_ELEMENT, GXmlGomElement))
#define GXML_GOM_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_ELEMENT, GXmlGomElementClass))
#define GXML_IS_GOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_ELEMENT))
#define GXML_IS_GOM_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_ELEMENT))
#define GXML_GOM_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_ELEMENT, GXmlGomElementClass))

typedef struct _GXmlGomElement GXmlGomElement;
typedef struct _GXmlGomElementClass GXmlGomElementClass;

#define GXML_TYPE_GNODE (gxml_gnode_get_type ())
#define GXML_GNODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GNODE, GXmlGNode))
#define GXML_GNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GNODE, GXmlGNodeClass))
#define GXML_IS_GNODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GNODE))
#define GXML_IS_GNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GNODE))
#define GXML_GNODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GNODE, GXmlGNodeClass))

typedef struct _GXmlGNode GXmlGNode;
typedef struct _GXmlGNodeClass GXmlGNodeClass;

#define GXML_TYPE_GCHILD_NODE (gxml_gchild_node_get_type ())
#define GXML_GCHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GCHILD_NODE, GXmlGChildNode))
#define GXML_GCHILD_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GCHILD_NODE, GXmlGChildNodeClass))
#define GXML_IS_GCHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GCHILD_NODE))
#define GXML_IS_GCHILD_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GCHILD_NODE))
#define GXML_GCHILD_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GCHILD_NODE, GXmlGChildNodeClass))

typedef struct _GXmlGChildNode GXmlGChildNode;
typedef struct _GXmlGChildNodeClass GXmlGChildNodeClass;

#define GXML_TYPE_GNON_DOCUMENT_CHILD_NODE (gxml_gnon_document_child_node_get_type ())
#define GXML_GNON_DOCUMENT_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GNON_DOCUMENT_CHILD_NODE, GXmlGNonDocumentChildNode))
#define GXML_GNON_DOCUMENT_CHILD_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GNON_DOCUMENT_CHILD_NODE, GXmlGNonDocumentChildNodeClass))
#define GXML_IS_GNON_DOCUMENT_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GNON_DOCUMENT_CHILD_NODE))
#define GXML_IS_GNON_DOCUMENT_CHILD_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GNON_DOCUMENT_CHILD_NODE))
#define GXML_GNON_DOCUMENT_CHILD_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GNON_DOCUMENT_CHILD_NODE, GXmlGNonDocumentChildNodeClass))

typedef struct _GXmlGNonDocumentChildNode GXmlGNonDocumentChildNode;
typedef struct _GXmlGNonDocumentChildNodeClass GXmlGNonDocumentChildNodeClass;

#define GXML_TYPE_GELEMENT (gxml_gelement_get_type ())
#define GXML_GELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GELEMENT, GXmlGElement))
#define GXML_GELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GELEMENT, GXmlGElementClass))
#define GXML_IS_GELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GELEMENT))
#define GXML_IS_GELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GELEMENT))
#define GXML_GELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GELEMENT, GXmlGElementClass))

typedef struct _GXmlGElement GXmlGElement;
typedef struct _GXmlGElementClass GXmlGElementClass;

#define GXML_TYPE_DOM_HTML_DOCUMENT (gxml_dom_html_document_get_type ())
#define GXML_DOM_HTML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_HTML_DOCUMENT, GXmlDomHtmlDocument))
#define GXML_IS_DOM_HTML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_HTML_DOCUMENT))
#define GXML_DOM_HTML_DOCUMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_HTML_DOCUMENT, GXmlDomHtmlDocumentIface))

typedef struct _GXmlDomHtmlDocument GXmlDomHtmlDocument;
typedef struct _GXmlDomHtmlDocumentIface GXmlDomHtmlDocumentIface;

typedef enum  {
	GXML_CSS_SELECTOR_ERROR_NULL,
	GXML_CSS_SELECTOR_ERROR_ATTRIBUTE,
	GXML_CSS_SELECTOR_ERROR_INVALID,
	GXML_CSS_SELECTOR_ERROR_LENGTH,
	GXML_CSS_SELECTOR_ERROR_STRING,
	GXML_CSS_SELECTOR_ERROR_TYPE
} GXmlCssSelectorError;
#define GXML_CSS_SELECTOR_ERROR gxml_css_selector_error_quark ()
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_START_WITH,
	GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_START_WITH_HYPHEN,
	GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_END_WITH,
	GXML_CSS_SELECTOR_TYPE_PSEUDO,
	GXML_CSS_SELECTOR_TYPE_AND,
	GXML_CSS_SELECTOR_TYPE_INSIDE,
	GXML_CSS_SELECTOR_TYPE_PARENT,
	GXML_CSS_SELECTOR_TYPE_AFTER,
	GXML_CSS_SELECTOR_TYPE_BEFORE
} GXmlCssSelectorType;

struct _GXmlCssSelectorData {
	GObject parent_instance;
	GXmlCssSelectorDataPrivate * priv;
};

struct _GXmlCssSelectorDataClass {
	GObjectClass parent_class;
};

struct _GXmlCssSelectorDataPrivate {
	GXmlCssSelectorType _selector_type;
	gchar* _data;
	gchar* _value;
};

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

struct _GXmlCssSelectorParserClass {
	GObjectClass parent_class;
};

struct _GXmlCssSelectorParserPrivate {
	GeeArrayList* list;
};

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;

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);
};

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;

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;

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, int* 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);
};

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;

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* (*parentNode) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*firstChild) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*lastChild) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*previousSibling) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*nextSibling) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*previousNode) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*nextNode) (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 _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);
};

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;

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);
	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, int tokens_length1, GError** error);
	void (*remove) (GXmlDomTokenList* self, gchar** tokens, int 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);
	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);
};

struct _GXmlDomHtmlDocumentIface {
	GTypeInterface parent_iface;
	void (*read_from_string) (GXmlDomHtmlDocument* self, const gchar* str, GError** error);
	void (*read_from_string_tolerant) (GXmlDomHtmlDocument* self, const gchar* str, GError** error);
	gchar* (*to_html) (GXmlDomHtmlDocument* self, GError** error);
};


static gpointer gxml_css_selector_data_parent_class = NULL;
static gpointer gxml_css_selector_parser_parent_class = NULL;

GQuark gxml_css_selector_error_quark (void);
GType gxml_css_selector_type_get_type (void) G_GNUC_CONST;
GType gxml_css_selector_data_get_type (void) G_GNUC_CONST;
#define GXML_CSS_SELECTOR_DATA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GXML_TYPE_CSS_SELECTOR_DATA, GXmlCssSelectorDataPrivate))
enum  {
	GXML_CSS_SELECTOR_DATA_0_PROPERTY,
	GXML_CSS_SELECTOR_DATA_SELECTOR_TYPE_PROPERTY,
	GXML_CSS_SELECTOR_DATA_DATA_PROPERTY,
	GXML_CSS_SELECTOR_DATA_VALUE_PROPERTY
};
GXmlCssSelectorData* gxml_css_selector_data_new_with_values (GXmlCssSelectorType t, const gchar* data, const gchar* val);
GXmlCssSelectorData* gxml_css_selector_data_construct_with_values (GType object_type, GXmlCssSelectorType t, const gchar* data, const gchar* val);
void gxml_css_selector_data_set_selector_type (GXmlCssSelectorData* self, GXmlCssSelectorType value);
void gxml_css_selector_data_set_data (GXmlCssSelectorData* self, const gchar* value);
void gxml_css_selector_data_set_value (GXmlCssSelectorData* self, const gchar* value);
GXmlCssSelectorData* gxml_css_selector_data_new (void);
GXmlCssSelectorData* gxml_css_selector_data_construct (GType object_type);
GXmlCssSelectorType gxml_css_selector_data_get_selector_type (GXmlCssSelectorData* self);
const gchar* gxml_css_selector_data_get_data (GXmlCssSelectorData* self);
const gchar* gxml_css_selector_data_get_value (GXmlCssSelectorData* self);
static void gxml_css_selector_data_finalize (GObject* obj);
static void _vala_gxml_css_selector_data_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gxml_css_selector_data_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType gxml_css_selector_parser_get_type (void) G_GNUC_CONST;
#define GXML_CSS_SELECTOR_PARSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GXML_TYPE_CSS_SELECTOR_PARSER, GXmlCssSelectorParserPrivate))
enum  {
	GXML_CSS_SELECTOR_PARSER_0_PROPERTY,
	GXML_CSS_SELECTOR_PARSER_SELECTORS_PROPERTY
};
static gboolean gxml_css_selector_parser_is_valid_identifier (const gchar* data);
static void gxml_css_selector_parser_parse_class (GXmlCssSelectorParser* self, const gchar* css, gint* position);
static void gxml_css_selector_parser_parse_id (GXmlCssSelectorParser* self, const gchar* css, gint* position);
static void gxml_css_selector_parser_parse_all (GXmlCssSelectorParser* self, const gchar* css, gint* position);
static void gxml_css_selector_parser_parse_element (GXmlCssSelectorParser* self, const gchar* css, gint* position);
static void gxml_css_selector_parser_parse_attribute (GXmlCssSelectorParser* self, const gchar* css, gint* position, GError** error);
static void gxml_css_selector_parser_parse_pseudo (GXmlCssSelectorParser* self, const gchar* css, gint* position, GError** error);
static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle);
void gxml_css_selector_parser_parse (GXmlCssSelectorParser* self, const gchar* query, GError** error);
GeeList* gxml_css_selector_parser_get_selectors (GXmlCssSelectorParser* self);
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_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;
gboolean gxml_css_selector_parser_match (GXmlCssSelectorParser* self, GXmlDomElement* element, GError** error);
gchar* gxml_dom_node_get_node_name (GXmlDomNode* self);
gchar* gxml_dom_element_get_attribute (GXmlDomElement* self, const gchar* name);
GType gxml_gdom_token_list_get_type (void) G_GNUC_CONST;
GXmlGDomTokenList* gxml_gdom_token_list_new (GXmlDomElement* e, const gchar* attr);
GXmlGDomTokenList* gxml_gdom_token_list_construct (GType object_type, GXmlDomElement* e, const gchar* attr);
gboolean gxml_dom_token_list_contains (GXmlDomTokenList* self, const gchar* token, GError** error);
GType gxml_gom_node_get_type (void) G_GNUC_CONST;
GType gxml_gom_element_get_type (void) G_GNUC_CONST;
GXmlDomDocument* gxml_dom_node_get_owner_document (GXmlDomNode* self);
GXmlDomElement* gxml_dom_document_get_document_element (GXmlDomDocument* self);
GType gxml_gnode_get_type (void) G_GNUC_CONST;
GType gxml_gchild_node_get_type (void) G_GNUC_CONST;
GType gxml_gnon_document_child_node_get_type (void) G_GNUC_CONST;
GType gxml_gelement_get_type (void) G_GNUC_CONST;
xmlNode* gxml_gnode_get_internal_node (GXmlGNode* self);
GType gxml_dom_html_document_get_type (void) G_GNUC_CONST;
gboolean gxml_dom_node_has_child_nodes (GXmlDomNode* self);
GXmlDomNode* gxml_dom_node_get_parent_node (GXmlDomNode* self);
GXmlDomElement* gxml_dom_parent_node_get_first_element_child (GXmlDomParentNode* self);
GXmlDomElement* gxml_dom_parent_node_get_last_element_child (GXmlDomParentNode* self);
GXmlDomTokenList* gxml_dom_element_get_class_list (GXmlDomElement* self);
GXmlCssSelectorParser* gxml_css_selector_parser_new (void);
GXmlCssSelectorParser* gxml_css_selector_parser_construct (GType object_type);
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);


GQuark gxml_css_selector_error_quark (void) {
	return g_quark_from_static_string ("gxml_css_selector_error-quark");
}


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_START_WITH, "GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_START_WITH", "attribute-start-with"}, {GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_START_WITH_HYPHEN, "GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_START_WITH_HYPHEN", "attribute-start-with-hyphen"}, {GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_END_WITH, "GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_END_WITH", "attribute-end-with"}, {GXML_CSS_SELECTOR_TYPE_PSEUDO, "GXML_CSS_SELECTOR_TYPE_PSEUDO", "pseudo"}, {GXML_CSS_SELECTOR_TYPE_AND, "GXML_CSS_SELECTOR_TYPE_AND", "and"}, {GXML_CSS_SELECTOR_TYPE_INSIDE, "GXML_CSS_SELECTOR_TYPE_INSIDE", "inside"}, {GXML_CSS_SELECTOR_TYPE_PARENT, "GXML_CSS_SELECTOR_TYPE_PARENT", "parent"}, {GXML_CSS_SELECTOR_TYPE_AFTER, "GXML_CSS_SELECTOR_TYPE_AFTER", "after"}, {GXML_CSS_SELECTOR_TYPE_BEFORE, "GXML_CSS_SELECTOR_TYPE_BEFORE", "before"}, {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;
}


GXmlCssSelectorData* gxml_css_selector_data_construct_with_values (GType object_type, GXmlCssSelectorType t, const gchar* data, const gchar* val) {
	GXmlCssSelectorData * self = NULL;
	GXmlCssSelectorType _tmp0_ = 0;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	g_return_val_if_fail (data != NULL, NULL);
	g_return_val_if_fail (val != NULL, NULL);
	self = (GXmlCssSelectorData*) g_object_new (object_type, NULL);
	_tmp0_ = t;
	gxml_css_selector_data_set_selector_type (self, _tmp0_);
	_tmp1_ = data;
	gxml_css_selector_data_set_data (self, _tmp1_);
	_tmp2_ = val;
	gxml_css_selector_data_set_value (self, _tmp2_);
	return self;
}


GXmlCssSelectorData* gxml_css_selector_data_new_with_values (GXmlCssSelectorType t, const gchar* data, const gchar* val) {
	return gxml_css_selector_data_construct_with_values (GXML_TYPE_CSS_SELECTOR_DATA, t, data, val);
}


GXmlCssSelectorData* gxml_css_selector_data_construct (GType object_type) {
	GXmlCssSelectorData * self = NULL;
	self = (GXmlCssSelectorData*) g_object_new (object_type, NULL);
	return self;
}


GXmlCssSelectorData* gxml_css_selector_data_new (void) {
	return gxml_css_selector_data_construct (GXML_TYPE_CSS_SELECTOR_DATA);
}


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


void gxml_css_selector_data_set_selector_type (GXmlCssSelectorData* self, GXmlCssSelectorType value) {
	GXmlCssSelectorType _tmp0_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_selector_type = _tmp0_;
	g_object_notify ((GObject *) self, "selector-type");
}


const gchar* gxml_css_selector_data_get_data (GXmlCssSelectorData* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_data;
	result = _tmp0_;
	return result;
}


void gxml_css_selector_data_set_data (GXmlCssSelectorData* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_data);
	self->priv->_data = _tmp1_;
	g_object_notify ((GObject *) self, "data");
}


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


void gxml_css_selector_data_set_value (GXmlCssSelectorData* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_value);
	self->priv->_value = _tmp1_;
	g_object_notify ((GObject *) self, "value");
}


static void gxml_css_selector_data_class_init (GXmlCssSelectorDataClass * klass) {
	gxml_css_selector_data_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GXmlCssSelectorDataPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_css_selector_data_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_css_selector_data_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_css_selector_data_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_SELECTOR_DATA_SELECTOR_TYPE_PROPERTY, g_param_spec_enum ("selector-type", "selector-type", "selector-type", GXML_TYPE_CSS_SELECTOR_TYPE, GXML_CSS_SELECTOR_TYPE_ALL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_SELECTOR_DATA_DATA_PROPERTY, g_param_spec_string ("data", "data", "data", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_CSS_SELECTOR_DATA_VALUE_PROPERTY, g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void gxml_css_selector_data_instance_init (GXmlCssSelectorData * self) {
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	self->priv = GXML_CSS_SELECTOR_DATA_GET_PRIVATE (self);
	self->priv->_selector_type = GXML_CSS_SELECTOR_TYPE_ALL;
	_tmp0_ = g_strdup ("");
	self->priv->_data = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_value = _tmp1_;
}


static void gxml_css_selector_data_finalize (GObject* obj) {
	GXmlCssSelectorData * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_CSS_SELECTOR_DATA, GXmlCssSelectorData);
	_g_free0 (self->priv->_data);
	_g_free0 (self->priv->_value);
	G_OBJECT_CLASS (gxml_css_selector_data_parent_class)->finalize (obj);
}


GType gxml_css_selector_data_get_type (void) {
	static volatile gsize gxml_css_selector_data_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_css_selector_data_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlCssSelectorDataClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_css_selector_data_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlCssSelectorData), 0, (GInstanceInitFunc) gxml_css_selector_data_instance_init, NULL };
		GType gxml_css_selector_data_type_id;
		gxml_css_selector_data_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlCssSelectorData", &g_define_type_info, 0);
		g_once_init_leave (&gxml_css_selector_data_type_id__volatile, gxml_css_selector_data_type_id);
	}
	return gxml_css_selector_data_type_id__volatile;
}


static void _vala_gxml_css_selector_data_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlCssSelectorData * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_SELECTOR_DATA, GXmlCssSelectorData);
	switch (property_id) {
		case GXML_CSS_SELECTOR_DATA_SELECTOR_TYPE_PROPERTY:
		g_value_set_enum (value, gxml_css_selector_data_get_selector_type (self));
		break;
		case GXML_CSS_SELECTOR_DATA_DATA_PROPERTY:
		g_value_set_string (value, gxml_css_selector_data_get_data (self));
		break;
		case GXML_CSS_SELECTOR_DATA_VALUE_PROPERTY:
		g_value_set_string (value, gxml_css_selector_data_get_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_gxml_css_selector_data_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GXmlCssSelectorData * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_CSS_SELECTOR_DATA, GXmlCssSelectorData);
	switch (property_id) {
		case GXML_CSS_SELECTOR_DATA_SELECTOR_TYPE_PROPERTY:
		gxml_css_selector_data_set_selector_type (self, g_value_get_enum (value));
		break;
		case GXML_CSS_SELECTOR_DATA_DATA_PROPERTY:
		gxml_css_selector_data_set_data (self, g_value_get_string (value));
		break;
		case GXML_CSS_SELECTOR_DATA_VALUE_PROPERTY:
		gxml_css_selector_data_set_value (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static gboolean string_get_next_char (const gchar* self, gint* index, gunichar* c) {
	gunichar _vala_c = 0U;
	gboolean result = FALSE;
	gint _tmp0_ = 0;
	gunichar _tmp1_ = 0U;
	gunichar _tmp2_ = 0U;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = *index;
	_tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_);
	_vala_c = _tmp1_;
	_tmp2_ = _vala_c;
	if (_tmp2_ != ((gunichar) 0)) {
		gint _tmp3_ = 0;
		gchar* _tmp4_ = NULL;
		_tmp3_ = *index;
		_tmp4_ = g_utf8_next_char (((gchar*) self) + _tmp3_);
		*index = (gint) (_tmp4_ - ((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;
	}
}


static gboolean gxml_css_selector_parser_is_valid_identifier (const gchar* data) {
	gboolean result = FALSE;
	gunichar u = 0U;
	gint index = 0;
	g_return_val_if_fail (data != NULL, FALSE);
	u = (gunichar) 0;
	index = 0;
	while (TRUE) {
		const gchar* _tmp0_ = NULL;
		gunichar _tmp1_ = 0U;
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		gboolean _tmp9_ = FALSE;
		gboolean _tmp10_ = FALSE;
		gboolean _tmp11_ = FALSE;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_ = FALSE;
		gboolean _tmp14_ = FALSE;
		gboolean _tmp15_ = FALSE;
		gboolean _tmp16_ = FALSE;
		gboolean _tmp17_ = FALSE;
		gboolean _tmp18_ = FALSE;
		gboolean _tmp19_ = FALSE;
		gboolean _tmp20_ = FALSE;
		gboolean _tmp21_ = FALSE;
		gboolean _tmp22_ = FALSE;
		gunichar _tmp23_ = 0U;
		_tmp0_ = data;
		_tmp2_ = string_get_next_char (_tmp0_, &index, &_tmp1_);
		u = _tmp1_;
		if (!_tmp2_) {
			break;
		}
		_tmp23_ = u;
		if (_tmp23_ == ((gunichar) '[')) {
			_tmp22_ = TRUE;
		} else {
			gunichar _tmp24_ = 0U;
			_tmp24_ = u;
			_tmp22_ = _tmp24_ == ((gunichar) ']');
		}
		if (_tmp22_) {
			_tmp21_ = TRUE;
		} else {
			gunichar _tmp25_ = 0U;
			_tmp25_ = u;
			_tmp21_ = _tmp25_ == ((gunichar) '{');
		}
		if (_tmp21_) {
			_tmp20_ = TRUE;
		} else {
			gunichar _tmp26_ = 0U;
			_tmp26_ = u;
			_tmp20_ = _tmp26_ == ((gunichar) '}');
		}
		if (_tmp20_) {
			_tmp19_ = TRUE;
		} else {
			gunichar _tmp27_ = 0U;
			_tmp27_ = u;
			_tmp19_ = _tmp27_ == ((gunichar) '$');
		}
		if (_tmp19_) {
			_tmp18_ = TRUE;
		} else {
			gunichar _tmp28_ = 0U;
			_tmp28_ = u;
			_tmp18_ = _tmp28_ == ((gunichar) '&');
		}
		if (_tmp18_) {
			_tmp17_ = TRUE;
		} else {
			gunichar _tmp29_ = 0U;
			_tmp29_ = u;
			_tmp17_ = _tmp29_ == ((gunichar) '#');
		}
		if (_tmp17_) {
			_tmp16_ = TRUE;
		} else {
			gunichar _tmp30_ = 0U;
			_tmp30_ = u;
			_tmp16_ = _tmp30_ == ((gunichar) '|');
		}
		if (_tmp16_) {
			_tmp15_ = TRUE;
		} else {
			gunichar _tmp31_ = 0U;
			_tmp31_ = u;
			_tmp15_ = _tmp31_ == ((gunichar) '`');
		}
		if (_tmp15_) {
			_tmp14_ = TRUE;
		} else {
			gunichar _tmp32_ = 0U;
			_tmp32_ = u;
			_tmp14_ = _tmp32_ == ((gunichar) '^');
		}
		if (_tmp14_) {
			_tmp13_ = TRUE;
		} else {
			gunichar _tmp33_ = 0U;
			_tmp33_ = u;
			_tmp13_ = _tmp33_ == ((gunichar) '@');
		}
		if (_tmp13_) {
			_tmp12_ = TRUE;
		} else {
			gunichar _tmp34_ = 0U;
			_tmp34_ = u;
			_tmp12_ = _tmp34_ == ((gunichar) '+');
		}
		if (_tmp12_) {
			_tmp11_ = TRUE;
		} else {
			gunichar _tmp35_ = 0U;
			_tmp35_ = u;
			_tmp11_ = _tmp35_ == ((gunichar) '~');
		}
		if (_tmp11_) {
			_tmp10_ = TRUE;
		} else {
			gunichar _tmp36_ = 0U;
			_tmp36_ = u;
			_tmp10_ = _tmp36_ == ((gunichar) '*');
		}
		if (_tmp10_) {
			_tmp9_ = TRUE;
		} else {
			gunichar _tmp37_ = 0U;
			_tmp37_ = u;
			_tmp9_ = _tmp37_ == ((gunichar) '%');
		}
		if (_tmp9_) {
			_tmp8_ = TRUE;
		} else {
			gunichar _tmp38_ = 0U;
			_tmp38_ = u;
			_tmp8_ = _tmp38_ == ((gunichar) '!');
		}
		if (_tmp8_) {
			_tmp7_ = TRUE;
		} else {
			gunichar _tmp39_ = 0U;
			_tmp39_ = u;
			_tmp7_ = _tmp39_ == ((gunichar) '?');
		}
		if (_tmp7_) {
			_tmp6_ = TRUE;
		} else {
			gunichar _tmp40_ = 0U;
			_tmp40_ = u;
			_tmp6_ = _tmp40_ == ((gunichar) '<');
		}
		if (_tmp6_) {
			_tmp5_ = TRUE;
		} else {
			gunichar _tmp41_ = 0U;
			_tmp41_ = u;
			_tmp5_ = _tmp41_ == ((gunichar) '>');
		}
		if (_tmp5_) {
			_tmp4_ = TRUE;
		} else {
			gunichar _tmp42_ = 0U;
			_tmp42_ = u;
			_tmp4_ = _tmp42_ == ((gunichar) '"');
		}
		if (_tmp4_) {
			_tmp3_ = TRUE;
		} else {
			gunichar _tmp43_ = 0U;
			_tmp43_ = u;
			_tmp3_ = _tmp43_ == ((gunichar) '\'');
		}
		if (_tmp3_) {
			result = FALSE;
			return result;
		}
	}
	result = TRUE;
	return result;
}


static void gxml_css_selector_parser_parse_class (GXmlCssSelectorParser* self, const gchar* css, gint* position) {
	GXmlCssSelectorData* idata = NULL;
	GXmlCssSelectorData* _tmp0_ = NULL;
	GeeArrayList* _tmp1_ = NULL;
	GXmlCssSelectorData* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GString* sb = NULL;
	GString* _tmp4_ = NULL;
	gunichar u = 0U;
	GXmlCssSelectorData* data = NULL;
	GString* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	GXmlCssSelectorData* _tmp17_ = NULL;
	GeeArrayList* _tmp18_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (css != NULL);
	_tmp0_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_INSIDE, "", "");
	idata = _tmp0_;
	_tmp1_ = self->priv->list;
	_tmp2_ = idata;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _tmp2_);
	_tmp3_ = *position;
	*position = _tmp3_ + 1;
	_tmp4_ = g_string_new ("");
	sb = _tmp4_;
	u = (gunichar) 0;
	while (TRUE) {
		gboolean _tmp5_ = FALSE;
		const gchar* _tmp6_ = NULL;
		gunichar _tmp7_ = 0U;
		gboolean _tmp8_ = FALSE;
		GString* _tmp13_ = NULL;
		gunichar _tmp14_ = 0U;
		_tmp6_ = css;
		_tmp8_ = string_get_next_char (_tmp6_, position, &_tmp7_);
		u = _tmp7_;
		if (_tmp8_) {
			gboolean _tmp9_ = FALSE;
			gunichar _tmp10_ = 0U;
			gboolean _tmp11_ = FALSE;
			_tmp10_ = u;
			_tmp11_ = g_unichar_isalnum (_tmp10_);
			if (_tmp11_) {
				_tmp9_ = TRUE;
			} else {
				gunichar _tmp12_ = 0U;
				_tmp12_ = u;
				_tmp9_ = _tmp12_ == ((gunichar) '-');
			}
			_tmp5_ = _tmp9_;
		} else {
			_tmp5_ = FALSE;
		}
		if (!_tmp5_) {
			break;
		}
		_tmp13_ = sb;
		_tmp14_ = u;
		g_string_append_unichar (_tmp13_, _tmp14_);
	}
	_tmp15_ = sb;
	_tmp16_ = _tmp15_->str;
	_tmp17_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_CLASS, _tmp16_, "");
	data = _tmp17_;
	_tmp18_ = self->priv->list;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, data);
	_g_object_unref0 (data);
	_g_string_free0 (sb);
	_g_object_unref0 (idata);
}


static void gxml_css_selector_parser_parse_id (GXmlCssSelectorParser* self, const gchar* css, gint* position) {
	GXmlCssSelectorData* idata = NULL;
	GXmlCssSelectorData* _tmp0_ = NULL;
	GeeArrayList* _tmp1_ = NULL;
	GXmlCssSelectorData* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GString* sb = NULL;
	GString* _tmp4_ = NULL;
	gunichar u = 0U;
	GXmlCssSelectorData* data = NULL;
	GString* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	GXmlCssSelectorData* _tmp17_ = NULL;
	GeeArrayList* _tmp18_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (css != NULL);
	_tmp0_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_INSIDE, "", "");
	idata = _tmp0_;
	_tmp1_ = self->priv->list;
	_tmp2_ = idata;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _tmp2_);
	_tmp3_ = *position;
	*position = _tmp3_ + 1;
	_tmp4_ = g_string_new ("");
	sb = _tmp4_;
	u = (gunichar) 0;
	while (TRUE) {
		gboolean _tmp5_ = FALSE;
		const gchar* _tmp6_ = NULL;
		gunichar _tmp7_ = 0U;
		gboolean _tmp8_ = FALSE;
		GString* _tmp13_ = NULL;
		gunichar _tmp14_ = 0U;
		_tmp6_ = css;
		_tmp8_ = string_get_next_char (_tmp6_, position, &_tmp7_);
		u = _tmp7_;
		if (_tmp8_) {
			gboolean _tmp9_ = FALSE;
			gunichar _tmp10_ = 0U;
			gboolean _tmp11_ = FALSE;
			_tmp10_ = u;
			_tmp11_ = g_unichar_isalnum (_tmp10_);
			if (_tmp11_) {
				_tmp9_ = TRUE;
			} else {
				gunichar _tmp12_ = 0U;
				_tmp12_ = u;
				_tmp9_ = _tmp12_ == ((gunichar) '-');
			}
			_tmp5_ = _tmp9_;
		} else {
			_tmp5_ = FALSE;
		}
		if (!_tmp5_) {
			break;
		}
		_tmp13_ = sb;
		_tmp14_ = u;
		g_string_append_unichar (_tmp13_, _tmp14_);
	}
	_tmp15_ = sb;
	_tmp16_ = _tmp15_->str;
	_tmp17_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_ID, _tmp16_, "");
	data = _tmp17_;
	_tmp18_ = self->priv->list;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, data);
	_g_object_unref0 (data);
	_g_string_free0 (sb);
	_g_object_unref0 (idata);
}


static void gxml_css_selector_parser_parse_all (GXmlCssSelectorParser* self, const gchar* css, gint* position) {
	gint _tmp0_ = 0;
	GXmlCssSelectorData* data = NULL;
	GXmlCssSelectorData* _tmp1_ = NULL;
	GeeArrayList* _tmp2_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (css != NULL);
	_tmp0_ = *position;
	*position = _tmp0_ + 1;
	_tmp1_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_ALL, "*", "");
	data = _tmp1_;
	_tmp2_ = self->priv->list;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, data);
	_g_object_unref0 (data);
}


static void gxml_css_selector_parser_parse_element (GXmlCssSelectorParser* self, const gchar* css, gint* position) {
	GString* sb = NULL;
	GString* _tmp0_ = NULL;
	gunichar u = 0U;
	GXmlCssSelectorData* data = NULL;
	GString* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	GXmlCssSelectorData* _tmp13_ = NULL;
	GeeArrayList* _tmp14_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (css != NULL);
	_tmp0_ = g_string_new ("");
	sb = _tmp0_;
	u = (gunichar) 0;
	while (TRUE) {
		gboolean _tmp1_ = FALSE;
		const gchar* _tmp2_ = NULL;
		gunichar _tmp3_ = 0U;
		gboolean _tmp4_ = FALSE;
		GString* _tmp9_ = NULL;
		gunichar _tmp10_ = 0U;
		_tmp2_ = css;
		_tmp4_ = string_get_next_char (_tmp2_, position, &_tmp3_);
		u = _tmp3_;
		if (_tmp4_) {
			gboolean _tmp5_ = FALSE;
			gunichar _tmp6_ = 0U;
			gboolean _tmp7_ = FALSE;
			_tmp6_ = u;
			_tmp7_ = g_unichar_isalnum (_tmp6_);
			if (_tmp7_) {
				_tmp5_ = TRUE;
			} else {
				gunichar _tmp8_ = 0U;
				_tmp8_ = u;
				_tmp5_ = _tmp8_ == ((gunichar) '-');
			}
			_tmp1_ = _tmp5_;
		} else {
			_tmp1_ = FALSE;
		}
		if (!_tmp1_) {
			break;
		}
		_tmp9_ = sb;
		_tmp10_ = u;
		g_string_append_unichar (_tmp9_, _tmp10_);
	}
	_tmp11_ = sb;
	_tmp12_ = _tmp11_->str;
	_tmp13_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_ELEMENT, _tmp12_, "");
	data = _tmp13_;
	_tmp14_ = self->priv->list;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp14_, data);
	_g_object_unref0 (data);
	_g_string_free0 (sb);
}


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


static gchar* string_strip (const gchar* self) {
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strstrip (_tmp1_);
	result = _result_;
	return result;
}


static void gxml_css_selector_parser_parse_attribute (GXmlCssSelectorParser* self, const gchar* css, gint* position, GError** error) {
	GXmlCssSelectorData* idata = NULL;
	GXmlCssSelectorData* _tmp0_ = NULL;
	GeeArrayList* _tmp1_ = NULL;
	GXmlCssSelectorData* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GString* sb = NULL;
	GString* _tmp4_ = NULL;
	gunichar u = 0U;
	const gchar* _tmp5_ = NULL;
	gunichar _tmp6_ = 0U;
	gunichar _tmp11_ = 0U;
	gboolean _tmp12_ = FALSE;
	GString* _tmp15_ = NULL;
	gunichar _tmp16_ = 0U;
	gunichar _tmp31_ = 0U;
	gunichar _tmp37_ = 0U;
	GString* sb1 = NULL;
	GString* _tmp109_ = NULL;
	GXmlCssSelectorData* data = NULL;
	GString* _tmp110_ = NULL;
	const gchar* _tmp111_ = NULL;
	GXmlCssSelectorData* _tmp112_ = NULL;
	gunichar _tmp113_ = 0U;
	const gchar* _tmp125_ = NULL;
	gunichar _tmp126_ = 0U;
	gunichar _tmp127_ = 0U;
	const gchar* _tmp130_ = NULL;
	gunichar _tmp131_ = 0U;
	gunichar s = 0U;
	gboolean _tmp136_ = FALSE;
	gunichar _tmp137_ = 0U;
	gboolean _tmp142_ = FALSE;
	gunichar _tmp143_ = 0U;
	gboolean _tmp161_ = FALSE;
	gunichar _tmp162_ = 0U;
	gunichar _tmp173_ = 0U;
	gunichar _tmp184_ = 0U;
	gunichar _tmp187_ = 0U;
	GeeArrayList* _tmp196_ = NULL;
	GXmlCssSelectorData* _tmp197_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (css != NULL);
	_tmp0_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_INSIDE, "", "");
	idata = _tmp0_;
	_tmp1_ = self->priv->list;
	_tmp2_ = idata;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _tmp2_);
	_tmp3_ = *position;
	*position = _tmp3_ + 1;
	_tmp4_ = g_string_new ("");
	sb = _tmp4_;
	u = (gunichar) 0;
	_tmp5_ = css;
	string_get_next_char (_tmp5_, position, &_tmp6_);
	u = _tmp6_;
	while (TRUE) {
		gunichar _tmp7_ = 0U;
		gboolean _tmp8_ = FALSE;
		const gchar* _tmp9_ = NULL;
		gunichar _tmp10_ = 0U;
		_tmp7_ = u;
		_tmp8_ = g_unichar_isspace (_tmp7_);
		if (!_tmp8_) {
			break;
		}
		_tmp9_ = css;
		string_get_next_char (_tmp9_, position, &_tmp10_);
		u = _tmp10_;
	}
	_tmp11_ = u;
	_tmp12_ = g_unichar_isalnum (_tmp11_);
	if (!_tmp12_) {
		const gchar* _tmp13_ = NULL;
		GError* _tmp14_ = NULL;
		_tmp13_ = _ ("Invalid attribute character");
		_tmp14_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _tmp13_);
		_inner_error_ = _tmp14_;
		g_propagate_error (error, _inner_error_);
		_g_string_free0 (sb);
		_g_object_unref0 (idata);
		return;
	}
	_tmp15_ = sb;
	_tmp16_ = u;
	g_string_append_unichar (_tmp15_, _tmp16_);
	while (TRUE) {
		gboolean _tmp17_ = FALSE;
		const gchar* _tmp18_ = NULL;
		gunichar _tmp19_ = 0U;
		gboolean _tmp20_ = FALSE;
		GString* _tmp25_ = NULL;
		gunichar _tmp26_ = 0U;
		_tmp18_ = css;
		_tmp20_ = string_get_next_char (_tmp18_, position, &_tmp19_);
		u = _tmp19_;
		if (_tmp20_) {
			gboolean _tmp21_ = FALSE;
			gunichar _tmp22_ = 0U;
			gboolean _tmp23_ = FALSE;
			_tmp22_ = u;
			_tmp23_ = g_unichar_isalnum (_tmp22_);
			if (_tmp23_) {
				_tmp21_ = TRUE;
			} else {
				gunichar _tmp24_ = 0U;
				_tmp24_ = u;
				_tmp21_ = _tmp24_ == ((gunichar) '-');
			}
			_tmp17_ = _tmp21_;
		} else {
			_tmp17_ = FALSE;
		}
		if (!_tmp17_) {
			break;
		}
		_tmp25_ = sb;
		_tmp26_ = u;
		g_string_append_unichar (_tmp25_, _tmp26_);
	}
	while (TRUE) {
		gunichar _tmp27_ = 0U;
		gboolean _tmp28_ = FALSE;
		const gchar* _tmp29_ = NULL;
		gunichar _tmp30_ = 0U;
		_tmp27_ = u;
		_tmp28_ = g_unichar_isspace (_tmp27_);
		if (!_tmp28_) {
			break;
		}
		_tmp29_ = css;
		string_get_next_char (_tmp29_, position, &_tmp30_);
		u = _tmp30_;
	}
	_tmp31_ = u;
	if (_tmp31_ == ((gunichar) ']')) {
		GXmlCssSelectorData* data = NULL;
		GString* _tmp32_ = NULL;
		const gchar* _tmp33_ = NULL;
		GXmlCssSelectorData* _tmp34_ = NULL;
		GeeArrayList* _tmp35_ = NULL;
		GXmlCssSelectorData* _tmp36_ = NULL;
		_tmp32_ = sb;
		_tmp33_ = _tmp32_->str;
		_tmp34_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_ATTRIBUTE, _tmp33_, "");
		data = _tmp34_;
		_tmp35_ = self->priv->list;
		_tmp36_ = data;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp35_, _tmp36_);
		_g_object_unref0 (data);
		_g_string_free0 (sb);
		_g_object_unref0 (idata);
		return;
	}
	_tmp37_ = u;
	if (_tmp37_ == ((gunichar) '=')) {
		GString* sb1 = NULL;
		GString* _tmp38_ = NULL;
		const gchar* _tmp39_ = NULL;
		gunichar _tmp40_ = 0U;
		gunichar s = 0U;
		gboolean _tmp45_ = FALSE;
		gunichar _tmp46_ = 0U;
		gboolean _tmp51_ = FALSE;
		gunichar _tmp52_ = 0U;
		gboolean _tmp70_ = FALSE;
		gunichar _tmp71_ = 0U;
		gunichar _tmp82_ = 0U;
		gunichar _tmp93_ = 0U;
		GXmlCssSelectorData* data = NULL;
		GString* _tmp96_ = NULL;
		const gchar* _tmp97_ = NULL;
		GString* _tmp98_ = NULL;
		const gchar* _tmp99_ = NULL;
		GXmlCssSelectorData* _tmp100_ = NULL;
		gunichar _tmp101_ = 0U;
		GeeArrayList* _tmp107_ = NULL;
		GXmlCssSelectorData* _tmp108_ = NULL;
		_tmp38_ = g_string_new ("");
		sb1 = _tmp38_;
		_tmp39_ = css;
		string_get_next_char (_tmp39_, position, &_tmp40_);
		u = _tmp40_;
		while (TRUE) {
			gunichar _tmp41_ = 0U;
			gboolean _tmp42_ = FALSE;
			const gchar* _tmp43_ = NULL;
			gunichar _tmp44_ = 0U;
			_tmp41_ = u;
			_tmp42_ = g_unichar_isspace (_tmp41_);
			if (!_tmp42_) {
				break;
			}
			_tmp43_ = css;
			string_get_next_char (_tmp43_, position, &_tmp44_);
			u = _tmp44_;
		}
		s = (gunichar) 0;
		_tmp46_ = u;
		if (_tmp46_ == ((gunichar) '"')) {
			_tmp45_ = TRUE;
		} else {
			gunichar _tmp47_ = 0U;
			_tmp47_ = u;
			_tmp45_ = _tmp47_ == ((gunichar) '\'');
		}
		if (_tmp45_) {
			gunichar _tmp48_ = 0U;
			const gchar* _tmp49_ = NULL;
			gunichar _tmp50_ = 0U;
			_tmp48_ = u;
			s = _tmp48_;
			_tmp49_ = css;
			string_get_next_char (_tmp49_, position, &_tmp50_);
			u = _tmp50_;
		}
		_tmp52_ = s;
		if (_tmp52_ != ((gunichar) 0)) {
			_tmp51_ = TRUE;
		} else {
			gunichar _tmp53_ = 0U;
			gchar* _tmp54_ = NULL;
			gchar* _tmp55_ = NULL;
			gboolean _tmp56_ = FALSE;
			_tmp53_ = u;
			_tmp54_ = g_unichar_to_string (_tmp53_);
			_tmp55_ = _tmp54_;
			_tmp56_ = gxml_css_selector_parser_is_valid_identifier (_tmp55_);
			_tmp51_ = _tmp56_;
			_g_free0 (_tmp55_);
		}
		if (_tmp51_) {
			GString* _tmp57_ = NULL;
			gunichar _tmp58_ = 0U;
			_tmp57_ = sb1;
			_tmp58_ = u;
			g_string_append_unichar (_tmp57_, _tmp58_);
		}
		while (TRUE) {
			gboolean _tmp59_ = FALSE;
			const gchar* _tmp60_ = NULL;
			gunichar _tmp61_ = 0U;
			gboolean _tmp62_ = FALSE;
			GString* _tmp68_ = NULL;
			gunichar _tmp69_ = 0U;
			_tmp60_ = css;
			_tmp62_ = string_get_next_char (_tmp60_, position, &_tmp61_);
			u = _tmp61_;
			if (_tmp62_) {
				gboolean _tmp63_ = FALSE;
				gunichar _tmp64_ = 0U;
				_tmp64_ = s;
				if (_tmp64_ != ((gunichar) 0)) {
					gunichar _tmp65_ = 0U;
					gunichar _tmp66_ = 0U;
					_tmp65_ = u;
					_tmp66_ = s;
					_tmp63_ = _tmp65_ != _tmp66_;
				} else {
					gunichar _tmp67_ = 0U;
					_tmp67_ = u;
					_tmp63_ = _tmp67_ != ((gunichar) ']');
				}
				_tmp59_ = _tmp63_;
			} else {
				_tmp59_ = FALSE;
			}
			if (!_tmp59_) {
				break;
			}
			_tmp68_ = sb1;
			_tmp69_ = u;
			g_string_append_unichar (_tmp68_, _tmp69_);
		}
		_tmp71_ = s;
		if (_tmp71_ == ((gunichar) 0)) {
			GString* _tmp72_ = NULL;
			const gchar* _tmp73_ = NULL;
			gboolean _tmp74_ = FALSE;
			_tmp72_ = sb1;
			_tmp73_ = _tmp72_->str;
			_tmp74_ = gxml_css_selector_parser_is_valid_identifier (_tmp73_);
			_tmp70_ = !_tmp74_;
		} else {
			_tmp70_ = FALSE;
		}
		if (_tmp70_) {
			const gchar* _tmp75_ = NULL;
			GString* _tmp76_ = NULL;
			const gchar* _tmp77_ = NULL;
			gchar* _tmp78_ = NULL;
			gchar* _tmp79_ = NULL;
			GError* _tmp80_ = NULL;
			GError* _tmp81_ = NULL;
			_tmp75_ = _ ("Invalid attribute selector value: %s");
			_tmp76_ = sb1;
			_tmp77_ = _tmp76_->str;
			_tmp78_ = g_strdup_printf (_tmp75_, _tmp77_);
			_tmp79_ = _tmp78_;
			_tmp80_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _tmp79_);
			_tmp81_ = _tmp80_;
			_g_free0 (_tmp79_);
			_inner_error_ = _tmp81_;
			g_propagate_error (error, _inner_error_);
			_g_string_free0 (sb1);
			_g_string_free0 (sb);
			_g_object_unref0 (idata);
			return;
		}
		_tmp82_ = s;
		if (_tmp82_ != ((gunichar) 0)) {
			gunichar _tmp83_ = 0U;
			gunichar _tmp84_ = 0U;
			const gchar* _tmp87_ = NULL;
			gunichar _tmp88_ = 0U;
			_tmp83_ = u;
			_tmp84_ = s;
			if (_tmp83_ != _tmp84_) {
				const gchar* _tmp85_ = NULL;
				GError* _tmp86_ = NULL;
				_tmp85_ = _ ("Invalid end of attribute value");
				_tmp86_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_STRING, _tmp85_);
				_inner_error_ = _tmp86_;
				g_propagate_error (error, _inner_error_);
				_g_string_free0 (sb1);
				_g_string_free0 (sb);
				_g_object_unref0 (idata);
				return;
			}
			_tmp87_ = css;
			string_get_next_char (_tmp87_, position, &_tmp88_);
			u = _tmp88_;
		}
		while (TRUE) {
			gunichar _tmp89_ = 0U;
			gboolean _tmp90_ = FALSE;
			const gchar* _tmp91_ = NULL;
			gunichar _tmp92_ = 0U;
			_tmp89_ = u;
			_tmp90_ = g_unichar_isspace (_tmp89_);
			if (!_tmp90_) {
				break;
			}
			_tmp91_ = css;
			string_get_next_char (_tmp91_, position, &_tmp92_);
			u = _tmp92_;
		}
		_tmp93_ = u;
		if (_tmp93_ != ((gunichar) ']')) {
			const gchar* _tmp94_ = NULL;
			GError* _tmp95_ = NULL;
			_tmp94_ = _ ("Invalid end of attribute selector");
			_tmp95_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _tmp94_);
			_inner_error_ = _tmp95_;
			g_propagate_error (error, _inner_error_);
			_g_string_free0 (sb1);
			_g_string_free0 (sb);
			_g_object_unref0 (idata);
			return;
		}
		_tmp96_ = sb;
		_tmp97_ = _tmp96_->str;
		_tmp98_ = sb1;
		_tmp99_ = _tmp98_->str;
		_tmp100_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_EQUAL, _tmp97_, _tmp99_);
		data = _tmp100_;
		_tmp101_ = s;
		if (_tmp101_ == ((gunichar) 0)) {
			GXmlCssSelectorData* _tmp102_ = NULL;
			GString* _tmp103_ = NULL;
			const gchar* _tmp104_ = NULL;
			gchar* _tmp105_ = NULL;
			gchar* _tmp106_ = NULL;
			_tmp102_ = data;
			_tmp103_ = sb1;
			_tmp104_ = _tmp103_->str;
			_tmp105_ = string_strip (_tmp104_);
			_tmp106_ = _tmp105_;
			gxml_css_selector_data_set_value (_tmp102_, _tmp106_);
			_g_free0 (_tmp106_);
		}
		_tmp107_ = self->priv->list;
		_tmp108_ = data;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp107_, _tmp108_);
		_g_object_unref0 (data);
		_g_string_free0 (sb1);
		_g_string_free0 (sb);
		_g_object_unref0 (idata);
		return;
	}
	_tmp109_ = g_string_new ("");
	sb1 = _tmp109_;
	_tmp110_ = sb;
	_tmp111_ = _tmp110_->str;
	_tmp112_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_ATTRIBUTE, _tmp111_, "");
	data = _tmp112_;
	_tmp113_ = u;
	if (_tmp113_ == ((gunichar) '~')) {
		GXmlCssSelectorData* _tmp114_ = NULL;
		_tmp114_ = data;
		gxml_css_selector_data_set_selector_type (_tmp114_, GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_CONTAINS);
	} else {
		gunichar _tmp115_ = 0U;
		_tmp115_ = u;
		if (_tmp115_ == ((gunichar) '*')) {
			GXmlCssSelectorData* _tmp116_ = NULL;
			_tmp116_ = data;
			gxml_css_selector_data_set_selector_type (_tmp116_, GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_SUBSTRING);
		} else {
			gunichar _tmp117_ = 0U;
			_tmp117_ = u;
			if (_tmp117_ == ((gunichar) '^')) {
				GXmlCssSelectorData* _tmp118_ = NULL;
				_tmp118_ = data;
				gxml_css_selector_data_set_selector_type (_tmp118_, GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_START_WITH);
			} else {
				gunichar _tmp119_ = 0U;
				_tmp119_ = u;
				if (_tmp119_ == ((gunichar) '|')) {
					GXmlCssSelectorData* _tmp120_ = NULL;
					_tmp120_ = data;
					gxml_css_selector_data_set_selector_type (_tmp120_, GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_START_WITH_HYPHEN);
				} else {
					gunichar _tmp121_ = 0U;
					_tmp121_ = u;
					if (_tmp121_ == ((gunichar) '$')) {
						GXmlCssSelectorData* _tmp122_ = NULL;
						_tmp122_ = data;
						gxml_css_selector_data_set_selector_type (_tmp122_, GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_END_WITH);
					} else {
						const gchar* _tmp123_ = NULL;
						GError* _tmp124_ = NULL;
						_tmp123_ = _ ("Invalid attribute selector character");
						_tmp124_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _tmp123_);
						_inner_error_ = _tmp124_;
						g_propagate_error (error, _inner_error_);
						_g_object_unref0 (data);
						_g_string_free0 (sb1);
						_g_string_free0 (sb);
						_g_object_unref0 (idata);
						return;
					}
				}
			}
		}
	}
	_tmp125_ = css;
	string_get_next_char (_tmp125_, position, &_tmp126_);
	u = _tmp126_;
	_tmp127_ = u;
	if (_tmp127_ != ((gunichar) '=')) {
		const gchar* _tmp128_ = NULL;
		GError* _tmp129_ = NULL;
		_tmp128_ = _ ("Invalid attribute selector character: can't find '=' character");
		_tmp129_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _tmp128_);
		_inner_error_ = _tmp129_;
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (data);
		_g_string_free0 (sb1);
		_g_string_free0 (sb);
		_g_object_unref0 (idata);
		return;
	}
	_tmp130_ = css;
	string_get_next_char (_tmp130_, position, &_tmp131_);
	u = _tmp131_;
	while (TRUE) {
		gunichar _tmp132_ = 0U;
		gboolean _tmp133_ = FALSE;
		const gchar* _tmp134_ = NULL;
		gunichar _tmp135_ = 0U;
		_tmp132_ = u;
		_tmp133_ = g_unichar_isspace (_tmp132_);
		if (!_tmp133_) {
			break;
		}
		_tmp134_ = css;
		string_get_next_char (_tmp134_, position, &_tmp135_);
		u = _tmp135_;
	}
	s = (gunichar) 0;
	_tmp137_ = u;
	if (_tmp137_ == ((gunichar) '"')) {
		_tmp136_ = TRUE;
	} else {
		gunichar _tmp138_ = 0U;
		_tmp138_ = u;
		_tmp136_ = _tmp138_ == ((gunichar) '\'');
	}
	if (_tmp136_) {
		gunichar _tmp139_ = 0U;
		const gchar* _tmp140_ = NULL;
		gunichar _tmp141_ = 0U;
		_tmp139_ = u;
		s = _tmp139_;
		_tmp140_ = css;
		string_get_next_char (_tmp140_, position, &_tmp141_);
		u = _tmp141_;
	}
	_tmp143_ = s;
	if (_tmp143_ != ((gunichar) 0)) {
		_tmp142_ = TRUE;
	} else {
		gunichar _tmp144_ = 0U;
		gchar* _tmp145_ = NULL;
		gchar* _tmp146_ = NULL;
		gboolean _tmp147_ = FALSE;
		_tmp144_ = u;
		_tmp145_ = g_unichar_to_string (_tmp144_);
		_tmp146_ = _tmp145_;
		_tmp147_ = gxml_css_selector_parser_is_valid_identifier (_tmp146_);
		_tmp142_ = _tmp147_;
		_g_free0 (_tmp146_);
	}
	if (_tmp142_) {
		GString* _tmp148_ = NULL;
		gunichar _tmp149_ = 0U;
		_tmp148_ = sb1;
		_tmp149_ = u;
		g_string_append_unichar (_tmp148_, _tmp149_);
	}
	while (TRUE) {
		gboolean _tmp150_ = FALSE;
		const gchar* _tmp151_ = NULL;
		gunichar _tmp152_ = 0U;
		gboolean _tmp153_ = FALSE;
		GString* _tmp159_ = NULL;
		gunichar _tmp160_ = 0U;
		_tmp151_ = css;
		_tmp153_ = string_get_next_char (_tmp151_, position, &_tmp152_);
		u = _tmp152_;
		if (_tmp153_) {
			gboolean _tmp154_ = FALSE;
			gunichar _tmp155_ = 0U;
			_tmp155_ = s;
			if (_tmp155_ != ((gunichar) 0)) {
				gunichar _tmp156_ = 0U;
				gunichar _tmp157_ = 0U;
				_tmp156_ = u;
				_tmp157_ = s;
				_tmp154_ = _tmp156_ != _tmp157_;
			} else {
				gunichar _tmp158_ = 0U;
				_tmp158_ = u;
				_tmp154_ = _tmp158_ != ((gunichar) ']');
			}
			_tmp150_ = _tmp154_;
		} else {
			_tmp150_ = FALSE;
		}
		if (!_tmp150_) {
			break;
		}
		_tmp159_ = sb1;
		_tmp160_ = u;
		g_string_append_unichar (_tmp159_, _tmp160_);
	}
	_tmp162_ = s;
	if (_tmp162_ == ((gunichar) 0)) {
		GString* _tmp163_ = NULL;
		const gchar* _tmp164_ = NULL;
		gboolean _tmp165_ = FALSE;
		_tmp163_ = sb1;
		_tmp164_ = _tmp163_->str;
		_tmp165_ = gxml_css_selector_parser_is_valid_identifier (_tmp164_);
		_tmp161_ = !_tmp165_;
	} else {
		_tmp161_ = FALSE;
	}
	if (_tmp161_) {
		const gchar* _tmp166_ = NULL;
		GString* _tmp167_ = NULL;
		const gchar* _tmp168_ = NULL;
		gchar* _tmp169_ = NULL;
		gchar* _tmp170_ = NULL;
		GError* _tmp171_ = NULL;
		GError* _tmp172_ = NULL;
		_tmp166_ = _ ("Invalid attribute selector value: %s");
		_tmp167_ = sb1;
		_tmp168_ = _tmp167_->str;
		_tmp169_ = g_strdup_printf (_tmp166_, _tmp168_);
		_tmp170_ = _tmp169_;
		_tmp171_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _tmp170_);
		_tmp172_ = _tmp171_;
		_g_free0 (_tmp170_);
		_inner_error_ = _tmp172_;
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (data);
		_g_string_free0 (sb1);
		_g_string_free0 (sb);
		_g_object_unref0 (idata);
		return;
	}
	_tmp173_ = s;
	if (_tmp173_ != ((gunichar) 0)) {
		gunichar _tmp174_ = 0U;
		gunichar _tmp175_ = 0U;
		const gchar* _tmp178_ = NULL;
		gunichar _tmp179_ = 0U;
		_tmp174_ = u;
		_tmp175_ = s;
		if (_tmp174_ != _tmp175_) {
			const gchar* _tmp176_ = NULL;
			GError* _tmp177_ = NULL;
			_tmp176_ = _ ("Invalid end of attribute value");
			_tmp177_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_STRING, _tmp176_);
			_inner_error_ = _tmp177_;
			g_propagate_error (error, _inner_error_);
			_g_object_unref0 (data);
			_g_string_free0 (sb1);
			_g_string_free0 (sb);
			_g_object_unref0 (idata);
			return;
		}
		_tmp178_ = css;
		string_get_next_char (_tmp178_, position, &_tmp179_);
		u = _tmp179_;
	}
	while (TRUE) {
		gunichar _tmp180_ = 0U;
		gboolean _tmp181_ = FALSE;
		const gchar* _tmp182_ = NULL;
		gunichar _tmp183_ = 0U;
		_tmp180_ = u;
		_tmp181_ = g_unichar_isspace (_tmp180_);
		if (!_tmp181_) {
			break;
		}
		_tmp182_ = css;
		string_get_next_char (_tmp182_, position, &_tmp183_);
		u = _tmp183_;
	}
	_tmp184_ = u;
	if (_tmp184_ != ((gunichar) ']')) {
		const gchar* _tmp185_ = NULL;
		GError* _tmp186_ = NULL;
		_tmp185_ = _ ("Invalid end of attribute selector");
		_tmp186_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_ATTRIBUTE, _tmp185_);
		_inner_error_ = _tmp186_;
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (data);
		_g_string_free0 (sb1);
		_g_string_free0 (sb);
		_g_object_unref0 (idata);
		return;
	}
	_tmp187_ = s;
	if (_tmp187_ == ((gunichar) 0)) {
		GXmlCssSelectorData* _tmp188_ = NULL;
		GString* _tmp189_ = NULL;
		const gchar* _tmp190_ = NULL;
		gchar* _tmp191_ = NULL;
		gchar* _tmp192_ = NULL;
		_tmp188_ = data;
		_tmp189_ = sb1;
		_tmp190_ = _tmp189_->str;
		_tmp191_ = string_strip (_tmp190_);
		_tmp192_ = _tmp191_;
		gxml_css_selector_data_set_value (_tmp188_, _tmp192_);
		_g_free0 (_tmp192_);
	} else {
		GXmlCssSelectorData* _tmp193_ = NULL;
		GString* _tmp194_ = NULL;
		const gchar* _tmp195_ = NULL;
		_tmp193_ = data;
		_tmp194_ = sb1;
		_tmp195_ = _tmp194_->str;
		gxml_css_selector_data_set_value (_tmp193_, _tmp195_);
	}
	_tmp196_ = self->priv->list;
	_tmp197_ = data;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp196_, _tmp197_);
	_g_object_unref0 (data);
	_g_string_free0 (sb1);
	_g_string_free0 (sb);
	_g_object_unref0 (idata);
}


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


static void gxml_css_selector_parser_parse_pseudo (GXmlCssSelectorParser* self, const gchar* css, gint* position, GError** error) {
	GXmlCssSelectorData* idata = NULL;
	GXmlCssSelectorData* _tmp0_ = NULL;
	GeeArrayList* _tmp1_ = NULL;
	GXmlCssSelectorData* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GString* sb = NULL;
	GString* _tmp4_ = NULL;
	gunichar u = 0U;
	gchar** valid_selectors = NULL;
	gchar* _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	gchar* _tmp22_ = NULL;
	gchar* _tmp23_ = NULL;
	gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
	gchar* _tmp26_ = NULL;
	gchar* _tmp27_ = NULL;
	gchar** _tmp28_ = NULL;
	gint valid_selectors_length1 = 0;
	gint _valid_selectors_size_ = 0;
	GString* _tmp29_ = NULL;
	const gchar* _tmp30_ = NULL;
	gchar** _tmp31_ = NULL;
	gint _tmp31__length1 = 0;
	GXmlCssSelectorData* data = NULL;
	GString* _tmp39_ = NULL;
	const gchar* _tmp40_ = NULL;
	GXmlCssSelectorData* _tmp41_ = NULL;
	GeeArrayList* _tmp42_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (css != NULL);
	_tmp0_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_INSIDE, "", "");
	idata = _tmp0_;
	_tmp1_ = self->priv->list;
	_tmp2_ = idata;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _tmp2_);
	_tmp3_ = *position;
	*position = _tmp3_ + 1;
	_tmp4_ = g_string_new ("");
	sb = _tmp4_;
	u = (gunichar) 0;
	while (TRUE) {
		gboolean _tmp5_ = FALSE;
		const gchar* _tmp6_ = NULL;
		gunichar _tmp7_ = 0U;
		gboolean _tmp8_ = FALSE;
		GString* _tmp15_ = NULL;
		gunichar _tmp16_ = 0U;
		_tmp6_ = css;
		_tmp8_ = string_get_next_char (_tmp6_, position, &_tmp7_);
		u = _tmp7_;
		if (_tmp8_) {
			gboolean _tmp9_ = FALSE;
			gboolean _tmp10_ = FALSE;
			gunichar _tmp11_ = 0U;
			gboolean _tmp12_ = FALSE;
			_tmp11_ = u;
			_tmp12_ = g_unichar_isalnum (_tmp11_);
			if (_tmp12_) {
				_tmp10_ = TRUE;
			} else {
				gunichar _tmp13_ = 0U;
				_tmp13_ = u;
				_tmp10_ = _tmp13_ == ((gunichar) '-');
			}
			if (_tmp10_) {
				_tmp9_ = TRUE;
			} else {
				gunichar _tmp14_ = 0U;
				_tmp14_ = u;
				_tmp9_ = _tmp14_ == ((gunichar) ':');
			}
			_tmp5_ = _tmp9_;
		} else {
			_tmp5_ = FALSE;
		}
		if (!_tmp5_) {
			break;
		}
		_tmp15_ = sb;
		_tmp16_ = u;
		g_string_append_unichar (_tmp15_, _tmp16_);
	}
	_tmp17_ = g_strdup ("root");
	_tmp18_ = g_strdup ("checked");
	_tmp19_ = g_strdup ("disabled");
	_tmp20_ = g_strdup ("empty");
	_tmp21_ = g_strdup ("enable");
	_tmp22_ = g_strdup ("first-child");
	_tmp23_ = g_strdup (":first-letter");
	_tmp24_ = g_strdup (":first-line");
	_tmp25_ = g_strdup ("first-of-type");
	_tmp26_ = g_strdup ("last-child");
	_tmp27_ = g_strdup ("last-of-type");
	_tmp28_ = g_new0 (gchar*, 11 + 1);
	_tmp28_[0] = _tmp17_;
	_tmp28_[1] = _tmp18_;
	_tmp28_[2] = _tmp19_;
	_tmp28_[3] = _tmp20_;
	_tmp28_[4] = _tmp21_;
	_tmp28_[5] = _tmp22_;
	_tmp28_[6] = _tmp23_;
	_tmp28_[7] = _tmp24_;
	_tmp28_[8] = _tmp25_;
	_tmp28_[9] = _tmp26_;
	_tmp28_[10] = _tmp27_;
	valid_selectors = _tmp28_;
	valid_selectors_length1 = 11;
	_valid_selectors_size_ = valid_selectors_length1;
	_tmp29_ = sb;
	_tmp30_ = _tmp29_->str;
	_tmp31_ = valid_selectors;
	_tmp31__length1 = valid_selectors_length1;
	if (!_vala_string_array_contains (_tmp31_, _tmp31__length1, _tmp30_)) {
		const gchar* _tmp32_ = NULL;
		GString* _tmp33_ = NULL;
		const gchar* _tmp34_ = NULL;
		gchar* _tmp35_ = NULL;
		gchar* _tmp36_ = NULL;
		GError* _tmp37_ = NULL;
		GError* _tmp38_ = NULL;
		_tmp32_ = _ ("Invalid pseudo class selector %s");
		_tmp33_ = sb;
		_tmp34_ = _tmp33_->str;
		_tmp35_ = g_strdup_printf (_tmp32_, _tmp34_);
		_tmp36_ = _tmp35_;
		_tmp37_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_INVALID, _tmp36_);
		_tmp38_ = _tmp37_;
		_g_free0 (_tmp36_);
		_inner_error_ = _tmp38_;
		g_propagate_error (error, _inner_error_);
		valid_selectors = (_vala_array_free (valid_selectors, valid_selectors_length1, (GDestroyNotify) g_free), NULL);
		_g_string_free0 (sb);
		_g_object_unref0 (idata);
		return;
	}
	_tmp39_ = sb;
	_tmp40_ = _tmp39_->str;
	_tmp41_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_PSEUDO, _tmp40_, "");
	data = _tmp41_;
	_tmp42_ = self->priv->list;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp42_, data);
	_g_object_unref0 (data);
	valid_selectors = (_vala_array_free (valid_selectors, valid_selectors_length1, (GDestroyNotify) g_free), NULL);
	_g_string_free0 (sb);
	_g_object_unref0 (idata);
}


static gunichar string_get_char (const gchar* self, glong index) {
	gunichar result = 0U;
	glong _tmp0_ = 0L;
	gunichar _tmp1_ = 0U;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = index;
	_tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_);
	result = _tmp1_;
	return result;
}


static gboolean string_get_prev_char (const gchar* self, gint* index, gunichar* c) {
	gunichar _vala_c = 0U;
	gboolean result = FALSE;
	gint _tmp0_ = 0;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = *index;
	if (0 < _tmp0_) {
		gint _tmp1_ = 0;
		gchar* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		gunichar _tmp4_ = 0U;
		_tmp1_ = *index;
		_tmp2_ = g_utf8_prev_char (((gchar*) self) + _tmp1_);
		*index = (gint) (_tmp2_ - ((gchar*) self));
		_tmp3_ = *index;
		_tmp4_ = g_utf8_get_char (((gchar*) self) + _tmp3_);
		_vala_c = _tmp4_;
		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;
	}
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_ = NULL;
	glong _tmp1_ = 0L;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	_tmp0_ = str;
	_tmp1_ = maxlen;
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
	end = _tmp2_;
	_tmp3_ = end;
	if (_tmp3_ == NULL) {
		glong _tmp4_ = 0L;
		_tmp4_ = maxlen;
		result = _tmp4_;
		return result;
	} else {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		_tmp5_ = end;
		_tmp6_ = str;
		result = (glong) (_tmp5_ - _tmp6_);
		return result;
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_ = 0L;
	glong _tmp8_ = 0L;
	glong _tmp14_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	glong _tmp21_ = 0L;
	gchar* _tmp22_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = offset;
	if (_tmp1_ >= ((glong) 0)) {
		glong _tmp2_ = 0L;
		_tmp2_ = len;
		_tmp0_ = _tmp2_ >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
		glong _tmp5_ = 0L;
		_tmp3_ = offset;
		_tmp4_ = len;
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
		string_length = _tmp5_;
	} else {
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		_tmp6_ = strlen (self);
		_tmp7_ = _tmp6_;
		string_length = (glong) _tmp7_;
	}
	_tmp8_ = offset;
	if (_tmp8_ < ((glong) 0)) {
		glong _tmp9_ = 0L;
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
		_tmp9_ = string_length;
		_tmp10_ = offset;
		offset = _tmp9_ + _tmp10_;
		_tmp11_ = offset;
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
	} else {
		glong _tmp12_ = 0L;
		glong _tmp13_ = 0L;
		_tmp12_ = offset;
		_tmp13_ = string_length;
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
	}
	_tmp14_ = len;
	if (_tmp14_ < ((glong) 0)) {
		glong _tmp15_ = 0L;
		glong _tmp16_ = 0L;
		_tmp15_ = string_length;
		_tmp16_ = offset;
		len = _tmp15_ - _tmp16_;
	}
	_tmp17_ = offset;
	_tmp18_ = len;
	_tmp19_ = string_length;
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
	_tmp20_ = offset;
	_tmp21_ = len;
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
	result = _tmp22_;
	return result;
}


void gxml_css_selector_parser_parse (GXmlCssSelectorParser* self, const gchar* query, GError** error) {
	gchar* css = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gint position = 0;
	gunichar u = 0U;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (query != NULL);
	_tmp0_ = query;
	_tmp1_ = string_strip (_tmp0_);
	css = _tmp1_;
	_tmp2_ = css;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ == 0) {
		const gchar* _tmp5_ = NULL;
		GError* _tmp6_ = NULL;
		_tmp5_ = _ ("Invalid string length.");
		_tmp6_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_LENGTH, _tmp5_);
		_inner_error_ = _tmp6_;
		g_propagate_error (error, _inner_error_);
		_g_free0 (css);
		return;
	}
	position = 0;
	u = (gunichar) 0;
	while (TRUE) {
		gint _tmp7_ = 0;
		const gchar* _tmp8_ = NULL;
		gint _tmp9_ = 0;
		gint _tmp10_ = 0;
		const gchar* _tmp11_ = NULL;
		gint _tmp12_ = 0;
		gunichar _tmp13_ = 0U;
		gunichar _tmp14_ = 0U;
		gboolean _tmp15_ = FALSE;
		GeeList* _tmp23_ = NULL;
		GeeList* _tmp24_ = NULL;
		gint _tmp25_ = 0;
		gint _tmp26_ = 0;
		gunichar _tmp57_ = 0U;
		_tmp7_ = position;
		_tmp8_ = css;
		_tmp9_ = strlen (_tmp8_);
		_tmp10_ = _tmp9_;
		if (!(_tmp7_ < _tmp10_)) {
			break;
		}
		_tmp11_ = css;
		_tmp12_ = position;
		_tmp13_ = string_get_char (_tmp11_, (glong) _tmp12_);
		u = _tmp13_;
		_tmp14_ = u;
		_tmp15_ = g_unichar_isspace (_tmp14_);
		if (_tmp15_) {
			const gchar* _tmp16_ = NULL;
			gunichar _tmp17_ = 0U;
			gint _tmp22_ = 0;
			_tmp16_ = css;
			string_get_next_char (_tmp16_, &position, &_tmp17_);
			u = _tmp17_;
			while (TRUE) {
				gunichar _tmp18_ = 0U;
				gboolean _tmp19_ = FALSE;
				const gchar* _tmp20_ = NULL;
				gunichar _tmp21_ = 0U;
				_tmp18_ = u;
				_tmp19_ = g_unichar_isspace (_tmp18_);
				if (!_tmp19_) {
					break;
				}
				_tmp20_ = css;
				string_get_next_char (_tmp20_, &position, &_tmp21_);
				u = _tmp21_;
			}
			_tmp22_ = position;
			position = _tmp22_ - 1;
		}
		_tmp23_ = gxml_css_selector_parser_get_selectors (self);
		_tmp24_ = _tmp23_;
		_tmp25_ = gee_collection_get_size ((GeeCollection*) _tmp24_);
		_tmp26_ = _tmp25_;
		if (_tmp26_ > 0) {
			GXmlCssSelectorData* ps = NULL;
			GeeList* _tmp27_ = NULL;
			GeeList* _tmp28_ = NULL;
			GeeList* _tmp29_ = NULL;
			GeeList* _tmp30_ = NULL;
			gint _tmp31_ = 0;
			gint _tmp32_ = 0;
			gpointer _tmp33_ = NULL;
			GXmlCssSelectorData* _tmp34_ = NULL;
			_tmp27_ = gxml_css_selector_parser_get_selectors (self);
			_tmp28_ = _tmp27_;
			_tmp29_ = gxml_css_selector_parser_get_selectors (self);
			_tmp30_ = _tmp29_;
			_tmp31_ = gee_collection_get_size ((GeeCollection*) _tmp30_);
			_tmp32_ = _tmp31_;
			_tmp33_ = gee_list_get (_tmp28_, _tmp32_ - 1);
			ps = (GXmlCssSelectorData*) _tmp33_;
			_tmp34_ = ps;
			if (_tmp34_ != NULL) {
				GXmlCssSelectorData* _tmp35_ = NULL;
				GXmlCssSelectorType _tmp36_ = 0;
				GXmlCssSelectorType _tmp37_ = 0;
				_tmp35_ = ps;
				_tmp36_ = gxml_css_selector_data_get_selector_type (_tmp35_);
				_tmp37_ = _tmp36_;
				if (_tmp37_ == GXML_CSS_SELECTOR_TYPE_ELEMENT) {
					const gchar* _tmp38_ = NULL;
					gunichar _tmp39_ = 0U;
					gunichar _tmp40_ = 0U;
					_tmp38_ = css;
					string_get_prev_char (_tmp38_, &position, &_tmp39_);
					u = _tmp39_;
					_tmp40_ = u;
					if (_tmp40_ == ((gunichar) '.')) {
						const gchar* _tmp41_ = NULL;
						_tmp41_ = css;
						gxml_css_selector_parser_parse_class (self, _tmp41_, &position);
						_g_object_unref0 (ps);
						continue;
					} else {
						gunichar _tmp42_ = 0U;
						_tmp42_ = u;
						if (_tmp42_ == ((gunichar) '#')) {
							const gchar* _tmp43_ = NULL;
							_tmp43_ = css;
							gxml_css_selector_parser_parse_id (self, _tmp43_, &position);
							_g_object_unref0 (ps);
							continue;
						} else {
							gunichar _tmp44_ = 0U;
							_tmp44_ = u;
							if (_tmp44_ == ((gunichar) '[')) {
								const gchar* _tmp45_ = NULL;
								_tmp45_ = css;
								gxml_css_selector_parser_parse_attribute (self, _tmp45_, &position, &_inner_error_);
								if (G_UNLIKELY (_inner_error_ != NULL)) {
									g_propagate_error (error, _inner_error_);
									_g_object_unref0 (ps);
									_g_free0 (css);
									return;
								}
								_g_object_unref0 (ps);
								continue;
							} else {
								gunichar _tmp46_ = 0U;
								_tmp46_ = u;
								if (_tmp46_ == ((gunichar) ':')) {
									const gchar* _tmp47_ = NULL;
									_tmp47_ = css;
									gxml_css_selector_parser_parse_pseudo (self, _tmp47_, &position, &_inner_error_);
									if (G_UNLIKELY (_inner_error_ != NULL)) {
										g_propagate_error (error, _inner_error_);
										_g_object_unref0 (ps);
										_g_free0 (css);
										return;
									}
									_g_object_unref0 (ps);
									continue;
								} else {
									const gchar* _tmp48_ = NULL;
									const gchar* _tmp49_ = NULL;
									gint _tmp50_ = 0;
									gchar* _tmp51_ = NULL;
									gchar* _tmp52_ = NULL;
									gchar* _tmp53_ = NULL;
									gchar* _tmp54_ = NULL;
									GError* _tmp55_ = NULL;
									GError* _tmp56_ = NULL;
									_tmp48_ = _ ("Invalid '%s' character.");
									_tmp49_ = css;
									_tmp50_ = position;
									_tmp51_ = string_substring (_tmp49_, (glong) _tmp50_, (glong) 1);
									_tmp52_ = _tmp51_;
									_tmp53_ = g_strdup_printf (_tmp48_, _tmp52_);
									_tmp54_ = _tmp53_;
									_tmp55_ = g_error_new_literal (GXML_CSS_SELECTOR_ERROR, GXML_CSS_SELECTOR_ERROR_TYPE, _tmp54_);
									_tmp56_ = _tmp55_;
									_g_free0 (_tmp54_);
									_g_free0 (_tmp52_);
									_inner_error_ = _tmp56_;
									g_propagate_error (error, _inner_error_);
									_g_object_unref0 (ps);
									_g_free0 (css);
									return;
								}
							}
						}
					}
				}
			}
			_g_object_unref0 (ps);
		}
		_tmp57_ = u;
		if (_tmp57_ == ((gunichar) '*')) {
			const gchar* _tmp58_ = NULL;
			_tmp58_ = css;
			gxml_css_selector_parser_parse_all (self, _tmp58_, &position);
		} else {
			gunichar _tmp59_ = 0U;
			_tmp59_ = u;
			if (_tmp59_ == ((gunichar) '.')) {
				const gchar* _tmp60_ = NULL;
				_tmp60_ = css;
				gxml_css_selector_parser_parse_class (self, _tmp60_, &position);
				continue;
			} else {
				gunichar _tmp61_ = 0U;
				gboolean _tmp62_ = FALSE;
				_tmp61_ = u;
				_tmp62_ = g_unichar_isalnum (_tmp61_);
				if (_tmp62_) {
					const gchar* _tmp63_ = NULL;
					_tmp63_ = css;
					gxml_css_selector_parser_parse_element (self, _tmp63_, &position);
				} else {
					gunichar _tmp64_ = 0U;
					_tmp64_ = u;
					if (_tmp64_ == ((gunichar) ',')) {
						gint _tmp65_ = 0;
						GXmlCssSelectorData* data = NULL;
						GXmlCssSelectorData* _tmp66_ = NULL;
						GeeArrayList* _tmp67_ = NULL;
						GXmlCssSelectorData* _tmp68_ = NULL;
						_tmp65_ = position;
						position = _tmp65_ + 1;
						_tmp66_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_AND, ",", "");
						data = _tmp66_;
						_tmp67_ = self->priv->list;
						_tmp68_ = data;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp67_, _tmp68_);
						_g_object_unref0 (data);
					} else {
						gunichar _tmp69_ = 0U;
						_tmp69_ = u;
						if (_tmp69_ == ((gunichar) '+')) {
							gint _tmp70_ = 0;
							GXmlCssSelectorData* data = NULL;
							GXmlCssSelectorData* _tmp71_ = NULL;
							GeeArrayList* _tmp72_ = NULL;
							GXmlCssSelectorData* _tmp73_ = NULL;
							_tmp70_ = position;
							position = _tmp70_ + 1;
							_tmp71_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_AFTER, "+", "");
							data = _tmp71_;
							_tmp72_ = self->priv->list;
							_tmp73_ = data;
							gee_abstract_collection_add ((GeeAbstractCollection*) _tmp72_, _tmp73_);
							_g_object_unref0 (data);
						} else {
							gunichar _tmp74_ = 0U;
							_tmp74_ = u;
							if (_tmp74_ == ((gunichar) '~')) {
								gint _tmp75_ = 0;
								GXmlCssSelectorData* data = NULL;
								GXmlCssSelectorData* _tmp76_ = NULL;
								GeeArrayList* _tmp77_ = NULL;
								GXmlCssSelectorData* _tmp78_ = NULL;
								_tmp75_ = position;
								position = _tmp75_ + 1;
								_tmp76_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_BEFORE, "~", "");
								data = _tmp76_;
								_tmp77_ = self->priv->list;
								_tmp78_ = data;
								gee_abstract_collection_add ((GeeAbstractCollection*) _tmp77_, _tmp78_);
								_g_object_unref0 (data);
							} else {
								gunichar _tmp79_ = 0U;
								_tmp79_ = u;
								if (_tmp79_ == ((gunichar) '>')) {
									gint _tmp80_ = 0;
									GXmlCssSelectorData* data = NULL;
									GXmlCssSelectorData* _tmp81_ = NULL;
									GeeArrayList* _tmp82_ = NULL;
									GXmlCssSelectorData* _tmp83_ = NULL;
									_tmp80_ = position;
									position = _tmp80_ + 1;
									_tmp81_ = gxml_css_selector_data_new_with_values (GXML_CSS_SELECTOR_TYPE_PARENT, ">", "");
									data = _tmp81_;
									_tmp82_ = self->priv->list;
									_tmp83_ = data;
									gee_abstract_collection_add ((GeeAbstractCollection*) _tmp82_, _tmp83_);
									_g_object_unref0 (data);
								}
							}
						}
					}
				}
			}
		}
	}
	_g_free0 (css);
}


gboolean gxml_css_selector_parser_match (GXmlCssSelectorParser* self, GXmlDomElement* element, GError** error) {
	gboolean result = FALSE;
	gboolean is_element = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (element != NULL, FALSE);
	is_element = FALSE;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_ = 0;
				GeeList* _tmp3_ = NULL;
				GeeList* _tmp4_ = NULL;
				gint _tmp5_ = 0;
				gint _tmp6_ = 0;
				GXmlCssSelectorData* s = NULL;
				GeeList* _tmp7_ = NULL;
				GeeList* _tmp8_ = NULL;
				gint _tmp9_ = 0;
				gpointer _tmp10_ = NULL;
				GXmlCssSelectorData* _tmp11_ = NULL;
				GXmlCssSelectorType _tmp12_ = 0;
				GXmlCssSelectorType _tmp13_ = 0;
				GXmlCssSelectorData* _tmp14_ = NULL;
				GXmlCssSelectorType _tmp15_ = 0;
				GXmlCssSelectorType _tmp16_ = 0;
				GXmlCssSelectorData* _tmp17_ = NULL;
				GXmlCssSelectorType _tmp18_ = 0;
				GXmlCssSelectorType _tmp19_ = 0;
				gboolean _tmp37_ = FALSE;
				gboolean _tmp38_ = FALSE;
				gboolean _tmp48_ = FALSE;
				gboolean _tmp49_ = FALSE;
				gboolean _tmp63_ = FALSE;
				gboolean _tmp64_ = FALSE;
				gboolean _tmp86_ = FALSE;
				gboolean _tmp87_ = FALSE;
				gboolean _tmp102_ = FALSE;
				gboolean _tmp103_ = FALSE;
				gboolean _tmp118_ = FALSE;
				gboolean _tmp119_ = FALSE;
				gboolean _tmp137_ = FALSE;
				gboolean _tmp138_ = FALSE;
				GXmlCssSelectorData* _tmp304_ = NULL;
				GXmlCssSelectorType _tmp305_ = 0;
				GXmlCssSelectorType _tmp306_ = 0;
				if (!_tmp0_) {
					gint _tmp1_ = 0;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = i;
				_tmp3_ = gxml_css_selector_parser_get_selectors (self);
				_tmp4_ = _tmp3_;
				_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
				_tmp6_ = _tmp5_;
				if (!(_tmp2_ < _tmp6_)) {
					break;
				}
				_tmp7_ = gxml_css_selector_parser_get_selectors (self);
				_tmp8_ = _tmp7_;
				_tmp9_ = i;
				_tmp10_ = gee_list_get (_tmp8_, _tmp9_);
				s = (GXmlCssSelectorData*) _tmp10_;
				_tmp11_ = s;
				_tmp12_ = gxml_css_selector_data_get_selector_type (_tmp11_);
				_tmp13_ = _tmp12_;
				if (_tmp13_ == GXML_CSS_SELECTOR_TYPE_ALL) {
					result = TRUE;
					_g_object_unref0 (s);
					return result;
				}
				_tmp14_ = s;
				_tmp15_ = gxml_css_selector_data_get_selector_type (_tmp14_);
				_tmp16_ = _tmp15_;
				if (_tmp16_ == GXML_CSS_SELECTOR_TYPE_INSIDE) {
					_g_object_unref0 (s);
					continue;
				}
				_tmp17_ = s;
				_tmp18_ = gxml_css_selector_data_get_selector_type (_tmp17_);
				_tmp19_ = _tmp18_;
				if (_tmp19_ == GXML_CSS_SELECTOR_TYPE_ELEMENT) {
					GXmlDomElement* _tmp20_ = NULL;
					gchar* _tmp21_ = NULL;
					gchar* _tmp22_ = NULL;
					gchar* _tmp23_ = NULL;
					gchar* _tmp24_ = NULL;
					gchar* _tmp25_ = NULL;
					GXmlCssSelectorData* _tmp26_ = NULL;
					const gchar* _tmp27_ = NULL;
					const gchar* _tmp28_ = NULL;
					gchar* _tmp29_ = NULL;
					gchar* _tmp30_ = NULL;
					gboolean _tmp31_ = FALSE;
					gint _tmp32_ = 0;
					GeeList* _tmp33_ = NULL;
					GeeList* _tmp34_ = NULL;
					gint _tmp35_ = 0;
					gint _tmp36_ = 0;
					_tmp20_ = element;
					_tmp21_ = gxml_dom_node_get_node_name ((GXmlDomNode*) _tmp20_);
					_tmp22_ = _tmp21_;
					_tmp23_ = _tmp22_;
					_tmp24_ = g_utf8_strdown (_tmp23_, (gssize) -1);
					_tmp25_ = _tmp24_;
					_tmp26_ = s;
					_tmp27_ = gxml_css_selector_data_get_data (_tmp26_);
					_tmp28_ = _tmp27_;
					_tmp29_ = g_utf8_strdown (_tmp28_, (gssize) -1);
					_tmp30_ = _tmp29_;
					_tmp31_ = g_strcmp0 (_tmp25_, _tmp30_) != 0;
					_g_free0 (_tmp30_);
					_g_free0 (_tmp25_);
					_g_free0 (_tmp23_);
					if (_tmp31_) {
						result = FALSE;
						_g_object_unref0 (s);
						return result;
					}
					is_element = TRUE;
					_tmp32_ = i;
					_tmp33_ = gxml_css_selector_parser_get_selectors (self);
					_tmp34_ = _tmp33_;
					_tmp35_ = gee_collection_get_size ((GeeCollection*) _tmp34_);
					_tmp36_ = _tmp35_;
					if ((_tmp32_ + 1) >= _tmp36_) {
						result = TRUE;
						_g_object_unref0 (s);
						return result;
					}
					_g_object_unref0 (s);
					continue;
				}
				_tmp38_ = is_element;
				if (_tmp38_) {
					GXmlCssSelectorData* _tmp39_ = NULL;
					GXmlCssSelectorType _tmp40_ = 0;
					GXmlCssSelectorType _tmp41_ = 0;
					_tmp39_ = s;
					_tmp40_ = gxml_css_selector_data_get_selector_type (_tmp39_);
					_tmp41_ = _tmp40_;
					_tmp37_ = _tmp41_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE;
				} else {
					_tmp37_ = FALSE;
				}
				if (_tmp37_) {
					gchar* p = NULL;
					GXmlDomElement* _tmp42_ = NULL;
					GXmlCssSelectorData* _tmp43_ = NULL;
					const gchar* _tmp44_ = NULL;
					const gchar* _tmp45_ = NULL;
					gchar* _tmp46_ = NULL;
					const gchar* _tmp47_ = NULL;
					_tmp42_ = element;
					_tmp43_ = s;
					_tmp44_ = gxml_css_selector_data_get_data (_tmp43_);
					_tmp45_ = _tmp44_;
					_tmp46_ = gxml_dom_element_get_attribute (_tmp42_, _tmp45_);
					p = _tmp46_;
					_tmp47_ = p;
					if (_tmp47_ != NULL) {
						result = TRUE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_g_free0 (p);
				}
				_tmp49_ = is_element;
				if (_tmp49_) {
					GXmlCssSelectorData* _tmp50_ = NULL;
					GXmlCssSelectorType _tmp51_ = 0;
					GXmlCssSelectorType _tmp52_ = 0;
					_tmp50_ = s;
					_tmp51_ = gxml_css_selector_data_get_selector_type (_tmp50_);
					_tmp52_ = _tmp51_;
					_tmp48_ = _tmp52_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_EQUAL;
				} else {
					_tmp48_ = FALSE;
				}
				if (_tmp48_) {
					gchar* p = NULL;
					GXmlDomElement* _tmp53_ = NULL;
					GXmlCssSelectorData* _tmp54_ = NULL;
					const gchar* _tmp55_ = NULL;
					const gchar* _tmp56_ = NULL;
					gchar* _tmp57_ = NULL;
					const gchar* _tmp58_ = NULL;
					const gchar* _tmp59_ = NULL;
					GXmlCssSelectorData* _tmp60_ = NULL;
					const gchar* _tmp61_ = NULL;
					const gchar* _tmp62_ = NULL;
					_tmp53_ = element;
					_tmp54_ = s;
					_tmp55_ = gxml_css_selector_data_get_data (_tmp54_);
					_tmp56_ = _tmp55_;
					_tmp57_ = gxml_dom_element_get_attribute (_tmp53_, _tmp56_);
					p = _tmp57_;
					_tmp58_ = p;
					if (_tmp58_ == NULL) {
						result = FALSE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_tmp59_ = p;
					_tmp60_ = s;
					_tmp61_ = gxml_css_selector_data_get_value (_tmp60_);
					_tmp62_ = _tmp61_;
					if (g_strcmp0 (_tmp59_, _tmp62_) == 0) {
						result = TRUE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_g_free0 (p);
				}
				_tmp64_ = is_element;
				if (_tmp64_) {
					GXmlCssSelectorData* _tmp65_ = NULL;
					GXmlCssSelectorType _tmp66_ = 0;
					GXmlCssSelectorType _tmp67_ = 0;
					_tmp65_ = s;
					_tmp66_ = gxml_css_selector_data_get_selector_type (_tmp65_);
					_tmp67_ = _tmp66_;
					_tmp63_ = _tmp67_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_CONTAINS;
				} else {
					_tmp63_ = FALSE;
				}
				if (_tmp63_) {
					gchar* p = NULL;
					GXmlDomElement* _tmp68_ = NULL;
					GXmlCssSelectorData* _tmp69_ = NULL;
					const gchar* _tmp70_ = NULL;
					const gchar* _tmp71_ = NULL;
					gchar* _tmp72_ = NULL;
					const gchar* _tmp73_ = NULL;
					GXmlGDomTokenList* tl = NULL;
					GXmlDomElement* _tmp74_ = NULL;
					GXmlCssSelectorData* _tmp75_ = NULL;
					const gchar* _tmp76_ = NULL;
					const gchar* _tmp77_ = NULL;
					GXmlGDomTokenList* _tmp78_ = NULL;
					gboolean _tmp79_ = FALSE;
					GXmlGDomTokenList* _tmp80_ = NULL;
					GXmlCssSelectorData* _tmp81_ = NULL;
					const gchar* _tmp82_ = NULL;
					const gchar* _tmp83_ = NULL;
					gboolean _tmp84_ = FALSE;
					_tmp68_ = element;
					_tmp69_ = s;
					_tmp70_ = gxml_css_selector_data_get_data (_tmp69_);
					_tmp71_ = _tmp70_;
					_tmp72_ = gxml_dom_element_get_attribute (_tmp68_, _tmp71_);
					p = _tmp72_;
					_tmp73_ = p;
					if (_tmp73_ == NULL) {
						result = FALSE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_tmp74_ = element;
					_tmp75_ = s;
					_tmp76_ = gxml_css_selector_data_get_data (_tmp75_);
					_tmp77_ = _tmp76_;
					_tmp78_ = gxml_gdom_token_list_new (_tmp74_, _tmp77_);
					tl = _tmp78_;
					_tmp80_ = tl;
					_tmp81_ = s;
					_tmp82_ = gxml_css_selector_data_get_value (_tmp81_);
					_tmp83_ = _tmp82_;
					_tmp84_ = gxml_dom_token_list_contains ((GXmlDomTokenList*) _tmp80_, _tmp83_, &_inner_error_);
					_tmp79_ = _tmp84_;
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						gboolean _tmp85_ = FALSE;
						g_propagate_error (error, _inner_error_);
						_g_object_unref0 (tl);
						_g_free0 (p);
						_g_object_unref0 (s);
						return _tmp85_;
					}
					if (_tmp79_) {
						result = TRUE;
						_g_object_unref0 (tl);
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_g_object_unref0 (tl);
					_g_free0 (p);
				}
				_tmp87_ = is_element;
				if (_tmp87_) {
					GXmlCssSelectorData* _tmp88_ = NULL;
					GXmlCssSelectorType _tmp89_ = 0;
					GXmlCssSelectorType _tmp90_ = 0;
					_tmp88_ = s;
					_tmp89_ = gxml_css_selector_data_get_selector_type (_tmp88_);
					_tmp90_ = _tmp89_;
					_tmp86_ = _tmp90_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_START_WITH;
				} else {
					_tmp86_ = FALSE;
				}
				if (_tmp86_) {
					gchar* p = NULL;
					GXmlDomElement* _tmp91_ = NULL;
					GXmlCssSelectorData* _tmp92_ = NULL;
					const gchar* _tmp93_ = NULL;
					const gchar* _tmp94_ = NULL;
					gchar* _tmp95_ = NULL;
					const gchar* _tmp96_ = NULL;
					const gchar* _tmp97_ = NULL;
					GXmlCssSelectorData* _tmp98_ = NULL;
					const gchar* _tmp99_ = NULL;
					const gchar* _tmp100_ = NULL;
					gboolean _tmp101_ = FALSE;
					_tmp91_ = element;
					_tmp92_ = s;
					_tmp93_ = gxml_css_selector_data_get_data (_tmp92_);
					_tmp94_ = _tmp93_;
					_tmp95_ = gxml_dom_element_get_attribute (_tmp91_, _tmp94_);
					p = _tmp95_;
					_tmp96_ = p;
					if (_tmp96_ == NULL) {
						result = FALSE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_tmp97_ = p;
					_tmp98_ = s;
					_tmp99_ = gxml_css_selector_data_get_value (_tmp98_);
					_tmp100_ = _tmp99_;
					_tmp101_ = g_str_has_prefix (_tmp97_, _tmp100_);
					if (_tmp101_) {
						result = TRUE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_g_free0 (p);
				}
				_tmp103_ = is_element;
				if (_tmp103_) {
					GXmlCssSelectorData* _tmp104_ = NULL;
					GXmlCssSelectorType _tmp105_ = 0;
					GXmlCssSelectorType _tmp106_ = 0;
					_tmp104_ = s;
					_tmp105_ = gxml_css_selector_data_get_selector_type (_tmp104_);
					_tmp106_ = _tmp105_;
					_tmp102_ = _tmp106_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_END_WITH;
				} else {
					_tmp102_ = FALSE;
				}
				if (_tmp102_) {
					gchar* p = NULL;
					GXmlDomElement* _tmp107_ = NULL;
					GXmlCssSelectorData* _tmp108_ = NULL;
					const gchar* _tmp109_ = NULL;
					const gchar* _tmp110_ = NULL;
					gchar* _tmp111_ = NULL;
					const gchar* _tmp112_ = NULL;
					const gchar* _tmp113_ = NULL;
					GXmlCssSelectorData* _tmp114_ = NULL;
					const gchar* _tmp115_ = NULL;
					const gchar* _tmp116_ = NULL;
					gboolean _tmp117_ = FALSE;
					_tmp107_ = element;
					_tmp108_ = s;
					_tmp109_ = gxml_css_selector_data_get_data (_tmp108_);
					_tmp110_ = _tmp109_;
					_tmp111_ = gxml_dom_element_get_attribute (_tmp107_, _tmp110_);
					p = _tmp111_;
					_tmp112_ = p;
					if (_tmp112_ == NULL) {
						result = FALSE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_tmp113_ = p;
					_tmp114_ = s;
					_tmp115_ = gxml_css_selector_data_get_value (_tmp114_);
					_tmp116_ = _tmp115_;
					_tmp117_ = g_str_has_suffix (_tmp113_, _tmp116_);
					if (_tmp117_) {
						result = TRUE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_g_free0 (p);
				}
				_tmp119_ = is_element;
				if (_tmp119_) {
					GXmlCssSelectorData* _tmp120_ = NULL;
					GXmlCssSelectorType _tmp121_ = 0;
					GXmlCssSelectorType _tmp122_ = 0;
					_tmp120_ = s;
					_tmp121_ = gxml_css_selector_data_get_selector_type (_tmp120_);
					_tmp122_ = _tmp121_;
					_tmp118_ = _tmp122_ == GXML_CSS_SELECTOR_TYPE_ATTRIBUTE_START_WITH_HYPHEN;
				} else {
					_tmp118_ = FALSE;
				}
				if (_tmp118_) {
					gchar* p = NULL;
					GXmlDomElement* _tmp123_ = NULL;
					GXmlCssSelectorData* _tmp124_ = NULL;
					const gchar* _tmp125_ = NULL;
					const gchar* _tmp126_ = NULL;
					gchar* _tmp127_ = NULL;
					const gchar* _tmp128_ = NULL;
					const gchar* _tmp129_ = NULL;
					GXmlCssSelectorData* _tmp130_ = NULL;
					const gchar* _tmp131_ = NULL;
					const gchar* _tmp132_ = NULL;
					gchar* _tmp133_ = NULL;
					gchar* _tmp134_ = NULL;
					gboolean _tmp135_ = FALSE;
					gboolean _tmp136_ = FALSE;
					_tmp123_ = element;
					_tmp124_ = s;
					_tmp125_ = gxml_css_selector_data_get_data (_tmp124_);
					_tmp126_ = _tmp125_;
					_tmp127_ = gxml_dom_element_get_attribute (_tmp123_, _tmp126_);
					p = _tmp127_;
					_tmp128_ = p;
					if (_tmp128_ == NULL) {
						result = FALSE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_tmp129_ = p;
					_tmp130_ = s;
					_tmp131_ = gxml_css_selector_data_get_value (_tmp130_);
					_tmp132_ = _tmp131_;
					_tmp133_ = g_strconcat (_tmp132_, "-", NULL);
					_tmp134_ = _tmp133_;
					_tmp135_ = g_str_has_suffix (_tmp129_, _tmp134_);
					_tmp136_ = _tmp135_;
					_g_free0 (_tmp134_);
					if (_tmp136_) {
						result = TRUE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_g_free0 (p);
				}
				_tmp138_ = is_element;
				if (_tmp138_) {
					GXmlCssSelectorData* _tmp139_ = NULL;
					GXmlCssSelectorType _tmp140_ = 0;
					GXmlCssSelectorType _tmp141_ = 0;
					_tmp139_ = s;
					_tmp140_ = gxml_css_selector_data_get_selector_type (_tmp139_);
					_tmp141_ = _tmp140_;
					_tmp137_ = _tmp141_ == GXML_CSS_SELECTOR_TYPE_PSEUDO;
				} else {
					_tmp137_ = FALSE;
				}
				if (_tmp137_) {
					GXmlCssSelectorData* _tmp142_ = NULL;
					const gchar* _tmp143_ = NULL;
					const gchar* _tmp144_ = NULL;
					gchar* _tmp145_ = NULL;
					gchar* _tmp146_ = NULL;
					gboolean _tmp147_ = FALSE;
					GXmlCssSelectorData* _tmp187_ = NULL;
					const gchar* _tmp188_ = NULL;
					const gchar* _tmp189_ = NULL;
					gchar* _tmp190_ = NULL;
					gchar* _tmp191_ = NULL;
					gboolean _tmp192_ = FALSE;
					GXmlCssSelectorData* _tmp196_ = NULL;
					const gchar* _tmp197_ = NULL;
					const gchar* _tmp198_ = NULL;
					gchar* _tmp199_ = NULL;
					gchar* _tmp200_ = NULL;
					gboolean _tmp201_ = FALSE;
					GXmlCssSelectorData* _tmp205_ = NULL;
					const gchar* _tmp206_ = NULL;
					const gchar* _tmp207_ = NULL;
					gchar* _tmp208_ = NULL;
					gchar* _tmp209_ = NULL;
					gboolean _tmp210_ = FALSE;
					GXmlCssSelectorData* _tmp214_ = NULL;
					const gchar* _tmp215_ = NULL;
					const gchar* _tmp216_ = NULL;
					gchar* _tmp217_ = NULL;
					gchar* _tmp218_ = NULL;
					gboolean _tmp219_ = FALSE;
					GXmlCssSelectorData* _tmp222_ = NULL;
					const gchar* _tmp223_ = NULL;
					const gchar* _tmp224_ = NULL;
					gchar* _tmp225_ = NULL;
					gchar* _tmp226_ = NULL;
					gboolean _tmp227_ = FALSE;
					GXmlCssSelectorData* _tmp263_ = NULL;
					const gchar* _tmp264_ = NULL;
					const gchar* _tmp265_ = NULL;
					gchar* _tmp266_ = NULL;
					gchar* _tmp267_ = NULL;
					gboolean _tmp268_ = FALSE;
					_tmp142_ = s;
					_tmp143_ = gxml_css_selector_data_get_data (_tmp142_);
					_tmp144_ = _tmp143_;
					_tmp145_ = g_utf8_strdown (_tmp144_, (gssize) -1);
					_tmp146_ = _tmp145_;
					_tmp147_ = g_strcmp0 (_tmp146_, "root") == 0;
					_g_free0 (_tmp146_);
					if (_tmp147_) {
						GXmlDomElement* _tmp148_ = NULL;
						GXmlDomElement* _tmp157_ = NULL;
						GXmlDomElement* _tmp169_ = NULL;
						gchar* _tmp170_ = NULL;
						gchar* _tmp171_ = NULL;
						gchar* _tmp172_ = NULL;
						gchar* _tmp173_ = NULL;
						gchar* _tmp174_ = NULL;
						GXmlDomElement* _tmp175_ = NULL;
						GXmlDomDocument* _tmp176_ = NULL;
						GXmlDomDocument* _tmp177_ = NULL;
						GXmlDomElement* _tmp178_ = NULL;
						GXmlDomElement* _tmp179_ = NULL;
						GXmlDomElement* _tmp180_ = NULL;
						gchar* _tmp181_ = NULL;
						gchar* _tmp182_ = NULL;
						gchar* _tmp183_ = NULL;
						gchar* _tmp184_ = NULL;
						gchar* _tmp185_ = NULL;
						gboolean _tmp186_ = FALSE;
						_tmp148_ = element;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp148_, GXML_TYPE_GOM_ELEMENT)) {
							GXmlDomElement* _tmp149_ = NULL;
							GXmlDomElement* _tmp150_ = NULL;
							GXmlDomDocument* _tmp151_ = NULL;
							GXmlDomDocument* _tmp152_ = NULL;
							GXmlDomElement* _tmp153_ = NULL;
							GXmlDomElement* _tmp154_ = NULL;
							GXmlDomElement* _tmp155_ = NULL;
							gboolean _tmp156_ = FALSE;
							_tmp149_ = element;
							_tmp150_ = element;
							_tmp151_ = gxml_dom_node_get_owner_document ((GXmlDomNode*) _tmp150_);
							_tmp152_ = _tmp151_;
							_tmp153_ = gxml_dom_document_get_document_element (_tmp152_);
							_tmp154_ = _tmp153_;
							_tmp155_ = _tmp154_;
							_tmp156_ = _tmp149_ != _tmp155_;
							_g_object_unref0 (_tmp155_);
							if (_tmp156_) {
								result = FALSE;
								_g_object_unref0 (s);
								return result;
							}
						}
						_tmp157_ = element;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp157_, GXML_TYPE_GELEMENT)) {
							GXmlDomElement* _tmp158_ = NULL;
							xmlNode* _tmp159_ = NULL;
							GXmlDomElement* _tmp160_ = NULL;
							GXmlDomDocument* _tmp161_ = NULL;
							GXmlDomDocument* _tmp162_ = NULL;
							GXmlDomElement* _tmp163_ = NULL;
							GXmlDomElement* _tmp164_ = NULL;
							GXmlGNode* _tmp165_ = NULL;
							GXmlGNode* _tmp166_ = NULL;
							xmlNode* _tmp167_ = NULL;
							gboolean _tmp168_ = FALSE;
							_tmp158_ = element;
							_tmp159_ = gxml_gnode_get_internal_node (G_TYPE_CHECK_INSTANCE_TYPE (_tmp158_, GXML_TYPE_GNODE) ? ((GXmlGNode*) _tmp158_) : NULL);
							_tmp160_ = element;
							_tmp161_ = gxml_dom_node_get_owner_document ((GXmlDomNode*) _tmp160_);
							_tmp162_ = _tmp161_;
							_tmp163_ = gxml_dom_document_get_document_element (_tmp162_);
							_tmp164_ = _tmp163_;
							_tmp165_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp164_, GXML_TYPE_GNODE) ? ((GXmlGNode*) _tmp164_) : NULL;
							if (_tmp165_ == NULL) {
								_g_object_unref0 (_tmp164_);
							}
							_tmp166_ = _tmp165_;
							_tmp167_ = gxml_gnode_get_internal_node (_tmp166_);
							_tmp168_ = _tmp159_ != _tmp167_;
							_g_object_unref0 (_tmp166_);
							if (_tmp168_) {
								result = FALSE;
								_g_object_unref0 (s);
								return result;
							}
						}
						_tmp169_ = element;
						_tmp170_ = gxml_dom_node_get_node_name ((GXmlDomNode*) _tmp169_);
						_tmp171_ = _tmp170_;
						_tmp172_ = _tmp171_;
						_tmp173_ = g_utf8_strdown (_tmp172_, (gssize) -1);
						_tmp174_ = _tmp173_;
						_tmp175_ = element;
						_tmp176_ = gxml_dom_node_get_owner_document ((GXmlDomNode*) _tmp175_);
						_tmp177_ = _tmp176_;
						_tmp178_ = gxml_dom_document_get_document_element (_tmp177_);
						_tmp179_ = _tmp178_;
						_tmp180_ = _tmp179_;
						_tmp181_ = gxml_dom_node_get_node_name ((GXmlDomNode*) _tmp180_);
						_tmp182_ = _tmp181_;
						_tmp183_ = _tmp182_;
						_tmp184_ = g_utf8_strdown (_tmp183_, (gssize) -1);
						_tmp185_ = _tmp184_;
						_tmp186_ = g_strcmp0 (_tmp174_, _tmp185_) == 0;
						_g_free0 (_tmp185_);
						_g_free0 (_tmp183_);
						_g_object_unref0 (_tmp180_);
						_g_free0 (_tmp174_);
						_g_free0 (_tmp172_);
						if (_tmp186_) {
							result = TRUE;
							_g_object_unref0 (s);
							return result;
						}
					}
					_tmp187_ = s;
					_tmp188_ = gxml_css_selector_data_get_data (_tmp187_);
					_tmp189_ = _tmp188_;
					_tmp190_ = g_utf8_strdown (_tmp189_, (gssize) -1);
					_tmp191_ = _tmp190_;
					_tmp192_ = g_strcmp0 (_tmp191_, "checked") == 0;
					_g_free0 (_tmp191_);
					if (_tmp192_) {
						GXmlDomElement* _tmp193_ = NULL;
						GXmlDomDocument* _tmp194_ = NULL;
						GXmlDomDocument* _tmp195_ = NULL;
						_tmp193_ = element;
						_tmp194_ = gxml_dom_node_get_owner_document ((GXmlDomNode*) _tmp193_);
						_tmp195_ = _tmp194_;
						if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp195_, GXML_TYPE_DOM_HTML_DOCUMENT)) {
							result = FALSE;
							_g_object_unref0 (s);
							return result;
						}
					}
					_tmp196_ = s;
					_tmp197_ = gxml_css_selector_data_get_data (_tmp196_);
					_tmp198_ = _tmp197_;
					_tmp199_ = g_utf8_strdown (_tmp198_, (gssize) -1);
					_tmp200_ = _tmp199_;
					_tmp201_ = g_strcmp0 (_tmp200_, "enable") == 0;
					_g_free0 (_tmp200_);
					if (_tmp201_) {
						GXmlDomElement* _tmp202_ = NULL;
						GXmlDomDocument* _tmp203_ = NULL;
						GXmlDomDocument* _tmp204_ = NULL;
						_tmp202_ = element;
						_tmp203_ = gxml_dom_node_get_owner_document ((GXmlDomNode*) _tmp202_);
						_tmp204_ = _tmp203_;
						if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp204_, GXML_TYPE_DOM_HTML_DOCUMENT)) {
							result = FALSE;
							_g_object_unref0 (s);
							return result;
						}
					}
					_tmp205_ = s;
					_tmp206_ = gxml_css_selector_data_get_data (_tmp205_);
					_tmp207_ = _tmp206_;
					_tmp208_ = g_utf8_strdown (_tmp207_, (gssize) -1);
					_tmp209_ = _tmp208_;
					_tmp210_ = g_strcmp0 (_tmp209_, "disabled") == 0;
					_g_free0 (_tmp209_);
					if (_tmp210_) {
						GXmlDomElement* _tmp211_ = NULL;
						GXmlDomDocument* _tmp212_ = NULL;
						GXmlDomDocument* _tmp213_ = NULL;
						_tmp211_ = element;
						_tmp212_ = gxml_dom_node_get_owner_document ((GXmlDomNode*) _tmp211_);
						_tmp213_ = _tmp212_;
						if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp213_, GXML_TYPE_DOM_HTML_DOCUMENT)) {
							result = FALSE;
							_g_object_unref0 (s);
							return result;
						}
					}
					_tmp214_ = s;
					_tmp215_ = gxml_css_selector_data_get_data (_tmp214_);
					_tmp216_ = _tmp215_;
					_tmp217_ = g_utf8_strdown (_tmp216_, (gssize) -1);
					_tmp218_ = _tmp217_;
					_tmp219_ = g_strcmp0 (_tmp218_, "empty") == 0;
					_g_free0 (_tmp218_);
					if (_tmp219_) {
						GXmlDomElement* _tmp220_ = NULL;
						gboolean _tmp221_ = FALSE;
						_tmp220_ = element;
						_tmp221_ = gxml_dom_node_has_child_nodes ((GXmlDomNode*) _tmp220_);
						if (!_tmp221_) {
							result = TRUE;
							_g_object_unref0 (s);
							return result;
						}
					}
					_tmp222_ = s;
					_tmp223_ = gxml_css_selector_data_get_data (_tmp222_);
					_tmp224_ = _tmp223_;
					_tmp225_ = g_utf8_strdown (_tmp224_, (gssize) -1);
					_tmp226_ = _tmp225_;
					_tmp227_ = g_strcmp0 (_tmp226_, "first-child") == 0;
					_g_free0 (_tmp226_);
					if (_tmp227_) {
						GXmlDomElement* _tmp228_ = NULL;
						GXmlDomNode* _tmp229_ = NULL;
						GXmlDomNode* _tmp230_ = NULL;
						GXmlDomNode* _tmp231_ = NULL;
						gboolean _tmp232_ = FALSE;
						GXmlDomElement* _tmp233_ = NULL;
						GXmlDomNode* _tmp234_ = NULL;
						GXmlDomNode* _tmp235_ = NULL;
						GXmlDomNode* _tmp236_ = NULL;
						gboolean _tmp237_ = FALSE;
						GXmlDomElement* _tmp238_ = NULL;
						GXmlDomElement* _tmp249_ = NULL;
						_tmp228_ = element;
						_tmp229_ = gxml_dom_node_get_parent_node ((GXmlDomNode*) _tmp228_);
						_tmp230_ = _tmp229_;
						_tmp231_ = _tmp230_;
						_tmp232_ = _tmp231_ == NULL;
						_g_object_unref0 (_tmp231_);
						if (_tmp232_) {
							result = FALSE;
							_g_object_unref0 (s);
							return result;
						}
						_tmp233_ = element;
						_tmp234_ = gxml_dom_node_get_parent_node ((GXmlDomNode*) _tmp233_);
						_tmp235_ = _tmp234_;
						_tmp236_ = _tmp235_;
						_tmp237_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp236_, GXML_TYPE_DOM_ELEMENT);
						_g_object_unref0 (_tmp236_);
						if (_tmp237_) {
							result = FALSE;
							_g_object_unref0 (s);
							return result;
						}
						_tmp238_ = element;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp238_, GXML_TYPE_GOM_ELEMENT)) {
							GXmlDomElement* _tmp239_ = NULL;
							GXmlDomElement* _tmp240_ = NULL;
							GXmlDomNode* _tmp241_ = NULL;
							GXmlDomNode* _tmp242_ = NULL;
							GXmlDomParentNode* _tmp243_ = NULL;
							GXmlDomParentNode* _tmp244_ = NULL;
							GXmlDomElement* _tmp245_ = NULL;
							GXmlDomElement* _tmp246_ = NULL;
							GXmlDomElement* _tmp247_ = NULL;
							gboolean _tmp248_ = FALSE;
							_tmp239_ = element;
							_tmp240_ = element;
							_tmp241_ = gxml_dom_node_get_parent_node ((GXmlDomNode*) _tmp240_);
							_tmp242_ = _tmp241_;
							_tmp243_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp242_, GXML_TYPE_DOM_PARENT_NODE) ? ((GXmlDomParentNode*) _tmp242_) : NULL;
							if (_tmp243_ == NULL) {
								_g_object_unref0 (_tmp242_);
							}
							_tmp244_ = _tmp243_;
							_tmp245_ = gxml_dom_parent_node_get_first_element_child (_tmp244_);
							_tmp246_ = _tmp245_;
							_tmp247_ = _tmp246_;
							_tmp248_ = _tmp239_ == _tmp247_;
							_g_object_unref0 (_tmp247_);
							_g_object_unref0 (_tmp244_);
							if (_tmp248_) {
								result = TRUE;
								_g_object_unref0 (s);
								return result;
							}
						}
						_tmp249_ = element;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp249_, GXML_TYPE_GELEMENT)) {
							GXmlDomElement* _tmp250_ = NULL;
							xmlNode* _tmp251_ = NULL;
							GXmlDomElement* _tmp252_ = NULL;
							GXmlDomNode* _tmp253_ = NULL;
							GXmlDomNode* _tmp254_ = NULL;
							GXmlDomParentNode* _tmp255_ = NULL;
							GXmlDomParentNode* _tmp256_ = NULL;
							GXmlDomElement* _tmp257_ = NULL;
							GXmlDomElement* _tmp258_ = NULL;
							GXmlGNode* _tmp259_ = NULL;
							GXmlGNode* _tmp260_ = NULL;
							xmlNode* _tmp261_ = NULL;
							gboolean _tmp262_ = FALSE;
							_tmp250_ = element;
							_tmp251_ = gxml_gnode_get_internal_node (G_TYPE_CHECK_INSTANCE_TYPE (_tmp250_, GXML_TYPE_GNODE) ? ((GXmlGNode*) _tmp250_) : NULL);
							_tmp252_ = element;
							_tmp253_ = gxml_dom_node_get_parent_node ((GXmlDomNode*) _tmp252_);
							_tmp254_ = _tmp253_;
							_tmp255_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp254_, GXML_TYPE_DOM_PARENT_NODE) ? ((GXmlDomParentNode*) _tmp254_) : NULL;
							if (_tmp255_ == NULL) {
								_g_object_unref0 (_tmp254_);
							}
							_tmp256_ = _tmp255_;
							_tmp257_ = gxml_dom_parent_node_get_first_element_child (_tmp256_);
							_tmp258_ = _tmp257_;
							_tmp259_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp258_, GXML_TYPE_GNODE) ? ((GXmlGNode*) _tmp258_) : NULL;
							if (_tmp259_ == NULL) {
								_g_object_unref0 (_tmp258_);
							}
							_tmp260_ = _tmp259_;
							_tmp261_ = gxml_gnode_get_internal_node (_tmp260_);
							_tmp262_ = _tmp251_ == _tmp261_;
							_g_object_unref0 (_tmp260_);
							_g_object_unref0 (_tmp256_);
							if (_tmp262_) {
								result = TRUE;
								_g_object_unref0 (s);
								return result;
							}
						}
					}
					_tmp263_ = s;
					_tmp264_ = gxml_css_selector_data_get_data (_tmp263_);
					_tmp265_ = _tmp264_;
					_tmp266_ = g_utf8_strdown (_tmp265_, (gssize) -1);
					_tmp267_ = _tmp266_;
					_tmp268_ = g_strcmp0 (_tmp267_, "last-child") == 0;
					_g_free0 (_tmp267_);
					if (_tmp268_) {
						GXmlDomElement* _tmp269_ = NULL;
						GXmlDomNode* _tmp270_ = NULL;
						GXmlDomNode* _tmp271_ = NULL;
						GXmlDomNode* _tmp272_ = NULL;
						gboolean _tmp273_ = FALSE;
						GXmlDomElement* _tmp274_ = NULL;
						GXmlDomNode* _tmp275_ = NULL;
						GXmlDomNode* _tmp276_ = NULL;
						GXmlDomNode* _tmp277_ = NULL;
						gboolean _tmp278_ = FALSE;
						GXmlDomElement* _tmp279_ = NULL;
						GXmlDomElement* _tmp290_ = NULL;
						_tmp269_ = element;
						_tmp270_ = gxml_dom_node_get_parent_node ((GXmlDomNode*) _tmp269_);
						_tmp271_ = _tmp270_;
						_tmp272_ = _tmp271_;
						_tmp273_ = _tmp272_ == NULL;
						_g_object_unref0 (_tmp272_);
						if (_tmp273_) {
							result = FALSE;
							_g_object_unref0 (s);
							return result;
						}
						_tmp274_ = element;
						_tmp275_ = gxml_dom_node_get_parent_node ((GXmlDomNode*) _tmp274_);
						_tmp276_ = _tmp275_;
						_tmp277_ = _tmp276_;
						_tmp278_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp277_, GXML_TYPE_DOM_ELEMENT);
						_g_object_unref0 (_tmp277_);
						if (_tmp278_) {
							result = FALSE;
							_g_object_unref0 (s);
							return result;
						}
						_tmp279_ = element;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp279_, GXML_TYPE_GOM_ELEMENT)) {
							GXmlDomElement* _tmp280_ = NULL;
							GXmlDomElement* _tmp281_ = NULL;
							GXmlDomNode* _tmp282_ = NULL;
							GXmlDomNode* _tmp283_ = NULL;
							GXmlDomParentNode* _tmp284_ = NULL;
							GXmlDomParentNode* _tmp285_ = NULL;
							GXmlDomElement* _tmp286_ = NULL;
							GXmlDomElement* _tmp287_ = NULL;
							GXmlDomElement* _tmp288_ = NULL;
							gboolean _tmp289_ = FALSE;
							_tmp280_ = element;
							_tmp281_ = element;
							_tmp282_ = gxml_dom_node_get_parent_node ((GXmlDomNode*) _tmp281_);
							_tmp283_ = _tmp282_;
							_tmp284_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp283_, GXML_TYPE_DOM_PARENT_NODE) ? ((GXmlDomParentNode*) _tmp283_) : NULL;
							if (_tmp284_ == NULL) {
								_g_object_unref0 (_tmp283_);
							}
							_tmp285_ = _tmp284_;
							_tmp286_ = gxml_dom_parent_node_get_last_element_child (_tmp285_);
							_tmp287_ = _tmp286_;
							_tmp288_ = _tmp287_;
							_tmp289_ = _tmp280_ == _tmp288_;
							_g_object_unref0 (_tmp288_);
							_g_object_unref0 (_tmp285_);
							if (_tmp289_) {
								result = TRUE;
								_g_object_unref0 (s);
								return result;
							}
						}
						_tmp290_ = element;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp290_, GXML_TYPE_GELEMENT)) {
							GXmlDomElement* _tmp291_ = NULL;
							xmlNode* _tmp292_ = NULL;
							GXmlDomElement* _tmp293_ = NULL;
							GXmlDomNode* _tmp294_ = NULL;
							GXmlDomNode* _tmp295_ = NULL;
							GXmlDomParentNode* _tmp296_ = NULL;
							GXmlDomParentNode* _tmp297_ = NULL;
							GXmlDomElement* _tmp298_ = NULL;
							GXmlDomElement* _tmp299_ = NULL;
							GXmlGNode* _tmp300_ = NULL;
							GXmlGNode* _tmp301_ = NULL;
							xmlNode* _tmp302_ = NULL;
							gboolean _tmp303_ = FALSE;
							_tmp291_ = element;
							_tmp292_ = gxml_gnode_get_internal_node (G_TYPE_CHECK_INSTANCE_TYPE (_tmp291_, GXML_TYPE_GNODE) ? ((GXmlGNode*) _tmp291_) : NULL);
							_tmp293_ = element;
							_tmp294_ = gxml_dom_node_get_parent_node ((GXmlDomNode*) _tmp293_);
							_tmp295_ = _tmp294_;
							_tmp296_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp295_, GXML_TYPE_DOM_PARENT_NODE) ? ((GXmlDomParentNode*) _tmp295_) : NULL;
							if (_tmp296_ == NULL) {
								_g_object_unref0 (_tmp295_);
							}
							_tmp297_ = _tmp296_;
							_tmp298_ = gxml_dom_parent_node_get_last_element_child (_tmp297_);
							_tmp299_ = _tmp298_;
							_tmp300_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp299_, GXML_TYPE_GNODE) ? ((GXmlGNode*) _tmp299_) : NULL;
							if (_tmp300_ == NULL) {
								_g_object_unref0 (_tmp299_);
							}
							_tmp301_ = _tmp300_;
							_tmp302_ = gxml_gnode_get_internal_node (_tmp301_);
							_tmp303_ = _tmp292_ == _tmp302_;
							_g_object_unref0 (_tmp301_);
							_g_object_unref0 (_tmp297_);
							if (_tmp303_) {
								result = TRUE;
								_g_object_unref0 (s);
								return result;
							}
						}
					}
				}
				_tmp304_ = s;
				_tmp305_ = gxml_css_selector_data_get_selector_type (_tmp304_);
				_tmp306_ = _tmp305_;
				if (_tmp306_ == GXML_CSS_SELECTOR_TYPE_CLASS) {
					gchar* p = NULL;
					GXmlDomElement* _tmp307_ = NULL;
					gchar* _tmp308_ = NULL;
					const gchar* _tmp309_ = NULL;
					GXmlDomTokenList* lc = NULL;
					GXmlDomElement* _tmp310_ = NULL;
					GXmlDomTokenList* _tmp311_ = NULL;
					GXmlDomTokenList* _tmp312_ = NULL;
					gboolean _tmp313_ = FALSE;
					GXmlDomTokenList* _tmp314_ = NULL;
					GXmlCssSelectorData* _tmp315_ = NULL;
					const gchar* _tmp316_ = NULL;
					const gchar* _tmp317_ = NULL;
					gboolean _tmp318_ = FALSE;
					const gchar* _tmp320_ = NULL;
					_tmp307_ = element;
					_tmp308_ = gxml_dom_element_get_attribute (_tmp307_, "class");
					p = _tmp308_;
					_tmp309_ = p;
					if (_tmp309_ == NULL) {
						result = FALSE;
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_tmp310_ = element;
					_tmp311_ = gxml_dom_element_get_class_list (_tmp310_);
					_tmp312_ = _tmp311_;
					lc = _tmp312_;
					_tmp314_ = lc;
					_tmp315_ = s;
					_tmp316_ = gxml_css_selector_data_get_data (_tmp315_);
					_tmp317_ = _tmp316_;
					_tmp318_ = gxml_dom_token_list_contains (_tmp314_, _tmp317_, &_inner_error_);
					_tmp313_ = _tmp318_;
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						gboolean _tmp319_ = FALSE;
						g_propagate_error (error, _inner_error_);
						_g_object_unref0 (lc);
						_g_free0 (p);
						_g_object_unref0 (s);
						return _tmp319_;
					}
					if (_tmp313_) {
						result = TRUE;
						_g_object_unref0 (lc);
						_g_free0 (p);
						_g_object_unref0 (s);
						return result;
					}
					_tmp320_ = p;
					if (g_strcmp0 (_tmp320_, "warning") == 0) {
						g_warning ("CssSelectorParser.vala:415: Not found");
					}
					_g_object_unref0 (lc);
					_g_free0 (p);
				}
				_g_object_unref0 (s);
			}
		}
	}
	result = FALSE;
	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_ = NULL;
	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_ = NULL;
	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_DATA, (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) {
	gxml_css_selector_parser_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GXmlCssSelectorParserPrivate));
	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, g_param_spec_object ("selectors", "selectors", "selectors", GEE_TYPE_LIST, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void gxml_css_selector_parser_instance_init (GXmlCssSelectorParser * self) {
	self->priv = GXML_CSS_SELECTOR_PARSER_GET_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);
		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);
}



