]> git.lyx.org Git - lyx.git/blob - src/sgml.h
more latin1..utf8 schanges. all of src/* should be utf8 now
[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/types.h"
17 #include "support/docstring.h"
18
19 namespace lyx {
20
21 class Buffer;
22 class Paragraph;
23 class OutputParams;
24
25 namespace sgml {
26
27 /**
28  * Escape the given character, if necessary,
29  * to an SGML entity.
30  */
31 docstring escapeChar(char_type c);
32
33 /// Escape a word instead of a single character
34 docstring escapeString(docstring const & raw);
35
36 /// replaces illegal characters from SGML/XML ID attributes
37 docstring cleanID(Buffer const & buf, OutputParams const & runparams,
38                     docstring const & orig);
39
40 /// returns a unique numeric id
41 docstring const uniqueID(docstring const label);
42
43 /// Opens tag
44 void openTag(odocstream & os, std::string const & name,
45             std::string const & attribute = std::string());
46
47 /// Open tag
48 void openTag(Buffer const & buf, odocstream & os,
49              OutputParams const & runparams, Paragraph const & par);
50
51 /// Close tag
52 void closeTag(odocstream & os, std::string const & name);
53
54 /// Close tag
55 void closeTag(odocstream & os, Paragraph const & par);
56
57 } // namespace sgml
58 } // namespace lyx
59
60 #endif // SGML_H