Allow user to select stylesheet from command line
This commit is contained in:
@@ -14,8 +14,9 @@ int main(int argc, char* argv[]) {
|
||||
Sermon sermon;
|
||||
xmlDocPtr document, transformed;
|
||||
int i = 0, block = 0, normal = 0;
|
||||
InitOptions(argc, argv);
|
||||
InitOptions(argc, (const char**)argv);
|
||||
InitSermon(&sermon);
|
||||
|
||||
if (strcmp(options.inputFileName, "-") == 0) {
|
||||
yyin = stdin;
|
||||
} else {
|
||||
@@ -24,12 +25,12 @@ int main(int argc, char* argv[]) {
|
||||
yyparse(&sermon);
|
||||
|
||||
document = sermonToXmlDoc(&sermon);
|
||||
transformed = applyStyleSheet(document, "html5");
|
||||
transformed = applyStyleSheet(document, options.styleSheetName);
|
||||
printXML(transformed);
|
||||
xmlFreeDoc(document);
|
||||
xmlFreeDoc(transformed);
|
||||
|
||||
/* clean up, clean up, everybody, everywhere! */
|
||||
xmlFreeDoc(document);
|
||||
xmlFreeDoc(transformed);
|
||||
FreeSermon(&sermon);
|
||||
if (strcmp(options.inputFileName, "-") != 0) {
|
||||
fclose(yyin);
|
||||
|
||||
Reference in New Issue
Block a user