00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef XSLFOGENERATOR_H
00019 #define XSLFOGENERATOR_H
00020
00021
00022 #include <string>
00023 #include <sstream>
00024 #include <iostream>
00025 #include <fstream>
00026
00027 #include "codegenerator.h"
00028 #include "version.h"
00029
00030 namespace highlight {
00031
00042 class XslFoGenerator : public highlight::CodeGenerator
00043 {
00044 public:
00045 XslFoGenerator();
00046
00047 ~XslFoGenerator();
00048
00049 bool initStyle(const string& stylePath);
00050
00054 string getHeader(const string & title);
00055
00057 string getFooter();
00058
00060 void printBody();
00061
00065 void setFopCompatible(bool flag){ fopOutput = flag; }
00066
00067 private:
00068 ostringstream snl;
00069
00070 string styleDefinition;
00071 bool fopOutput;
00072
00074 virtual string maskCharacter(unsigned char );
00075
00076 string getOpenTag(const ElementStyle &);
00077
00078
00079
00080 string getMatchingOpenTag(unsigned int styleID);
00081 string getMatchingCloseTag(unsigned int styleID);
00082 };
00083
00084 }
00085
00086 #endif