Xalan-C++ API Reference 1.12.0
KeyDeclaration.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(XALAN_KEYDECLARATION_HEADER_GUARD)
19#define XALAN_KEYDECLARATION_HEADER_GUARD
20
21
22
23// Base include file. Must be first.
24#include "XSLTDefinitions.hpp"
25
26
27
28namespace XALAN_CPP_NAMESPACE {
29
30
31
33
34
35
36class XPath;
37
38
39
40/**
41 * Holds the attribute declarations for the "xsl:key" element.
42 */
44{
45public:
46
47 /**
48 * Construct an object containing attributes of an "xsl:key" element
49 *
50 * @param qname name of element
51 * @param matchPattern XPath for "match" attribute
52 * @param use XPath for "use" attribute
53 */
55 const XalanQName& qname,
56 const XPath& matchPattern,
57 const XPath& use,
58 const XalanDOMString& uri,
61 m_qname(&qname),
62 m_match(&matchPattern),
63 m_use(&use),
64 m_uri(&uri),
65 m_lineNumber(lineNumber),
66 m_columnNumber(columnNumber)
67 {
68 }
69
70 explicit
72 m_qname(0),
73 m_match(0),
74 m_use(0),
75 m_uri(0),
76 m_lineNumber(0),
77 m_columnNumber(0)
78 {
79 }
80
82 m_qname(theSource.m_qname),
83 m_match(theSource.m_match),
84 m_use(theSource.m_use)
85 {
86 }
87
89 {
90 }
91
92 /**
93 * Retrieves name of element
94 *
95 * @return name string
96 */
97 const XalanQName*
98 getQName() const
99 {
100 return m_qname;
101 }
102
103 /**
104 * Retrieves "use" XPath
105 *
106 * @return XPath for "use" attribute
107 */
108 const XPath*
109 getUse() const
110 {
111 return m_use;
112 }
113
114 /**
115 * Retrieves "match" XPath
116 *
117 * @return XPath for "match" attribute
118 */
119 const XPath*
121 {
122 return m_match;
123 }
124
125 /**
126 * Retrieves the URI.
127 *
128 * @return A pointer to a URI string.
129 */
130 const XalanDOMString*
131 getURI() const
132 {
133 return m_uri;
134 }
135
136 /**
137 * Retrieves the line number where the xsl:key element occurred.
138 *
139 * @return The line number
140 */
143 {
144 return m_lineNumber;
145 }
146
147 /**
148 * Retrieves the column number where the xsl:key element occurred.
149 *
150 * @return The column number
151 */
154 {
155 return m_columnNumber;
156 }
157
158private:
159
160 const XalanQName* m_qname;
161
162 const XPath* m_match;
163
164 const XPath* m_use;
165
166 const XalanDOMString* m_uri;
167
168 XalanFileLoc m_lineNumber;
169
170 XalanFileLoc m_columnNumber;
171};
172
173
174
175}
176
177
178
179#endif // XALAN_KEYDECLARATION_HEADER_GUARD
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Holds the attribute declarations for the "xsl:key" element.
const XalanQName * getQName() const
Retrieves name of element.
XalanFileLoc getColumnNumber() const
Retrieves the column number where the xsl:key element occurred.
XalanFileLoc getLineNumber() const
Retrieves the line number where the xsl:key element occurred.
KeyDeclaration(const KeyDeclaration &theSource)
KeyDeclaration(const XalanQName &qname, const XPath &matchPattern, const XPath &use, const XalanDOMString &uri, XalanFileLoc lineNumber, XalanFileLoc columnNumber)
Construct an object containing attributes of an "xsl:key" element.
const XalanDOMString * getURI() const
Retrieves the URI.
const XPath * getUse() const
Retrieves "use" XPath.
const XPath * getMatchPattern() const
Retrieves "match" XPath.
Class to represent a qualified name.