Cogs.Core
Public Attributes | List of all members
GumboAttribute Struct Reference

#include <gumbo.h>

Public Attributes

GumboAttributeNamespaceEnum attr_namespace
 
const char * name
 
GumboStringPiece original_name
 
const char * value
 
GumboStringPiece original_value
 
GumboSourcePosition name_start
 
GumboSourcePosition name_end
 
GumboSourcePosition value_start
 
GumboSourcePosition value_end
 

Detailed Description

A struct representing a single attribute on an HTML tag. This is a name-value pair, but also includes information about source locations and original source text.

Definition at line 226 of file gumbo.h.

Member Data Documentation

◆ attr_namespace

GumboAttributeNamespaceEnum GumboAttribute::attr_namespace

The namespace for the attribute. This will usually be GUMBO_ATTR_NAMESPACE_NONE, but some XLink/XMLNS/XML attributes take special values, per: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adjust-foreign-attributes

Definition at line 233 of file gumbo.h.

◆ name

const char* GumboAttribute::name

The name of the attribute. This is in a freshly-allocated buffer to deal with case-normalization, and is null-terminated.

Definition at line 239 of file gumbo.h.

◆ name_end

GumboSourcePosition GumboAttribute::name_end

The ending position of the attribute name. This is not always derivable from the starting position of the value because of the possibility of whitespace around the = sign.

Definition at line 273 of file gumbo.h.

◆ name_start

GumboSourcePosition GumboAttribute::name_start

The starting position of the attribute name.

Definition at line 266 of file gumbo.h.

◆ original_name

GumboStringPiece GumboAttribute::original_name

The original text of the attribute name, as a pointer into the original source buffer.

Definition at line 245 of file gumbo.h.

◆ original_value

GumboStringPiece GumboAttribute::original_value

The original text of the value of the attribute. This points into the original source buffer. It includes any quotes that surround the attribute, and you can look at original_value.data[0] and original_value.data[original_value.length - 1] to determine what the quote characters were. If the attribute has no value, this will be a 0-length string.

Definition at line 263 of file gumbo.h.

◆ value

const char* GumboAttribute::value

The value of the attribute. This is in a freshly-allocated buffer to deal with unescaping, and is null-terminated. It does not include any quotes that surround the attribute. If the attribute has no value (for example, 'selected' on a checkbox), this will be an empty string.

Definition at line 253 of file gumbo.h.

◆ value_end

GumboSourcePosition GumboAttribute::value_end

The ending position of the attribute value.

Definition at line 279 of file gumbo.h.

◆ value_start

GumboSourcePosition GumboAttribute::value_start

The starting position of the attribute value.

Definition at line 276 of file gumbo.h.


The documentation for this struct was generated from the following file: