basic-xml 1.0.1
Very basic loader/writer of XML tags with attributes and content.
Functions
type.cpp File Reference

Database file implementation. More...

#include "basic-xml/type.h"
#include <libutf8/iterator.h>
#include <iostream>
#include <snapdev/poison.h>
Include dependency graph for type.cpp:

Go to the source code of this file.

Functions

bool basic_xml::is_digit (char32_t c)
 
bool basic_xml::is_name_char (char32_t c)
 
bool basic_xml::is_name_start_char (char32_t c)
 
bool basic_xml::is_space (char32_t c)
 
bool basic_xml::is_token (std::string const &token)
 Verify that token is a valid string.
 

Detailed Description

Each table uses one or more files. Each file is handled by a dbfile object and a corresponding set of blocks.

Todo:

Note:

Document authors are encouraged to avoid "compatibility characters", as defined in section 2.3 of [Unicode]. The characters defined in the following ranges are also discouraged. They are either control characters or permanently undefined Unicode characters:

[#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDEF],
[#x1FFFE-#x1FFFF], [#x2FFFE-#x2FFFF], [#x3FFFE-#x3FFFF],
[#x4FFFE-#x4FFFF], [#x5FFFE-#x5FFFF], [#x6FFFE-#x6FFFF],
[#x7FFFE-#x7FFFF], [#x8FFFE-#x8FFFF], [#x9FFFE-#x9FFFF],
[#xAFFFE-#xAFFFF], [#xBFFFE-#xBFFFF], [#xCFFFE-#xCFFFF],
[#xDFFFE-#xDFFFF], [#xEFFFE-#xEFFFF], [#xFFFFE-#xFFFFF],
[#x10FFFE-#x10FFFF].

Definition in file type.cpp.

Function Documentation

◆ is_digit()

bool basic_xml::is_digit ( char32_t  c)

Definition at line 162 of file type.cpp.

◆ is_name_char()

bool basic_xml::is_name_char ( char32_t  c)

Definition at line 156 of file type.cpp.

◆ is_name_start_char()

bool basic_xml::is_name_start_char ( char32_t  c)

Definition at line 150 of file type.cpp.

◆ is_space()

bool basic_xml::is_space ( char32_t  c)

Definition at line 169 of file type.cpp.

◆ is_token()

bool basic_xml::is_token ( std::string const &  token)

A token is considered valid only if it includes characters that are considered valid by the XML reference.

The following is the current XML 1.0 reference:

[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z]
| [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF]
| [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D]
| [#x2070-#x218F] | [#x2C00-#x2FEF]
| [#x3001-#xD7FF] | [#xF900-#xFDCF]
| [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7
| [#x0300-#x036F] | [#x203F-#x2040]
[5] Name ::= NameStartChar (NameChar)*
Parameters
[in]tokenThe token to be checked.
Returns
true if the string represents a valid token name.

Definition at line 204 of file type.cpp.

References basic_xml::is_token().

Referenced by basic_xml::is_token().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ f_first

char32_t f_first = U'\0'

Definition at line 79 of file type.cpp.

◆ f_last

char32_t f_last = U'\0'

Definition at line 80 of file type.cpp.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.