|
|
@ -455,7 +455,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur)
|
|
|
|
if (cur->methodURI == NULL) {
|
|
|
|
if (cur->methodURI == NULL) {
|
|
|
|
if (optionsGetIntOption(OPTIONS_TIMING))
|
|
|
|
if (optionsGetIntOption(OPTIONS_TIMING))
|
|
|
|
startTimer();
|
|
|
|
startTimer();
|
|
|
|
if (xslDebugStatus != DEBUG_TQUIT) {
|
|
|
|
if (xslDebugStatus != DEBUG_QUIT) {
|
|
|
|
if (terminalIO != NULL)
|
|
|
|
if (terminalIO != NULL)
|
|
|
|
bytesWritten = xsltSaveResultToFile(terminalIO, res, cur);
|
|
|
|
bytesWritten = xsltSaveResultToFile(terminalIO, res, cur);
|
|
|
|
else if (optionsGetStringOption
|
|
|
|
else if (optionsGetStringOption
|
|
|
@ -719,7 +719,7 @@ xsldbgMain(int argc, char **argv)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
debugGotControl(0);
|
|
|
|
debugGotControl(0);
|
|
|
|
while (xslDebugStatus != DEBUG_TQUIT) {
|
|
|
|
while (xslDebugStatus != DEBUG_QUIT) {
|
|
|
|
xsldbgReachedFirstTemplate = false;
|
|
|
|
xsldbgReachedFirstTemplate = false;
|
|
|
|
/* don't force xsldbg to show command prompt */
|
|
|
|
/* don't force xsldbg to show command prompt */
|
|
|
|
showPrompt = 0;
|
|
|
|
showPrompt = 0;
|
|
|
@ -765,7 +765,7 @@ xsldbgMain(int argc, char **argv)
|
|
|
|
/*goto a xsldbg command prompt */
|
|
|
|
/*goto a xsldbg command prompt */
|
|
|
|
showPrompt = 1;
|
|
|
|
showPrompt = 1;
|
|
|
|
if (xslDebugStatus == DEBUG_NONE) {
|
|
|
|
if (xslDebugStatus == DEBUG_NONE) {
|
|
|
|
xslDebugStatus = DEBUG_TQUIT; /* panic !! */
|
|
|
|
xslDebugStatus = DEBUG_QUIT; /* panic !! */
|
|
|
|
result = 0;
|
|
|
|
result = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -776,21 +776,21 @@ xsldbgMain(int argc, char **argv)
|
|
|
|
doc = filesGetMainDoc();
|
|
|
|
doc = filesGetMainDoc();
|
|
|
|
if (doc == NULL) {
|
|
|
|
if (doc == NULL) {
|
|
|
|
if (xslDebugStatus == DEBUG_NONE) {
|
|
|
|
if (xslDebugStatus == DEBUG_NONE) {
|
|
|
|
xslDebugStatus = DEBUG_TQUIT; /* panic !! */
|
|
|
|
xslDebugStatus = DEBUG_QUIT; /* panic !! */
|
|
|
|
result = 0;
|
|
|
|
result = 0;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
/*goto a xsldbg command prompt */
|
|
|
|
/*goto a xsldbg command prompt */
|
|
|
|
showPrompt = 1;
|
|
|
|
showPrompt = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (xslDebugStatus != DEBUG_TQUIT) {
|
|
|
|
if (xslDebugStatus != DEBUG_QUIT) {
|
|
|
|
xsltProcess(doc, cur);
|
|
|
|
xsltProcess(doc, cur);
|
|
|
|
result = 1;
|
|
|
|
result = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (optionsGetIntOption(OPTIONS_SHELL) && (showPrompt == 0)) {
|
|
|
|
if (optionsGetIntOption(OPTIONS_SHELL) && (showPrompt == 0)) {
|
|
|
|
if ((xslDebugStatus != DEBUG_TQUIT)
|
|
|
|
if ((xslDebugStatus != DEBUG_QUIT)
|
|
|
|
&& !debugGotControl(-1)) {
|
|
|
|
&& !debugGotControl(-1)) {
|
|
|
|
xsldbgGenericErrorFunc(i18n("\nDebugger never received control.\n"));
|
|
|
|
xsldbgGenericErrorFunc(i18n("\nDebugger never received control.\n"));
|
|
|
|
/*goto a xsldbg command prompt */
|
|
|
|
/*goto a xsldbg command prompt */
|
|
|
@ -831,12 +831,12 @@ xsldbgMain(int argc, char **argv)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
/* request to execute stylesheet only so we're done */
|
|
|
|
/* request to execute stylesheet only so we're done */
|
|
|
|
xslDebugStatus = DEBUG_TQUIT;
|
|
|
|
xslDebugStatus = DEBUG_QUIT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
/* Some sort of problem loading source file has occured. Quit? */
|
|
|
|
/* Some sort of problem loading source file has occured. Quit? */
|
|
|
|
if (xslDebugStatus == DEBUG_NONE) {
|
|
|
|
if (xslDebugStatus == DEBUG_NONE) {
|
|
|
|
xslDebugStatus = DEBUG_TQUIT; /* Panic!! */
|
|
|
|
xslDebugStatus = DEBUG_QUIT; /* Panic!! */
|
|
|
|
result = 0;
|
|
|
|
result = 0;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
/*goto a xsldbg command prompt */
|
|
|
|
/*goto a xsldbg command prompt */
|
|
|
@ -872,7 +872,7 @@ xsldbgMain(int argc, char **argv)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
xmlFreeDoc(tempDoc);
|
|
|
|
xmlFreeDoc(tempDoc);
|
|
|
|
} else if (showPrompt && !optionsGetIntOption(OPTIONS_SHELL)) {
|
|
|
|
} else if (showPrompt && !optionsGetIntOption(OPTIONS_SHELL)) {
|
|
|
|
xslDebugStatus = DEBUG_TQUIT;
|
|
|
|
xslDebugStatus = DEBUG_QUIT;
|
|
|
|
result = 0; /* panic */
|
|
|
|
result = 0; /* panic */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -917,7 +917,7 @@ xsldbgLoadStylesheet()
|
|
|
|
cur = NULL;
|
|
|
|
cur = NULL;
|
|
|
|
if (!optionsGetIntOption(OPTIONS_SHELL)) {
|
|
|
|
if (!optionsGetIntOption(OPTIONS_SHELL)) {
|
|
|
|
xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
|
|
|
|
xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
|
|
|
|
xslDebugStatus = DEBUG_TQUIT;
|
|
|
|
xslDebugStatus = DEBUG_QUIT;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
xsltGenericError(xsltGenericErrorContext, "\n");
|
|
|
|
xsltGenericError(xsltGenericErrorContext, "\n");
|
|
|
|
xslDebugStatus = DEBUG_STOP;
|
|
|
|
xslDebugStatus = DEBUG_STOP;
|
|
|
@ -991,7 +991,7 @@ xsldbgLoadXmlData(void)
|
|
|
|
xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))));
|
|
|
|
xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))));
|
|
|
|
if (!optionsGetIntOption(OPTIONS_SHELL)) {
|
|
|
|
if (!optionsGetIntOption(OPTIONS_SHELL)) {
|
|
|
|
xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
|
|
|
|
xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
|
|
|
|
xslDebugStatus = DEBUG_TQUIT;
|
|
|
|
xslDebugStatus = DEBUG_QUIT;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
xsltGenericError(xsltGenericErrorContext, "\n");
|
|
|
|
xsltGenericError(xsltGenericErrorContext, "\n");
|
|
|
|
xslDebugStatus = DEBUG_STOP;
|
|
|
|
xslDebugStatus = DEBUG_STOP;
|
|
|
@ -1036,7 +1036,7 @@ xsldbgLoadXmlTemporary(const xmlChar * path)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (optionsGetIntOption(OPTIONS_TIMING)
|
|
|
|
if (optionsGetIntOption(OPTIONS_TIMING)
|
|
|
|
&& (xslDebugStatus != DEBUG_TQUIT)) {
|
|
|
|
&& (xslDebugStatus != DEBUG_QUIT)) {
|
|
|
|
endTimer(TQString("Parsing document %1").arg(xsldbgUrl(path)));
|
|
|
|
endTimer(TQString("Parsing document %1").arg(xsldbgUrl(path)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return doc;
|
|
|
|
return doc;
|
|
|
|