Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.8

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

XalanDocumentPrefixResolver.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(XALANDOCUMENTPREFIXRESOLVER_HEADER_GUARD_1357924680)
00017 #define XALANDOCUMENTPREFIXRESOLVER_HEADER_GUARD_1357924680
00018 
00019 
00020 
00021 // Base include file.  Must be first.
00022 #include <xalanc/DOMSupport/DOMSupportDefinitions.hpp>
00023 
00024 
00025 
00026 #include <map>
00027 #include <vector>
00028 
00029 
00030 
00031 #include <xalanc/XalanDOM/XalanDOMString.hpp>
00032 
00033 
00034 
00035 #include <xalanc/PlatformSupport/PrefixResolver.hpp>
00036 #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
00037 
00038 
00039 
00040 #include <xalanc/Include/STLHelper.hpp>
00041 
00042 
00043 
00044 #include <xalanc/DOMSupport/TreeWalker.hpp>
00045 
00046 
00047 
00048 XALAN_CPP_NAMESPACE_BEGIN
00049 
00050 
00051 
00052 class XalanAttr;
00053 class XalanDocument;
00054 
00055 
00056 
00057 class XALAN_DOMSUPPORT_EXPORT XalanDocumentPrefixResolver : public PrefixResolver
00058 {
00059 public:
00060 
00061 #if defined(XALAN_NO_STD_NAMESPACE)
00062     typedef vector<const XalanNode*>                    AttributeVectorType;
00063 
00064     typedef map<const XalanDOMString*,
00065                 AttributeVectorType,
00066                 pointer_less<XalanDOMString> >          NamespacesMapType;
00067 #else
00068     typedef std::vector<const XalanNode*>               AttributeVectorType;
00069 
00070     typedef std::map<const XalanDOMString*,
00071                      AttributeVectorType,
00072                      pointer_less<XalanDOMString> >     NamespacesMapType;
00073 #endif
00074 
00081     XalanDocumentPrefixResolver(
00082             const XalanDocument*    theDocument,
00083             const XalanDOMString&   theURI = XalanDOMString());
00084 
00085     virtual
00086     ~XalanDocumentPrefixResolver();
00087 
00088 
00089     virtual const XalanDOMString*
00090     getNamespaceForPrefix(const XalanDOMString&     prefix) const;
00091 
00092     virtual const XalanDOMString&
00093     getURI() const;
00094 
00098     class NamespaceNodesTreeWalker : public TreeWalker
00099     {
00100     public:
00101 
00102         NamespaceNodesTreeWalker(NamespacesMapType&     theMap);
00103 
00104         virtual
00105         ~NamespaceNodesTreeWalker();
00106 
00107     protected:
00108 
00109         virtual bool
00110         startNode(const XalanNode*  node);
00111 
00112         virtual bool
00113         startNode(XalanNode*    node);
00114 
00115         virtual bool
00116         endNode(const XalanNode*    node);
00117 
00118         virtual bool
00119         endNode(XalanNode*  node);
00120 
00121     private:
00122 
00123         NamespacesMapType&  m_map;
00124     };
00125 
00126 
00127 protected:
00128 
00137     virtual const XalanDOMString*
00138     duplicateBinding(const AttributeVectorType&     theVector) const;
00139 
00140 private:
00141 
00142     NamespacesMapType       m_namespaces;
00143 
00144     const XalanDOMString    m_uri;
00145 };
00146 
00147 
00148 
00149 XALAN_CPP_NAMESPACE_END
00150 
00151 
00152 
00153 #endif  // XALANDOCUMENTPREFIXRESOLVER_HEADER_GUARD_1357924680

Interpreting class diagrams

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

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