- for (final QName keyValue : predicates.keySet()) {
- final Object value = predicates.get(keyValue);
- final String type = value.getClass().getName();
- final String predicateValue = String.valueOf(value);
- textContent.append('[');
- textContent.append(prefixes.encodeQName(keyValue));
- textContent.append("='");
- textContent.append(predicateValue);
- textContent.append("@");
- textContent.append(type);
- textContent.append("']");
+ for (final QName keyValue : predicates.keySet()) {
+ final Object value = predicates.get(keyValue);
+ final String type = value.getClass().getName();
+ final String predicateValue = String.valueOf(value);
+ textContent.append('[');
+ textContent.append(prefixes.encodeQName(keyValue));
+ textContent.append("='");
+ textContent.append(predicateValue);
+ textContent.append("@");
+ textContent.append(type);
+ textContent.append("']");
+ }
+ } else if (pathArgument instanceof NodeWithValue) {
+ textContent.append("[.='");
+ textContent.append(((NodeWithValue<?>) pathArgument).getValue());
+ textContent.append("']");
+ }