dancer-xml Reference
0.8.2.1
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <getopt.h>
#include "dancer-xml.h"
#include "config.h"
Macros | |
#define | _GNU_SOURCE |
Functions | |
static void | clear_counter (int min) |
clear some counter | |
static int | replace_external_entity (const char *s) |
static int | convert_print (const char *s, int verbatim) |
remove exceeding space, and remove special-chars | |
static const char * | getatrstring (dxml_element *e, const char *attr) |
static int | get_paratype (dxml_element *b, int verbatim) |
handle para-type ones which can contain PCDATA | |
static int | get_bookchapter (dxml_element *b, int paraenter) |
Handle chapter and sect*. | |
static int | maybe_label_start (dxml_element *b) |
Add a label and self-link. | |
static void | maybe_label_end (int labelt) |
ends a label conditionally. | |
static int | get_table (dxml_element *b_parent) |
Process table element. | |
static int | get_itemizedlist (dxml_element *b) |
Process itemized list. | |
static int | get_bothtypes (dxml_element *b, int inlinetype) |
Something that appears inside the para elements and outside the para elements. | |
static int | recursebook (dxml_element *b) |
Handle book element, and check for each chapter in the book. | |
int | main (int argc, char **argv) |
Variables | |
int | counter_chapter [5] = {0,0,0,0,0} |
chapter counter array | |
const int | c_chapter = 0 |
const int | c_sect1 = 1 |
const int | c_sect2 = 2 |
const int | c_sect3 = 3 |
#define _GNU_SOURCE |
|
static |
clear some counter
min | the minimum counter number |
References counter_chapter.
Referenced by get_bookchapter(), and recursebook().
|
static |
remove exceeding space, and remove special-chars
s | The string to print |
verbatim | preserve carriage returns? |
References replace_external_entity().
Referenced by get_bookchapter(), get_paratype(), main(), and recursebook().
|
static |
Handle chapter and sect*.
whether label was defined. (locally used for maybe_label_start)
References c_chapter, c_sect1, c_sect2, c_sect3, dxml_element::child, clear_counter(), convert_print(), counter_chapter, dxml_dump_element(), dxml_get_PCDATA_bysimplepath(), dxml_element::element_name, dxml_element::element_type_element, get_bothtypes(), get_itemizedlist(), get_paratype(), get_table(), maybe_label_end(), maybe_label_start(), and dxml_element::next.
Referenced by get_itemizedlist(), get_paratype(), and recursebook().
|
static |
Something that appears inside the para elements and outside the para elements.
inlinetype | 1 if it is inside para |
References dxml_element::child, dxml_element::element_name, and get_paratype().
Referenced by get_bookchapter(), and get_paratype().
|
static |
Process itemized list.
References dxml_element::child, dxml_dump_element(), dxml_element::element_name, get_bookchapter(), and dxml_element::next.
Referenced by get_bookchapter(), and get_paratype().
|
static |
handle para-type ones which can contain PCDATA
verbatim | whether it is in screen env. or not. |
References dxml_element::child, convert_print(), dxml_dump_element(), dxml_element::element_name, dxml_element::element_type_pcdata, get_bookchapter(), get_bothtypes(), get_itemizedlist(), getatrstring(), and dxml_element::next.
Referenced by get_bookchapter(), get_bothtypes(), and get_table().
|
static |
Process table element.
References dxml_element::child, dxml_get_element_bysimplepath(), dxml_get_PCDATA_bysimplepath(), get_paratype(), maybe_label_end(), maybe_label_start(), and dxml_element::next.
Referenced by get_bookchapter().
|
static |
References dxml_attribute::attribute_data, dxml_attribute::attribute_name, dxml_element::element_attribute, and dxml_attribute::next.
Referenced by get_paratype(), and maybe_label_start().
int main | ( | int | argc, |
char ** | argv | ||
) |
|
static |
ends a label conditionally.
labelt | whether to require end of label |
Referenced by get_bookchapter(), get_table(), and recursebook().
|
static |
Add a label and self-link.
Needs to be accompanied with maybe_label_end, and the return value of this function needs to be sent there.
References getatrstring().
Referenced by get_bookchapter(), get_table(), and recursebook().
|
static |
Handle book element, and check for each chapter in the book.
References c_chapter, dxml_element::child, clear_counter(), convert_print(), counter_chapter, dxml_get_element_byname(), dxml_get_PCDATA_bysimplepath(), get_bookchapter(), maybe_label_end(), maybe_label_start(), and dxml_element::next.
Referenced by main().
|
static |
Referenced by convert_print().
const int c_chapter = 0 |
Referenced by get_bookchapter(), and recursebook().
const int c_sect1 = 1 |
Referenced by get_bookchapter().
const int c_sect2 = 2 |
Referenced by get_bookchapter().
const int c_sect3 = 3 |
Referenced by get_bookchapter().
int counter_chapter[5] = {0,0,0,0,0} |
chapter counter array
Referenced by clear_counter(), get_bookchapter(), and recursebook().