diff --git a/tests/ParserTest/ParserTest.cpp b/tests/ParserTest/ParserTest.cpp index 8b27fa13d62f107d38d77f739fbe6f7a8794e849..d1791df955b0bcc4611f13bc23d804c1cae2398d 100644 --- a/tests/ParserTest/ParserTest.cpp +++ b/tests/ParserTest/ParserTest.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.10 2001/11/28 21:15:08 tng + * Fix broken ParserTest. + * * Revision 1.9 2000/06/22 04:31:27 roddey * Another do nothing change to make sure I can still commit * from home after changing my password. @@ -175,13 +178,13 @@ int main(int argC, char** argV) // XMLValidator* validator = 0; DTDValidator* dtdVal = new DTDValidator(&parserTest); - dtdVal->setDocTypeHandler(&parserTest); validator = dtdVal; // And now create the scanner and give it all the handlers XMLScanner scanner ( &parserTest + , &parserTest , 0 , &parserTest , validator diff --git a/tests/ParserTest/ParserTest_Parser.cpp b/tests/ParserTest/ParserTest_Parser.cpp index a59a6027982df7c1f9639595fd3f1e366ed4f503..3a7c2dfefe25f703b270b9ec27ea93d84e0962fb 100644 --- a/tests/ParserTest/ParserTest_Parser.cpp +++ b/tests/ParserTest/ParserTest_Parser.cpp @@ -1,37 +1,37 @@ /* * The Apache Software License, Version 1.1 - * + * * Copyright (c) 1999-2000 The Apache Software Foundation. All rights * reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * + * notice, this list of conditions and the following disclaimer. + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * + * * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: + * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "Xerces" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this - * software without prior written permission. For written + * software without prior written permission. For written * permission, please contact apache\@apache.org. - * + * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -45,7 +45,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * + * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation, and was * originally based on software copyright (c) 1999, International @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.9 2001/11/28 21:15:08 tng + * Fix broken ParserTest. + * * Revision 1.8 2000/03/02 19:55:46 roddey * This checkin includes many changes done while waiting for the * 1.1.0 code to be finished. I can't list them all here, but a list is @@ -243,7 +246,7 @@ void TestParser::endElement(const XMLElementDecl& elemDecl if (fDoNamespaces) { XMLBuffer bufURI; - fScanner->getValidator()->getURIText(uriId, bufURI); + fScanner->getURIText(uriId, bufURI); cout << "Got ENDELEMENT:\n Name: " << "{" << StrX(bufURI.getRawBuffer()) << "}" @@ -342,7 +345,7 @@ TestParser::startElement(const XMLElementDecl& elemDecl XMLBuffer bufURI; if (fDoNamespaces) { - fScanner->getValidator()->getURIText(uriId, bufURI); + fScanner->getURIText(uriId, bufURI); cout << "Got STARTELEMENT:\n " << " Name: {" << StrX(bufURI.getRawBuffer()) << "}" << StrX(elemDecl.getBaseName()) @@ -373,7 +376,7 @@ TestParser::startElement(const XMLElementDecl& elemDecl if (fDoNamespaces) { - fScanner->getValidator()->getURIText(curAttr->getURIId(), bufURI); + fScanner->getURIText(curAttr->getURIId(), bufURI); cout << "Name=" << "{" << StrX(bufURI.getRawBuffer()) << "}" << StrX(curAttr->getName()); } @@ -692,7 +695,7 @@ void TestParser::elementDecl(const DTDElementDecl& decl cout << " (Ignored)"; cout << ", Content: " - << StrX(decl.getFormattedContentModel(*fScanner->getValidator())) + << StrX(decl.getFormattedContentModel()) << "\n SrcOfs: " << fScanner->getSrcOffset() << "\n" << endl; } @@ -704,7 +707,7 @@ void TestParser::elementDecl(const DTDElementDecl& decl if (fIntDTDOutput) { cout << "<!ELEMENT " << StrX(decl.getFullName()) << " " - << StrX(decl.getFormattedContentModel(*fScanner->getValidator())) + << StrX(decl.getFormattedContentModel()) << ">"; } } @@ -773,7 +776,7 @@ void TestParser::entityDecl(const DTDEntityDecl& entityDecl if (isPEDecl) cout << "% "; cout << StrX(entityDecl.getName()); - + if (entityDecl.isExternal()) showIds(entityDecl.getPublicId(), entityDecl.getSystemId()); else @@ -931,7 +934,7 @@ void TestParser::error( const unsigned int errCode typeStr = "ERROR"; else if (type == XMLErrorReporter::ErrType_Warning) typeStr = "WARNING"; - else if (type == XMLErrorReporter::ErrType_Invalid) + else if (type == XMLErrorReporter::ErrType_Error) typeStr = "VALIDITY"; // Output the error heading and the error type string