File: XSECC14n20010315_8hpp-source.html

package info (click to toggle)
xml-security-c 1.2.1-3
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 24,464 kB
  • ctags: 6,673
  • sloc: cpp: 36,830; xml: 23,415; sh: 2,365; makefile: 340; perl: 221
file content (178 lines) | stat: -rw-r--r-- 14,268 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>XML-Security-C: XSECC14n20010315.hpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">src</a>&nbsp;/&nbsp;<a class="el" href="dir_000013.html">canon</a></div>
<h1>XSECC14n20010315.hpp</h1><a href="XSECC14n20010315_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
00002 <span class="comment"> * Copyright 2002-2005 The Apache Software Foundation.</span>
00003 <span class="comment"> *</span>
00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
00006 <span class="comment"> * You may obtain a copy of the License at</span>
00007 <span class="comment"> *</span>
00008 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
00009 <span class="comment"> *</span>
00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
00014 <span class="comment"> * limitations under the License.</span>
00015 <span class="comment"> */</span>
00016 
00017 <span class="comment">/*</span>
00018 <span class="comment"> * XSEC</span>
00019 <span class="comment"> *</span>
00020 <span class="comment"> * XSECC14n20010315 := Canonicaliser object to process XML document in line with</span>
00021 <span class="comment"> *                       RFC 3076</span>
00022 <span class="comment"> *</span>
00023 <span class="comment"> * Author(s): Berin Lautenbach</span>
00024 <span class="comment"> *</span>
00025 <span class="comment"> * $Id: XSECC14n20010315.hpp,v 1.9 2005/02/03 13:09:31 milan Exp $</span>
00026 <span class="comment"> *</span>
00027 <span class="comment"> */</span>
00028 
00029 <span class="preprocessor">#ifndef XSECC14n20010315_INCLUDE</span>
00030 <span class="preprocessor"></span><span class="preprocessor">#define XSECC14n20010315_INCLUDE</span>
00031 <span class="preprocessor"></span>
00032 <span class="comment">//XSEC includes</span>
00033 <span class="preprocessor">#include &lt;xsec/framework/XSECDefs.hpp&gt;</span>
00034 <span class="preprocessor">#include &lt;xsec/utils/XSECSafeBuffer.hpp&gt;</span>
00035 <span class="preprocessor">#include &lt;xsec/utils/XSECXPathNodeList.hpp&gt;</span>
00036 <span class="preprocessor">#include &lt;xsec/canon/XSECCanon.hpp&gt;</span>
00037 
00038 <span class="preprocessor">#include &lt;xercesc/framework/XMLFormatter.hpp&gt;</span>
00039 
00040 <span class="comment">// General includes</span>
00041 <span class="preprocessor">#include &lt;memory.h&gt;</span>
00042 <span class="preprocessor">#include &lt;vector&gt;</span>
00043 
00044 <a class="code" href="XSECDefs_8hpp.html#a4">XSEC_USING_XERCES</a>(XMLFormatter);
00045 <a class="code" href="XSECDefs_8hpp.html#a4">XSEC_USING_XERCES</a>(XMLFormatTarget);
00046 
00047 <span class="keyword">class </span><a class="code" href="classXSECSafeBufferFormatter.html">XSECSafeBufferFormatter</a>;
00048 
00049 <span class="comment">// --------------------------------------------------------------------------------</span>
00050 <span class="comment">//           Simple structure for holding a list of nodes</span>
00051 <span class="comment">// --------------------------------------------------------------------------------</span>
00052 
00053 <span class="comment">// NOTE: We don't use NamedNodeMap or DOMNodeList as we are unsure what might happen</span>
00054 <span class="comment">// to them in the future.  Also, to add items we would have to delve into the inards</span>
00055 <span class="comment">// of Xerces (and use the "...impl" classes).  Such an approach might not be supported</span>
00056 <span class="comment">// in the future.</span>
00057 
<a name="l00058"></a><a class="code" href="structXSECNodeListElt.html">00058</a> <span class="keyword">struct </span><a class="code" href="structXSECNodeListElt.html">XSECNodeListElt</a> {
00059 
<a name="l00060"></a><a class="code" href="structXSECNodeListElt.html#o0">00060</a>     <a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMNode  *<a class="code" href="structXSECNodeListElt.html#o0">element</a>;   <span class="comment">// Element referred to</span>
<a name="l00061"></a><a class="code" href="structXSECNodeListElt.html#o1">00061</a>     <a class="code" href="classsafeBuffer.html">safeBuffer</a>                      <a class="code" href="structXSECNodeListElt.html#o1">sortString</a>; <span class="comment">// The string that is used to sort the nodes</span>
00062 
<a name="l00063"></a><a class="code" href="structXSECNodeListElt.html#o2">00063</a>     <a class="code" href="structXSECNodeListElt.html">XSECNodeListElt</a>                 *<a class="code" href="structXSECNodeListElt.html#o2">next</a>,
00064                                     *<a class="code" href="structXSECNodeListElt.html#o3">last</a>;      <span class="comment">// For the list</span>
00065 
00066 };
00067 
00068 <span class="comment">// Used for the sorting function</span>
00069 
<a name="l00070"></a><a class="code" href="XSECC14n20010315_8hpp.html#a0">00070</a> <span class="preprocessor">#define XMLNS_PREFIX        "a"</span>
<a name="l00071"></a><a class="code" href="XSECC14n20010315_8hpp.html#a1">00071</a> <span class="preprocessor"></span><span class="preprocessor">#define ATTRIBUTE_PREFIX    "b"</span>
00072 <span class="preprocessor"></span>
<a name="l00073"></a><a class="code" href="XSECC14n20010315_8hpp.html#a2">00073</a> <span class="preprocessor">#define NOURI_PREFIX         "a"</span>
<a name="l00074"></a><a class="code" href="XSECC14n20010315_8hpp.html#a3">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define HAVEURI_PREFIX       "b"</span>
00075 <span class="preprocessor"></span>
00076 <span class="comment">// --------------------------------------------------------------------------------</span>
00077 <span class="comment">//           XSECC14n20010315 Object definition</span>
00078 <span class="comment">// --------------------------------------------------------------------------------</span>
00079 
<a name="l00080"></a><a class="code" href="classXSECC14n20010315.html">00080</a> <span class="keyword">class </span><a class="code" href="XSECDefs_8hpp.html#a8">CANON_EXPORT</a> <a class="code" href="classXSECC14n20010315.html">XSECC14n20010315</a> : <span class="keyword">public</span> <a class="code" href="classXSECCanon.html">XSECCanon</a> {
00081 
00082 <span class="preprocessor">#if defined(XALAN_NO_NAMESPACES)</span>
00083 <span class="preprocessor"></span>    <span class="keyword">typedef</span> vector&lt;char *&gt;              CharListVectorType;
00084 <span class="preprocessor">#else</span>
00085 <span class="preprocessor"></span>    <span class="keyword">typedef</span> std::vector&lt;char *&gt;         CharListVectorType;
00086 <span class="preprocessor">#endif</span>
00087 <span class="preprocessor"></span>
00088 <span class="preprocessor">#if defined(XALAN_SIZE_T_IN_NAMESPACE_STD)</span>
00089 <span class="preprocessor"></span>    <span class="keyword">typedef</span> std::size_t     size_type;
00090 <span class="preprocessor">#else</span>
00091 <span class="preprocessor"></span>    <span class="keyword">typedef</span> size_t          size_type;
00092 <span class="preprocessor">#endif</span>
00093 <span class="preprocessor"></span>
00094 
00095 <span class="keyword">public</span>:
00096 
00097     <span class="comment">// Constructors</span>
00098     <a class="code" href="classXSECC14n20010315.html">XSECC14n20010315</a>();
00099     <a class="code" href="classXSECC14n20010315.html">XSECC14n20010315</a>(<a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMDocument *newDoc);
00100     <a class="code" href="classXSECC14n20010315.html">XSECC14n20010315</a>(<a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMDocument *newDoc, 
00101                      <a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMNode *newStartNode);
00102     <span class="keyword">virtual</span> ~<a class="code" href="classXSECC14n20010315.html">XSECC14n20010315</a>();
00103 
00104     <span class="comment">// XPath processor</span>
00105 
00106     <span class="keywordtype">int</span> XPathSelectNodes(<span class="keyword">const</span> <span class="keywordtype">char</span> * XPathExpr);
00107     <span class="keywordtype">void</span> setXPathMap(<span class="keyword">const</span> <a class="code" href="classXSECXPathNodeList.html">XSECXPathNodeList</a> &amp; map);
00108 
00109     <span class="comment">// Comments processing</span>
00110     <span class="keywordtype">void</span> setCommentsProcessing(<span class="keywordtype">bool</span> onoff);
00111     <span class="keywordtype">bool</span> getCommentsProcessing(<span class="keywordtype">void</span>);
00112 
00113     <span class="comment">// Exclusive processing</span>
00114     <span class="keywordtype">void</span> setExclusive(<span class="keywordtype">void</span>);
00115     <span class="keywordtype">void</span> setExclusive(<span class="keywordtype">char</span> * xmlnsList);
00116 
00117 <span class="keyword">protected</span>:
00118 
00119     <span class="comment">// Implementation of virtual function</span>
00120     <span class="keywordtype">int</span> <a class="code" href="classXSECCanon.html#b0">processNextNode</a>();
00121 
00122     <span class="comment">// Test whether a name space is in the non-exclusive list</span>
00123     <span class="keywordtype">bool</span> inNonExclNSList(<a class="code" href="classsafeBuffer.html">safeBuffer</a> &amp;ns);
00124 
00125 <span class="keyword">private</span>:
00126 
00127     <span class="keywordtype">void</span> XSECC14n20010315::init();
00128     <span class="keywordtype">bool</span> checkRenderNameSpaceNode(<a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMNode *e, 
00129                                   <a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMNode *a);
00130 
00131     <span class="comment">// For formatting the buffers</span>
00132     <a class="code" href="classXSECSafeBufferFormatter.html">XSECSafeBufferFormatter</a>     * mp_formatter;
00133     <a class="code" href="classsafeBuffer.html">safeBuffer</a>                  m_formatBuffer;
00134 
00135     <span class="comment">// For holding state whilst walking the DOM tree</span>
00136     <a class="code" href="structXSECNodeListElt.html">XSECNodeListElt</a> * mp_attributes,                <span class="comment">// Start of list</span>
00137                     * mp_currentAttribute,          <span class="comment">// Where we currently are in list</span>
00138                     * mp_firstNonNsAttribute;       <span class="comment">// First NON XMLNS element in list</span>
00139     <a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMNode * mp_attributeParent;            <span class="comment">// To return up the tree</span>
00140     <span class="keywordtype">bool</span> m_returnedFromChild;                       <span class="comment">// Did we get to this node from below?</span>
00141     <a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMNode * mp_firstElementNode;           <span class="comment">// The root element of the document</span>
00142     <span class="keywordtype">bool</span>            m_firstElementProcessed;        <span class="comment">// Has the first node been handled?</span>
00143     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   * mp_charBuffer;
00144 
00145     <span class="comment">// For XPath evaluation</span>
00146     <span class="keywordtype">bool</span>              m_XPathSelection;             <span class="comment">// Are we doing an XPath?</span>
00147     <a class="code" href="classXSECXPathNodeList.html">XSECXPathNodeList</a> m_XPathMap;                   <span class="comment">// The elements in the XPath</span>
00148 
00149     <span class="comment">// For comment processing</span>
00150     <span class="keywordtype">bool</span>            m_processComments;              <span class="comment">// Whether comments are in or out (in by default)</span>
00151 
00152     <span class="comment">// For exclusive canonicalisation</span>
00153     CharListVectorType      m_exclNSList;
00154     <span class="keywordtype">bool</span>                    m_exclusive;
00155     <span class="keywordtype">bool</span>                    m_exclusiveDefault;
00156 
00157 
00158 
00159 };
00160 
00161 
00162 <span class="preprocessor">#endif </span><span class="comment">/* XSECC14n20010315_INCLUDE */</span>
00163 
00164 
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Jul 3 17:37:28 2005 for XML-Security-C by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>