You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2001/08/10 19:58:32 UTC
cvs commit: xml-xalan/c/samples/TraceListen TraceListen.cpp
dbertoni 01/08/10 10:58:32
Modified: c/samples/TraceListen TraceListen.cpp
Log:
Don't support case-insensitive options.
Revision Changes Path
1.10 +20 -11 xml-xalan/c/samples/TraceListen/TraceListen.cpp
Index: TraceListen.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/samples/TraceListen/TraceListen.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TraceListen.cpp 2001/02/13 23:01:50 1.9
+++ TraceListen.cpp 2001/08/10 17:58:32 1.10
@@ -67,33 +67,35 @@
if (argc < 2 || argc > 5)
{
- cerr << "Usage: TraceListen [+ 1 or more of following] -TT -TG -TS -TTC" << endl;
+ cerr << "Usage: TraceListen [+ 1 or more of following] -tt -tg -ts -ttc" << endl;
+
return -1;
}
// Set the TraceListener flags...
for (int i = 1; i < argc; i ++)
{
- if(!stricmp("-TT", argv[i]))
+ if(!strcmp("-tt", argv[i]))
{
traceTemplates = true;
}
- else if(!stricmp("-TG", argv[i]))
+ else if(!strcmp("-tg", argv[i]))
{
traceGenerationEvent = true;
}
- else if(!stricmp("-TS", argv[i]))
+ else if(!strcmp("-ts", argv[i]))
{
traceSelectionEvent = true;
}
- else if(!stricmp("-TTC", argv[i]))
+ else if(!strcmp("-ttc", argv[i]))
{
traceTemplateChildren = true;
}
else
{
- cerr << "Usage: TraceListen [+ 1 or more of following] -TT -TG -TS -TTC" << endl;
- return -1;
+ cerr << "Usage: TraceListen [+ 1 or more of following] -tt -tg -ts -ttc" << endl;
+
+ return -1;
}
}
@@ -144,12 +146,12 @@
// Our input files...The assumption is that the executable will be run
// from same directory as the input files.
- const XalanDOMString theXMLFileName("birds.xml");
- const XalanDOMString theXSLFileName("birds.xsl");
+ const XalanDOMString theXMLFileName("birds.xml");
+ const XalanDOMString theXSLFileName("birds.xsl");
// Our input sources...
- XSLTInputSource theInputSource(c_wstr(theXMLFileName));
- XSLTInputSource theStylesheetSource(c_wstr(theXSLFileName));
+ const XSLTInputSource theInputSource(c_wstr(theXMLFileName));
+ const XSLTInputSource theStylesheetSource(c_wstr(theXSLFileName));
// Our output target...
const XalanDOMString theOutputFile("birds.out");
@@ -158,6 +160,13 @@
// Set up a diagnostic writer to be used by the TraceListener...
XalanStdOutputStream theStdErr(cerr);
XalanOutputStreamPrintWriter diagnosticsWriter(theStdErr);
+
+ // Make sure that error reporting, which includes any TraceListener output
+ // does not throw exceptions when transcoding, since that could result in
+ // an exception being thrown will another exception is active. In particular,
+ // characters that the TraceListener writes might not be representable in the
+ // local code page.
+ theStdErr.setThrowTranscodeException(false);
// Set up the TraceListener...
TraceListenerDefault theTraceListener(
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org