libdom
Loading...
Searching...
No Matches
Functions
validate.c File Reference
#include <inttypes.h>
#include <stddef.h>
#include "utils/validate.h"
#include <dom/core/string.h>
#include "utils/character_valid.h"
#include "utils/namespace.h"
#include "utils/utils.h"
#include <parserutils/charset/utf8.h>

Functions

bool _dom_validate_name (dom_string *name)
 
bool _dom_validate_ncname (dom_string *name)
 

Function Documentation

◆ _dom_validate_name()

bool _dom_validate_name ( dom_string * name)

Test whether the name is a valid one according XML 1.0 standard. For the standard please refer:

http://www.w3.org/TR/2004/REC-xml-20040204/

Parameters
nameThe name need to be tested
Returns
true if ::name is valid, false otherwise.

◆ _dom_validate_ncname()

bool _dom_validate_ncname ( dom_string * name)

Validate whether the string is a legal NCName. Refer http://www.w3.org/TR/REC-xml-names/ for detail.

Parameters
strThe name to validate
Returns
true if ::name is valid, false otherwise.