9 #include <libxml/parser.h>
10 #include <libxml/tree.h>
11 #include <libxml/xpath.h>
12 #include <libxml/xpathInternals.h>
14 #include <wx/bitmap.h>
18 enum HelpTopicSectionFontSize
25 enum HelpTopicCurrentLevel
38 enum HelpTopicSectionStyle
43 struct HelpTopicSection
45 HelpTopicSectionFontSize sectionFontSize;
46 HelpTopicSectionStyle sectionFontStyle;
47 std::string sectionText;
50 struct FootnoteSection
53 std::string footnoteText;
58 std::string helpTopicName;
59 std::string helpTopicID;
60 std::vector<HelpTopicSection> helpTopicSections;
61 std::vector<FootnoteSection> helpTopicFootnotes;
64 struct HelpTableOfContentsItem
66 std::string tocItemName;
67 std::string tocItemID;
68 HelpTopicCurrentLevel tocItemLevel;
75 std::map<std::string, std::string> styleList;
77 bool ProcessDocument(xmlDocPtr document);
79 bool GenerateStyleList(xmlDocPtr document);
80 bool GetTitle(xmlDocPtr document);
81 bool GenerateTOC(xmlDocPtr document);
82 bool ProcessLineBreaks(xmlDocPtr document);
83 bool ProcessImages(xmlDocPtr document);
84 bool GenerateHelpTopics(xmlDocPtr document);
86 void TrimString(std::string *stringToProcess);
87 void RemoveNewLines(std::string *stringToProcess);
89 void ProcessNoteNode(xmlNodePtr nodePtr, HelpTopicData *helpTopic);
91 HelpTopicCurrentLevel DetermineTopicLevel(std::string styleText);
97 std::vector<HelpTableOfContentsItem> tocData;
98 std::vector<HelpTopicData> helpTopicData;
100 bool LoadDocument(std::string document);