!option->mValues[0]->Equals(NS_LITERAL_CSTRING("-"))) {
!option->mValues[0]->EqualsLiteral("-")) {
int main(int argc, char** argv){    using namespace std;    nsresult rv;#ifdef MOZ_JPROF    setupProfilingStuff();#endif    rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);    NS_ENSURE_SUCCESS(rv, rv);    if (!txXSLTProcessor::init())        return 1;    txOptions options;    if (NS_FAILED(options.Init(4))) {        return 1;    }    parseCommandLine(argc, argv, options);    if (!options.GetEntry(NS_LITERAL_CSTRING("q"))) {        NS_NAMED_LITERAL_CSTRING(copyright, "(C) 1999 The MITRE Corporation, Keith Visco, and contributors");        cerr << "TransforMiiX ";        cerr << MOZILLA_VERSION << endl;        cerr << copyright.get() << endl;        //-- print banner line        PRUint32 fillSize = copyright.Length() + 1;        PRUint32 counter;        for (counter = 0; counter < fillSize; ++counter)            cerr << '-';        cerr << endl << endl;    }    if (options.GetEntry(NS_LITERAL_CSTRING("h"))) {        printHelp();        return 0;    }    //-- handle output stream    ostream* resultOutput = &cout;    ofstream resultFileStream;    txOptionEntry* option = options.GetEntry(NS_LITERAL_CSTRING("o"));    if (option &&        option->mValues.Count() > 0 &&        !option->mValues[0]->Equals(NS_LITERAL_CSTRING("-"))) {        resultFileStream.open(option->mValues[0]->get(), ios::out);        if (!resultFileStream) {            cerr << "error opening output file: ";            cerr << option->mValues[0]->get() << endl;            return -1;        }        resultOutput = &resultFileStream;    }    option = options.GetEntry(NS_LITERAL_CSTRING("i"));    if (!option || option->mValues.Count() == 0) {        cerr << "you must specify at least a source XML path" << endl;        printUsage();        return -1;    }    SimpleErrorObserver obs;    txStandaloneXSLTProcessor proc;    txOptionEntry* styleOption = options.GetEntry(NS_LITERAL_CSTRING("s"));    if (!styleOption || styleOption->mValues.Count() == 0) {        rv = proc.transform(*option->mValues[0], *resultOutput, obs);    }    else {        // XXX TODO: Handle multiple stylesheets        rv = proc.transform(*option->mValues[0], *styleOption->mValues[0],                            *resultOutput, obs);    }    if (NS_FAILED(rv)) {        cerr << "transformation failed with " << hex << rv << endl;    }    resultFileStream.close();    txXSLTProcessor::shutdown();    rv = NS_ShutdownXPCOM(nsnull);    NS_ENSURE_SUCCESS(rv, rv);    return 0;}