Xalan-C++ API Reference
1.12.0
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
w
x
Functions
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
w
x
Typedefs
a
b
c
d
e
f
i
l
m
n
p
s
t
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
~
Variables
a
b
c
d
e
f
g
i
m
n
o
p
r
s
t
v
x
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
e
n
Enumerator
a
b
c
d
e
f
h
i
l
n
o
p
r
s
t
u
v
w
x
Related Functions
Files
File List
File Members
All
_
c
d
g
i
m
o
s
x
Functions
c
d
o
x
Variables
Typedefs
Macros
_
d
i
m
x
xalanc
DOMSupport
XalanDocumentPrefixResolver.hpp
Go to the documentation of this file.
1
/*
2
* Licensed to the Apache Software Foundation (ASF) under one
3
* or more contributor license agreements. See the NOTICE file
4
* distributed with this work for additional information
5
* regarding copyright ownership. The ASF licenses this file
6
* to you under the Apache License, Version 2.0 (the "License");
7
* you may not use this file except in compliance with the License.
8
* You may obtain a copy of the License at
9
*
10
* http://www.apache.org/licenses/LICENSE-2.0
11
*
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
17
*/
18
#if !defined(XALANDOCUMENTPREFIXRESOLVER_HEADER_GUARD_1357924680)
19
#define XALANDOCUMENTPREFIXRESOLVER_HEADER_GUARD_1357924680
20
21
22
23
// Base include file. Must be first.
24
#include <
xalanc/DOMSupport/DOMSupportDefinitions.hpp
>
25
26
27
28
#include <
xalanc/XalanDOM/XalanDOMString.hpp
>
29
30
31
32
#include <
xalanc/PlatformSupport/PrefixResolver.hpp
>
33
#include <
xalanc/PlatformSupport/DOMStringHelper.hpp
>
34
35
36
37
#include <
xalanc/Include/XalanVector.hpp
>
38
#include <
xalanc/Include/XalanMap.hpp
>
39
#include <
xalanc/Include/STLHelper.hpp
>
40
41
42
43
#include <
xalanc/DOMSupport/TreeWalker.hpp
>
44
45
46
47
namespace
XALAN_CPP_NAMESPACE
{
48
49
50
51
52
53
class
XalanAttr;
54
class
XalanDocument
;
55
56
typedef
XalanVector<const XalanNode*>
AttributeVectorTypeDecl
;
57
XALAN_USES_MEMORY_MANAGER
(
AttributeVectorTypeDecl
)
58
59
60
class
XALAN_DOMSUPPORT_EXPORT
XalanDocumentPrefixResolver
: public
PrefixResolver
61
{
62
public
:
63
64
typedef
AttributeVectorTypeDecl
AttributeVectorType
;
65
typedef
XalanMap
<
const
XalanDOMString
*,
66
AttributeVectorType
>
NamespacesMapType
;
67
68
/**
69
* Constructor.
70
*
71
* @param theDocument The XalanDocument instance to use for namespace bindings.
72
* @param theURI The base URI for the instance. This is rarely needed, but can be provided if the URI for the XalanDocument instance is known.
73
*/
74
XalanDocumentPrefixResolver
(
75
const
XalanDocument
* theDocument,
76
const
XalanDOMString
& theURI =
XalanDOMString
(XalanMemMgrs::getDummyMemMgr()),
77
MemoryManager& theManager
XALAN_DEFAULT_MEMMGR
);
78
79
virtual
80
~
XalanDocumentPrefixResolver
();
81
82
83
virtual
const
XalanDOMString
*
84
getNamespaceForPrefix(
const
XalanDOMString
& prefix)
const
;
85
86
virtual
const
XalanDOMString
&
87
getURI()
const
;
88
89
/**
90
* A utility class to walk the XalanDocument instance and look for attribute nodes that declare namespaces.
91
*/
92
class
NamespaceNodesTreeWalker
:
public
TreeWalker
93
{
94
public
:
95
96
NamespaceNodesTreeWalker
(
NamespacesMapType
& theMap);
97
98
virtual
99
~
NamespaceNodesTreeWalker
();
100
101
protected
:
102
103
virtual
bool
104
startNode(
const
XalanNode
* node);
105
106
virtual
bool
107
startNode(
XalanNode
* node);
108
109
virtual
bool
110
endNode(
const
XalanNode
* node);
111
112
virtual
bool
113
endNode(
XalanNode
* node);
114
115
private
:
116
117
NamespacesMapType
& m_map;
118
};
119
120
121
protected
:
122
123
/**
124
* This function is called when more than one binding exists for a given prefix.
125
* The default behavior uses the first binding, but a deriving class can change
126
* that behavior by overriding.
127
*
128
* @param theVector The vector associated with the namespace prefix.
129
* @return A pointer to a const XalanDOMString containing the desired binding, or NULL.
130
*/
131
virtual
const
XalanDOMString
*
132
duplicateBinding(
const
AttributeVectorType
& theVector)
const
;
133
134
private
:
135
136
NamespacesMapType
m_namespaces;
137
138
const
XalanDOMString
m_uri;
139
};
140
141
142
143
}
144
145
146
147
#endif // XALANDOCUMENTPREFIXRESOLVER_HEADER_GUARD_1357924680
XALAN_DOMSUPPORT_EXPORT
#define XALAN_DOMSUPPORT_EXPORT
Definition:
DOMSupportDefinitions.hpp:35
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition:
XalanVersion.hpp:76
PrefixResolver.hpp
xalanc::XalanNode
Definition:
XalanNode.hpp:38
XalanDOMString.hpp
xalanc::XalanVector< const XalanNode * >
XALAN_USES_MEMORY_MANAGER
#define XALAN_USES_MEMORY_MANAGER(Type)
Definition:
XalanMemoryManagement.hpp:589
xalanc::XalanDocumentPrefixResolver
Definition:
XalanDocumentPrefixResolver.hpp:60
xalanc::XalanDocument
Definition:
XalanDocument.hpp:36
XALAN_DEFAULT_MEMMGR
#define XALAN_DEFAULT_MEMMGR
Definition:
XalanMemoryManagement.hpp:516
xalanc::XalanDocumentPrefixResolver::NamespaceNodesTreeWalker
A utility class to walk the XalanDocument instance and look for attribute nodes that declare namespac...
Definition:
XalanDocumentPrefixResolver.hpp:92
XalanVector.hpp
xalanc::XalanDocumentPrefixResolver::AttributeVectorType
AttributeVectorTypeDecl AttributeVectorType
Definition:
XalanDocumentPrefixResolver.hpp:64
STLHelper.hpp
DOMStringHelper.hpp
xalanc::XalanDocumentPrefixResolver::NamespacesMapType
XalanMap< const XalanDOMString *, AttributeVectorType > NamespacesMapType
Definition:
XalanDocumentPrefixResolver.hpp:66
xalanc::PrefixResolver
This class defines an interface for classes that resolve namespace prefixes to their URIs.
Definition:
PrefixResolver.hpp:39
xalanc::XalanMap
Xalan implementation of a hashtable.
Definition:
XalanMap.hpp:186
TreeWalker.hpp
XalanMap.hpp
DOMSupportDefinitions.hpp
xalanc::XalanDOMString
Definition:
XalanDOMString.hpp:45
xalanc::AttributeVectorTypeDecl
XalanVector< const XalanNode * > AttributeVectorTypeDecl
Definition:
XalanDocumentPrefixResolver.hpp:54
xalanc::TreeWalker
Definition:
TreeWalker.hpp:36
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Generated on Sun May 31 2020 10:37:16 for Xalan-C++ API Reference by
1.8.17