Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ExtensionNSHandler.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2004 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #if !defined(XALAN_EXTENSIONNSHANDLER_HEADER_GUARD)
00017 #define XALAN_EXTENSIONNSHANDLER_HEADER_GUARD
00018 
00019 
00020 // Base include file.   Must be first.
00021 #include "XSLTDefinitions.hpp"
00022 
00023 
00024 
00025 // Base class
00026 #include "ExtensionFunctionHandler.hpp"
00027 
00028 
00029 
00030 #include <xalanc/Include/XalanSet.hpp>
00031 
00032 
00033 
00034 #include <xalanc/XalanDOM/XalanDOMString.hpp>
00035 
00036 
00037 
00038 #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
00039 
00040 
00041 
00042 XALAN_CPP_NAMESPACE_BEGIN
00043 
00044 
00045 
00046 class Stylesheet;
00047 class StylesheetExecutionContext;
00048 class XalanElement;
00049 class XalanNode;
00050 class XalanQName;
00051 
00052 
00053 
00054 class XALAN_XSLT_EXPORT ExtensionNSHandler : public ExtensionFunctionHandler
00055 {    
00056 public: 
00063     ExtensionNSHandler(const XalanDOMString&    namespaceUri,
00064                         MemoryManagerType& theManager);
00065 
00066     static ExtensionNSHandler*
00067     create(const XalanDOMString&    namespaceUri,
00068                         MemoryManagerType& theManager);
00082     ExtensionNSHandler(
00083             MemoryManagerType&      theManager,
00084             const XalanDOMString&   namespaceUri,
00085             const XalanDOMString&   elemNames,
00086             const XalanDOMString&   funcNames,
00087             const XalanDOMString&   lang,
00088             const XalanDOMString&   srcURL,
00089             const XalanDOMString&   src);
00090 
00098     virtual void
00099     setFunctions(const XalanDOMString&  funcNames); 
00100 
00111     virtual void
00112     setScript(
00113             const XalanDOMString&   lang,
00114             const XalanDOMString&   srcURL,
00115             const XalanDOMString&   scriptSrc); 
00116 
00123     void
00124     setElements(const XalanDOMString&   elemNames); 
00125 
00132     bool
00133     isElementAvailable (const XalanDOMString&   element) const;
00134 
00153     void
00154     processElement (
00155             StylesheetExecutionContext&     executionContext,
00156             const XalanDOMString&           localPart,
00157             const XalanElement*             element,
00158             Stylesheet&                     stylesheetTree, 
00159             const XalanNode*                sourceTree,
00160             const XalanNode*                sourceNode,
00161             const XalanQName&               mode);
00162 
00163 protected:
00164 
00171     virtual void
00172     startupComponent();
00173 
00174 
00175 private:
00176 
00177     typedef XalanSet<XalanDOMString>    ExtensionSetType;
00178 
00179     // Extension elements of this namespace
00180     ExtensionSetType    m_elements;
00181 
00182     // True when info from the component description has been loaded. This gets
00183     // set as soon as any of the info has been specified. If this is false,
00184     // when processElement or processFunction is called it will use the
00185     // namespace URI as a URL and try to load that location as the component
00186     // description
00187     bool m_componentDescLoaded;
00188 
00193     void
00194     loadComponentDescription();
00195 
00207     static XalanDOMString&
00208     getScriptString(const XalanElement&     elem, XalanDOMString& theResult);
00209 };
00210 
00211 
00212 
00213 XALAN_CPP_NAMESPACE_END
00214 
00215 
00216 
00217 #endif  // XALAN_EXTENSIONNSHANDLER_HEADER_GUARD

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo