@@ -133,12 +133,12 @@ private static int getNodePosition(final Node node) {
133
133
* @param node the node whose path values to get
134
134
* @param values the path values
135
135
*/
136
- private static void getPathValues (Node node , final List <String > values ) {
136
+ private static void getPathValues (final Node node , final List <String > values ) {
137
137
@ Nullable Node parent = node .getParentNode ();
138
138
139
139
final StringBuilder value = new StringBuilder ();
140
140
141
- if (node .getNodeType () == Type . ATTRIBUTE ) {
141
+ if (node .getNodeType () == Node . ATTRIBUTE_NODE ) {
142
142
// For an attribute node, if the node is in no namespace,
143
143
// @local, where local is the local part of the node name.
144
144
// Otherwise, @Q{uri}local, where uri is the namespace URI of
@@ -154,23 +154,23 @@ private static void getPathValues(Node node, final List<String> values) {
154
154
// attributes have an owner element - not a parent node!
155
155
parent = ((Attr ) node ).getOwnerElement ();
156
156
157
- } else if (node .getNodeType () == Type . TEXT ) {
157
+ } else if (node .getNodeType () == Node . TEXT_NODE ) {
158
158
// For a text node: text()[position] where position is an integer
159
159
// representing the position of the selected node among its text
160
160
// node siblings
161
161
final int nodePosition = getNodePosition (node );
162
162
if (nodePosition > 0 ) {
163
163
value .append (String .format ("/text()[%d]" , nodePosition ));
164
164
}
165
- } else if (node .getNodeType () == Type . COMMENT ) {
165
+ } else if (node .getNodeType () == Node . COMMENT_NODE ) {
166
166
// For a comment node: comment()[position] where position is an
167
167
// integer representing the position of the selected node among
168
168
// its comment node siblings.
169
169
final int nodePosition = getNodePosition (node );
170
170
if (nodePosition > 0 ) {
171
171
value .append (String .format ("/comment()[%d]" , nodePosition ));
172
172
}
173
- } else if (node .getNodeType () == Type . PROCESSING_INSTRUCTION ) {
173
+ } else if (node .getNodeType () == Node . PROCESSING_INSTRUCTION_NODE ) {
174
174
// For a processing-instruction node: processing-instruction(local)[position]
175
175
// where local is the name of the processing instruction node and position is
176
176
// an integer representing the position of the selected node among its
@@ -179,7 +179,7 @@ private static void getPathValues(Node node, final List<String> values) {
179
179
if (nodePosition > 0 ) {
180
180
value .append (String .format ("/processing-instruction(%s)[%d]" , node .getNodeName (), nodePosition ));
181
181
}
182
- } else if (node .getNodeType () == Type . NAMESPACE ) {
182
+ } else if (node .getNodeType () == INode . NAMESPACE_NODE ) {
183
183
// For a namespace node: If the namespace node has a name: namespace::prefix,
184
184
// where prefix is the local part of the name of the namespace node
185
185
// (which represents the namespace prefix). If the namespace node
0 commit comments