#region Copyright and License // // Fizzler - CSS Selector Engine for Microsoft .NET Framework // Copyright (c) 2009 Atif Aziz, Colin Ramsay. All rights reserved. // // 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 3 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, write to the Free Software Foundation, Inc., // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // #endregion namespace Fizzler { /// /// Represents a selectors implementation for an arbitrary document/node system. /// public interface IElementOps { // // Selectors // /// /// Generates a type selector, /// which represents an instance of the element type in the document tree. /// Selector Type(NamespacePrefix prefix, string name); /// /// Generates a universal selector, /// any single element in the document tree in any namespace /// (including those without a namespace) if no default namespace /// has been specified for selectors. /// Selector Universal(NamespacePrefix prefix); /// /// Generates a ID selector, /// which represents an element instance that has an identifier that /// matches the identifier in the ID selector. /// Selector Id(string id); /// /// Generates a class selector, /// which is an alternative when /// representing the class attribute. /// Selector Class(string clazz); // // Attribute selectors // /// /// Generates an attribute selector /// that represents an element with the given attribute /// whatever the values of the attribute. /// Selector AttributeExists(NamespacePrefix prefix, string name); /// /// Generates an attribute selector /// that represents an element with the given attribute /// and whose value is exactly . /// Selector AttributeExact(NamespacePrefix prefix, string name, string value); /// /// Generates an attribute selector /// that represents an element with the given attribute /// and whose value is a whitespace-separated list of words, one of /// which is exactly . /// Selector AttributeIncludes(NamespacePrefix prefix, string name, string value); /// /// Generates an attribute selector /// that represents an element with the given attribute , /// its value either being exactly or beginning /// with immediately followed by "-" (U+002D). /// Selector AttributeDashMatch(NamespacePrefix prefix, string name, string value); /// /// Generates an attribute selector /// that represents an element with the attribute /// whose value begins with the prefix . /// Selector AttributePrefixMatch(NamespacePrefix prefix, string name, string value); /// /// Generates an attribute selector /// that represents an element with the attribute /// whose value ends with the suffix . /// Selector AttributeSuffixMatch(NamespacePrefix prefix, string name, string value); /// /// Generates an attribute selector /// that represents an element with the attribute /// whose value contains at least one instance of the substring . /// Selector AttributeSubstring(NamespacePrefix prefix, string name, string value); // // Pseudo-class selectors // /// /// Generates a pseudo-class selector, /// which represents an element that is the first child of some other element. /// Selector FirstChild(); /// /// Generates a pseudo-class selector, /// which represents an element that is the last child of some other element. /// Selector LastChild(); /// /// Generates a pseudo-class selector, /// which represents an element that is the N-th child of some other element. /// Selector NthChild(int a, int b); /// /// Generates a pseudo-class selector, /// which represents an element that has a parent element and whose parent /// element has no other element children. /// Selector OnlyChild(); /// /// Generates a pseudo-class selector, /// which represents an element that has no children at all. /// Selector Empty(); // // Combinators // /// /// Generates a combinator, /// which represents a childhood relationship between two elements. /// Selector Child(); /// /// Generates a combinator, /// which represents a relationship between two elements where one element is an /// arbitrary descendant of some ancestor element. /// Selector Descendant(); /// /// Generates a combinator, /// which represents elements that share the same parent in the document tree and /// where the first element immediately precedes the second element. /// Selector Adjacent(); /// /// Generates a combinator, /// which separates two sequences of simple selectors. The elements represented /// by the two sequences share the same parent in the document tree and the /// element represented by the first sequence precedes (not necessarily /// immediately) the element represented by the second one. /// Selector GeneralSibling(); /// /// Generates a pseudo-class selector, /// which represents an element that is the N-th child from bottom up of some other element. /// Selector NthLastChild(int a, int b); } }