source: icXML/icXML-devel/tests/src/XSTSHarness/XSTSHarnessHandlers.hpp @ 2726

Last change on this file since 2726 was 2726, checked in by cameron, 6 years ago

Add original Xerces tests and samples directories

File size: 2.5 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: XSTSHarnessHandlers.hpp 804211 2009-08-14 13:18:09Z amassari $
20 */
21
22
23// ---------------------------------------------------------------------------
24//  Includes
25// ---------------------------------------------------------------------------
26#include "XSTSHarness.hpp"
27#include <xercesc/sax2/SAX2XMLReader.hpp>
28#include <xercesc/sax2/Attributes.hpp>
29#include <xercesc/sax2/DefaultHandler.hpp>
30#include <xercesc/util/RefVectorOf.hpp>
31
32XERCES_CPP_NAMESPACE_USE
33
34class XSTSTest
35{
36public:
37    XSTSTest() :
38      fXSDNames(1) 
39    {
40        fTestName[0]=0;
41        fExpectedResult=unknown;
42        fSkipped=false;
43    }
44
45    XMLCh           fTestName[256];
46    RefVectorOf<XMLURL> fXSDNames;
47    XMLURL          fXMLName;
48    ValidityOutcome fExpectedResult;
49    XMLURL          fSpecReference;
50    bool            fSkipped;
51};
52
53class XSTSHarnessHandlers : public BaseHarnessHandlers
54{
55public:
56    // -----------------------------------------------------------------------
57    //  Constructors and Destructor
58    // -----------------------------------------------------------------------
59    XSTSHarnessHandlers(const XMLCh* baseURL);
60    ~XSTSHarnessHandlers();
61
62    // -----------------------------------------------------------------------
63    //  Handlers for the SAX ContentHandler interface
64    // -----------------------------------------------------------------------
65    void startElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname, const Attributes& attrs);
66    void endElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname);
67
68private:
69    XSTSTest            fCurrentTest;
70    SAX2XMLReader*      fParser;
71    BaseErrorHandler    fErrorHandler;
72    BaseEntityResolver  fEntityResolver;
73};
74
Note: See TracBrowser for help on using the repository browser.