]> git.lyx.org Git - lyx.git/blob - src/sgml.h
Cmake build: Don't use temporary doc-files as source for installation
[lyx.git] / src / sgml.h
1 // -*- C++ -*-
2 /**
3  * \file sgml.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author José Matos
8  * \author John Levon
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef SGML_H
14 #define SGML_H
15
16 #include "support/docstring.h"
17
18 namespace lyx {
19
20 class Buffer;
21 class Paragraph;
22 class OutputParams;
23
24 namespace sgml {
25
26 /**
27  * Escape the given character, if necessary,
28  * to an SGML entity.
29  */
30 docstring escapeChar(char_type c);
31
32 /// Escape a word instead of a single character
33 docstring escapeString(docstring const & raw);
34
35 /// replaces illegal characters from SGML/XML ID attributes
36 docstring cleanID(Buffer const & buf, OutputParams const & runparams,
37                     docstring const & orig);
38
39 /// returns a unique numeric id
40 docstring const uniqueID(docstring const & label);
41
42 /// Opens tag
43 void openTag(odocstream & os, std::string const & name,
44             std::string const & attribute = std::string());
45
46 /// Open tag
47 void openTag(Buffer const & buf, odocstream & os,
48              OutputParams const & runparams, Paragraph const & par);
49
50 /// Close tag
51 void closeTag(odocstream & os, std::string const & name);
52
53 /// Close tag
54 void closeTag(odocstream & os, Paragraph const & par);
55
56 } // namespace sgml
57 } // namespace lyx
58
59 #endif // SGML_H