00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 #if !defined(XALANDEFAULTPARSEDSOURCE_HEADER_GUARD) 00019 #define XALANDEFAULTPARSEDSOURCE_HEADER_GUARD 00020 00021 00022 00023 // Base include file. Must be first. 00024 #include <xalanc/XalanTransformer/XalanTransformerDefinitions.hpp> 00025 00026 00027 00028 #include <xalanc/XalanSourceTree/XalanSourceTreeDocument.hpp> 00029 #include <xalanc/XalanSourceTree/XalanSourceTreeDOMSupport.hpp> 00030 #include <xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.hpp> 00031 00032 00033 00034 #include <xalanc/XalanTransformer/XalanParsedSource.hpp> 00035 00036 00037 00038 XALAN_CPP_NAMESPACE_BEGIN 00039 00040 00041 00042 class XSLTInputSource; 00043 00044 00045 00046 class XalanDefaultParsedSourceDOMSupport : public XalanSourceTreeDOMSupport 00047 { 00048 public: 00049 00050 XalanDefaultParsedSourceDOMSupport( 00051 const XalanSourceTreeParserLiaison& theParserLiaison, 00052 const XalanSourceTreeDOMSupport& theDOMSupport); 00053 00054 virtual 00055 ~XalanDefaultParsedSourceDOMSupport(); 00056 00057 virtual void 00058 reset(); 00059 00060 // These interfaces are inherited from DOMSupport... 00061 00062 virtual const XalanDOMString& 00063 getUnparsedEntityURI( 00064 const XalanDOMString& theName, 00065 const XalanDocument& theDocument) const; 00066 00067 virtual bool 00068 isNodeAfter( 00069 const XalanNode& node1, 00070 const XalanNode& node2) const; 00071 00072 private: 00073 00074 // Not implemented... 00075 XalanDefaultParsedSourceDOMSupport(const XalanDefaultParsedSourceDOMSupport&); 00076 00077 XalanDefaultParsedSourceDOMSupport& 00078 operator=(const XalanDefaultParsedSourceDOMSupport&); 00079 00080 00081 // Data members... 00082 const XalanSourceTreeDOMSupport& m_domSupport; 00083 }; 00084 00085 00086 00087 class XALAN_TRANSFORMER_EXPORT XalanDefaultParsedSourceHelper : public XalanParsedSourceHelper 00088 { 00089 public: 00090 00091 XalanDefaultParsedSourceHelper(const XalanSourceTreeDOMSupport& theSourceDOMSupport, 00092 MemoryManager& theManager XALAN_DEFAULT_MEMMGR); 00093 00094 static XalanDefaultParsedSourceHelper* 00095 create(const XalanSourceTreeDOMSupport& theSourceDOMSupport, 00096 MemoryManager& theManager); 00097 00098 ~XalanDefaultParsedSourceHelper(); 00099 00100 virtual DOMSupport& 00101 getDOMSupport(); 00102 00103 virtual XMLParserLiaison& 00104 getParserLiaison(); 00105 00106 private: 00107 00108 // Not implemented... 00109 XalanDefaultParsedSourceHelper(const XalanDefaultParsedSourceHelper&); 00110 00111 XalanDefaultParsedSourceHelper& 00112 operator=(const XalanDefaultParsedSourceHelper&); 00113 00114 00115 // Data members... 00116 XalanSourceTreeParserLiaison m_parserLiaison; 00117 00118 XalanDefaultParsedSourceDOMSupport m_domSupport; 00119 }; 00120 00121 00122 00123 /** 00124 * This is designed to allow a XalanTranfomer object to reuse a parsed 00125 * document. 00126 */ 00127 class XALAN_TRANSFORMER_EXPORT XalanDefaultParsedSource : public XalanParsedSource 00128 { 00129 public: 00130 00131 XalanDefaultParsedSource( 00132 const InputSource& theInputSource, 00133 bool fValidate = false, 00134 ErrorHandler* theErrorHandler = 0, 00135 EntityResolver* theEntityResolver = 0, 00136 XMLEntityResolver* theXMLEntityResolver = 0, 00137 const XalanDOMChar* theExternalSchemaLocation = 0, 00138 const XalanDOMChar* theExternalNoNamespaceSchemaLocation = 0, 00139 bool fPoolAllTextNodes = XalanSourceTreeDocument::getPoolAllTextNodes(), 00140 MemoryManager& theManager XALAN_DEFAULT_MEMMGR); 00141 00142 static XalanDefaultParsedSource* 00143 create( 00144 MemoryManager& theManager, 00145 const InputSource& theInputSource, 00146 bool fValidate = false, 00147 ErrorHandler* theErrorHandler = 0, 00148 EntityResolver* theEntityResolver = 0, 00149 XMLEntityResolver* theXMLEntityResolver = 0, 00150 const XalanDOMChar* theExternalSchemaLocation = 0, 00151 const XalanDOMChar* theExternalNoNamespaceSchemaLocation = 0, 00152 bool fPoolAllTextNodes = XalanSourceTreeDocument::getPoolAllTextNodes()); 00153 00154 virtual 00155 ~XalanDefaultParsedSource(); 00156 00157 virtual XalanDocument* 00158 getDocument() const; 00159 00160 virtual XalanParsedSourceHelper* 00161 createHelper(MemoryManager& theManager) const; 00162 00163 virtual const XalanDOMString& 00164 getURI() const; 00165 00166 private: 00167 00168 // Not implemented... 00169 XalanDefaultParsedSource(const XalanDefaultParsedSource&); 00170 00171 XalanDefaultParsedSource& 00172 operator=(const XalanDefaultParsedSource&); 00173 00174 00175 // Data members... 00176 XalanSourceTreeParserLiaison m_parserLiaison; 00177 00178 XalanSourceTreeDOMSupport m_domSupport; 00179 00180 XalanSourceTreeDocument* m_parsedSource; 00181 00182 XalanDOMString m_uri; 00183 }; 00184 00185 00186 00187 XALAN_CPP_NAMESPACE_END 00188 00189 00190 00191 #endif // XALANDEFAULTPARSEDSOURCE_HEADER_GUARD 00192 00193 00194
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|