|
|
2a29d10 |
--- src/main/java/freemarker/ext/jdom/NodeListModel.java.orig 2017-10-16 02:17:50.000000000 +0100
|
|
|
2a29d10 |
+++ src/main/java/freemarker/ext/jdom/NodeListModel.java 2017-12-06 18:53:07.877967201 +0000
|
|
|
2a29d10 |
@@ -661,7 +661,7 @@
|
|
|
c333a00 |
else if ("data".equals(localName))
|
|
|
c333a00 |
attr = new Attribute("data", pi.getData());
|
|
|
c333a00 |
else
|
|
|
c333a00 |
- attr = new Attribute(localName, pi.getValue(localName));
|
|
|
c333a00 |
+ attr = new Attribute(localName, pi.getPseudoAttributeValue(localName));
|
|
|
c333a00 |
} else if (node instanceof DocType) {
|
|
|
2a29d10 |
DocType doctype = (DocType) node;
|
|
|
c333a00 |
if ("publicId".equals(localName))
|
|
|
2a29d10 |
@@ -762,17 +762,17 @@
|
|
|
2a29d10 |
|
|
|
2a29d10 |
private static final Element getParent(Object node) {
|
|
|
c333a00 |
if (node instanceof Element)
|
|
|
2a29d10 |
- return((Element) node).getParent();
|
|
|
2a29d10 |
+ return((Element) node).getParentElement();
|
|
|
c333a00 |
else if (node instanceof Attribute)
|
|
|
2a29d10 |
return((Attribute) node).getParent();
|
|
|
c333a00 |
else if (node instanceof Text)
|
|
|
2a29d10 |
- return((Text) node).getParent();
|
|
|
2a29d10 |
+ return((Text) node).getParentElement();
|
|
|
c333a00 |
else if (node instanceof ProcessingInstruction)
|
|
|
2a29d10 |
- return((ProcessingInstruction) node).getParent();
|
|
|
2a29d10 |
+ return((ProcessingInstruction) node).getParentElement();
|
|
|
c333a00 |
else if (node instanceof Comment)
|
|
|
2a29d10 |
- return((Comment) node).getParent();
|
|
|
2a29d10 |
+ return((Comment) node).getParentElement();
|
|
|
c333a00 |
else if (node instanceof EntityRef)
|
|
|
2a29d10 |
- return((EntityRef) node).getParent();
|
|
|
2a29d10 |
+ return((EntityRef) node).getParentElement();
|
|
|
c333a00 |
else
|
|
|
c333a00 |
// With 2.1 semantics it makes more sense to just return a null and let the core
|
|
|
c333a00 |
// throw an InvalidReferenceException and the template writer can use ?exists etcetera. (JR)
|
|
|
2a29d10 |
@@ -794,7 +794,7 @@
|
|
|
c333a00 |
LinkedList list = new LinkedList();
|
|
|
c333a00 |
do {
|
|
|
c333a00 |
list.addFirst(parent);
|
|
|
c333a00 |
- parent = parent.getParent();
|
|
|
c333a00 |
+ parent = parent.getParentElement();
|
|
|
2a29d10 |
} while (parent != null);
|
|
|
c333a00 |
return list;
|
|
|
2a29d10 |
}
|
|
|
2a29d10 |
@@ -808,7 +808,7 @@
|
|
|
c333a00 |
list.addFirst(node);
|
|
|
c333a00 |
do {
|
|
|
c333a00 |
list.addFirst(parent);
|
|
|
c333a00 |
- parent = parent.getParent();
|
|
|
c333a00 |
+ parent = parent.getParentElement();
|
|
|
2a29d10 |
} while (parent != null);
|
|
|
c333a00 |
return list;
|
|
|
2a29d10 |
}
|
|
|
2a29d10 |
@@ -861,7 +861,7 @@
|
|
|
2a29d10 |
Element parent = ((Attribute) node).getParent();
|
|
|
c333a00 |
doc = parent == null ? null : parent.getDocument();
|
|
|
c333a00 |
} else if (node instanceof Text) {
|
|
|
2a29d10 |
- Element parent = ((Text) node).getParent();
|
|
|
2a29d10 |
+ Element parent = ((Text) node).getParentElement();
|
|
|
c333a00 |
doc = parent == null ? null : parent.getDocument();
|
|
|
c333a00 |
} else if (node instanceof Document)
|
|
|
2a29d10 |
doc = (Document) node;
|
|
|
2a29d10 |
--- src/main/java/freemarker/ext/xml/_JdomNavigator.java.orig 2012-03-01 01:56:25.000000000 +0100
|
|
|
2a29d10 |
+++ src/main/java/freemarker/ext/xml/_JdomNavigator.java 2012-05-16 13:32:06.328559677 +0200
|
|
|
2a29d10 |
@@ -122,7 +122,7 @@
|
|
|
2a29d10 |
} else if ("data".equals(localName)) {
|
|
|
c333a00 |
result.add(new Attribute("data", pi.getData()));
|
|
|
2a29d10 |
} else {
|
|
|
c333a00 |
- result.add(new Attribute(localName, pi.getValue(localName)));
|
|
|
c333a00 |
+ result.add(new Attribute(localName, pi.getPseudoAttributeValue(localName)));
|
|
|
c333a00 |
}
|
|
|
c333a00 |
} else if (node instanceof DocType) {
|
|
|
2a29d10 |
DocType doctype = (DocType) node;
|
|
|
2a29d10 |
@@ -186,7 +186,7 @@
|
|
|
2a29d10 |
Element parent = ((Attribute) node).getParent();
|
|
|
c333a00 |
return parent == null ? null : parent.getDocument();
|
|
|
2a29d10 |
} else if (node instanceof Text) {
|
|
|
2a29d10 |
- Element parent = ((Text) node).getParent();
|
|
|
2a29d10 |
+ Element parent = ((Text) node).getParentElement();
|
|
|
c333a00 |
return parent == null ? null : parent.getDocument();
|
|
|
2a29d10 |
} else if (node instanceof Document)
|
|
|
2a29d10 |
return node;
|