fix cmake
[lyx.git] / src / sgml.h
blobed8cbf314de7dc8bf2719aa473da0be0ee451519
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.
7 * \author José Matos
8 * \author John Levon
10 * Full author contact details are available in file CREDITS.
13 #ifndef SGML_H
14 #define SGML_H
16 #include "support/types.h"
17 #include "support/docstring.h"
19 namespace lyx {
21 class Buffer;
22 class Paragraph;
23 class OutputParams;
25 namespace sgml {
27 /**
28 * Escape the given character, if necessary,
29 * to an SGML entity.
31 docstring escapeChar(char_type c);
33 /// Escape a word instead of a single character
34 docstring escapeString(docstring const & raw);
36 /// replaces illegal characters from SGML/XML ID attributes
37 docstring cleanID(Buffer const & buf, OutputParams const & runparams,
38 docstring const & orig);
40 /// returns a unique numeric id
41 docstring const uniqueID(docstring const label);
43 /// Opens tag
44 void openTag(odocstream & os, std::string const & name,
45 std::string const & attribute = std::string());
47 /// Open tag
48 void openTag(Buffer const & buf, odocstream & os,
49 OutputParams const & runparams, Paragraph const & par);
51 /// Close tag
52 void closeTag(odocstream & os, std::string const & name);
54 /// Close tag
55 void closeTag(odocstream & os, Paragraph const & par);
57 } // namespace sgml
58 } // namespace lyx
60 #endif // SGML_H