00001 /* 00002 * The Apache Software License, Version 1.1 00003 * 00004 * 00005 * Copyright (c) 1999-2002 The Apache Software Foundation. All rights 00006 * reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions 00010 * are met: 00011 * 00012 * 1. Redistributions of source code must retain the above copyright 00013 * notice, this list of conditions and the following disclaimer. 00014 * 00015 * 2. Redistributions in binary form must reproduce the above copyright 00016 * notice, this list of conditions and the following disclaimer in 00017 * the documentation and/or other materials provided with the 00018 * distribution. 00019 * 00020 * 3. The end-user documentation included with the redistribution, 00021 * if any, must include the following acknowledgment: 00022 * "This product includes software developed by the 00023 * Apache Software Foundation (http://www.apache.org/)." 00024 * Alternately, this acknowledgment may appear in the software itself, 00025 * if and wherever such third-party acknowledgments normally appear. 00026 * 00027 * 4. The names "Xalan" and "Apache Software Foundation" must 00028 * not be used to endorse or promote products derived from this 00029 * software without prior written permission. For written 00030 * permission, please contact apache@apache.org. 00031 * 00032 * 5. Products derived from this software may not be called "Apache", 00033 * nor may "Apache" appear in their name, without prior written 00034 * permission of the Apache Software Foundation. 00035 * 00036 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 00037 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00038 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00039 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 00040 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00041 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00042 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 00043 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00044 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00045 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00046 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00047 * SUCH DAMAGE. 00048 * ==================================================================== 00049 * 00050 * This software consists of voluntary contributions made by many 00051 * individuals on behalf of the Apache Software Foundation and was 00052 * originally based on software copyright (c) 1999, International 00053 * Business Machines, Inc., http://www.ibm.com. For more 00054 * information on the Apache Software Foundation, please see 00055 * <http://www.apache.org/>. 00056 */ 00057 #if !defined(XALANSOURCETREEPARSERLIAISON_HEADER_GUARD_1357924680) 00058 #define XALANSOURCETREEPARSERLIAISON_HEADER_GUARD_1357924680 00059 00060 00061 // Base include file. Must be first. 00062 #include <XalanSourceTree/XalanSourceTreeDefinitions.hpp> 00063 00064 00065 00066 // Standard Library header files. 00067 #include <map> 00068 00069 00070 00071 #include <XercesParserLiaison/XercesDOMSupport.hpp> 00072 #include <XercesParserLiaison/XercesParserLiaison.hpp> 00073 00074 00075 00076 class ContentHandler; 00077 class DTDHandler; 00078 class LexicalHandler; 00079 class SAX2XMLReader; 00080 class XalanSourceTreeDOMSupport; 00081 class XalanSourceTreeDocument; 00082 00083 00084 00085 class XALAN_XALANSOURCETREE_EXPORT XalanSourceTreeParserLiaison : public XMLParserLiaison 00086 { 00087 public: 00088 00096 XalanSourceTreeParserLiaison(XalanSourceTreeDOMSupport& theSupport); 00097 00101 XalanSourceTreeParserLiaison(); 00102 00103 virtual 00104 ~XalanSourceTreeParserLiaison(); 00105 00112 bool 00113 getPoolAllText() const 00114 { 00115 return m_poolAllText; 00116 } 00117 00124 void 00125 setPoolAllText(bool fValue) 00126 { 00127 m_poolAllText = fValue; 00128 } 00129 00130 // These interfaces are inherited from XMLParserLiaison... 00131 00132 virtual void 00133 reset(); 00134 00135 virtual ExecutionContext* 00136 getExecutionContext() const; 00137 00138 virtual void 00139 setExecutionContext(ExecutionContext& theContext); 00140 00141 virtual XalanDocument* 00142 parseXMLStream( 00143 const InputSource& reader, 00144 const XalanDOMString& identifier = XalanDOMString()); 00145 00146 virtual void 00147 parseXMLStream( 00148 const InputSource& inputSource, 00149 DocumentHandler& handler, 00150 const XalanDOMString& identifier = XalanDOMString()); 00151 00152 virtual XalanDocument* 00153 createDocument(); 00154 00155 virtual XalanDocument* 00156 createDOMFactory(); 00157 00158 virtual void 00159 destroyDocument(XalanDocument* theDocument); 00160 00161 virtual int 00162 getIndent() const; 00163 00164 virtual void 00165 setIndent(int i); 00166 00167 virtual bool 00168 getUseValidation() const; 00169 00170 virtual void 00171 setUseValidation(bool b); 00172 00173 virtual const XalanDOMString 00174 getParserDescription() const; 00175 00176 virtual EntityResolver* 00177 getEntityResolver() const; 00178 00179 virtual void 00180 setEntityResolver(EntityResolver* resolver); 00181 00182 00183 // These interfaces are new to XalanSourceTreeParserLiaison... 00184 00194 virtual void 00195 parseXMLStream( 00196 const InputSource& theInputSource, 00197 ContentHandler& theContentHandler, 00198 DTDHandler* theDTDHandler = 0, 00199 LexicalHandler* theLexicalHandler = 0, 00200 const XalanDOMString& theIdentifier = XalanDOMString()); 00201 00212 virtual bool 00213 getIncludeIgnorableWhitespace() const; 00214 00233 virtual void 00234 setIncludeIgnorableWhitespace(bool include); 00235 00241 virtual ErrorHandler* 00242 getErrorHandler() const; 00243 00254 virtual void 00255 setErrorHandler(ErrorHandler* handler); 00256 00266 virtual bool 00267 getDoNamespaces() const; 00268 00286 virtual void 00287 setDoNamespaces(bool newState); 00288 00298 virtual bool 00299 getExitOnFirstFatalError() const; 00300 00316 virtual void 00317 setExitOnFirstFatalError(bool newState); 00318 00325 virtual const XalanDOMChar* 00326 getExternalSchemaLocation() const; 00327 00334 virtual void 00335 setExternalSchemaLocation(const XalanDOMChar* location); 00336 00343 virtual const XalanDOMChar* 00344 getExternalNoNamespaceSchemaLocation() const; 00345 00352 virtual void 00353 setExternalNoNamespaceSchemaLocation(const XalanDOMChar* location); 00354 00364 XalanSourceTreeDocument* 00365 mapDocument(const XalanDocument* theDocument) const; 00366 00372 XalanSourceTreeDocument* 00373 createXalanSourceTreeDocument(); 00374 00375 #if defined(XALAN_NO_NAMESPACES) 00376 typedef map<const XalanDocument*, 00377 XalanSourceTreeDocument*, 00378 less<const XalanDocument*> > DocumentMapType; 00379 #else 00380 typedef std::map<const XalanDocument*, 00381 XalanSourceTreeDocument*> DocumentMapType; 00382 #endif 00383 00384 protected: 00385 00386 virtual SAX2XMLReader* 00387 createReader(); 00388 00389 private: 00390 00391 // Not implemented... 00392 XalanSourceTreeParserLiaison(const XalanSourceTreeParserLiaison&); 00393 00394 XalanSourceTreeParserLiaison& 00395 operator=(const XalanSourceTreeParserLiaison&); 00396 00397 00398 // Data members... 00399 XercesParserLiaison m_xercesParserLiaison; 00400 00401 DocumentMapType m_documentMap; 00402 00403 bool m_poolAllText; 00404 00405 static const XalanDOMChar s_validationString[]; 00406 00407 static const XalanDOMChar s_dynamicValidationString[]; 00408 00409 static const XalanDOMChar s_namespacesString[]; 00410 00411 static const XalanDOMChar s_namespacePrefixesString[]; 00412 00413 static const XalanDOMChar s_schemaString[]; 00414 00415 static const XalanDOMChar s_externalSchemaLocationString[]; 00416 00417 static const XalanDOMChar s_externalNoNamespaceSchemaLocationString[]; 00418 }; 00419 00420 00421 00422 #endif // XALANSOURCETREEPARSERLIAISON_HEADER_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
![]() |
Xalan-C++ XSLT Processor Version 1.4 |
|