diff -Nru freemarker-2.3.23/source/src/main/java/freemarker/ext/jdom/NodeListModel.java freemarker-2.3.23/source/src/main/java/freemarker/ext/jdom/NodeListModel.java --- freemarker-2.3.23/source/src/main/java/freemarker/ext/jdom/NodeListModel.java 2012-03-01 01:56:25.000000000 +0100 +++ freemarker-2.3.23/source/src/main/java/freemarker/ext/jdom/NodeListModel.java 2012-05-16 13:29:44.097551911 +0200 @@ -734,7 +734,7 @@ else if ("data".equals(localName)) attr = new Attribute("data", pi.getData()); else - attr = new Attribute(localName, pi.getValue(localName)); + attr = new Attribute(localName, pi.getPseudoAttributeValue(localName)); } else if (node instanceof DocType) { DocType doctype = (DocType)node; if ("publicId".equals(localName)) @@ -844,17 +844,17 @@ private static final Element getParent(Object node) { if (node instanceof Element) - return((Element)node).getParent(); + return((Element)node).getParentElement(); else if (node instanceof Attribute) return((Attribute)node).getParent(); else if (node instanceof Text) - return((Text)node).getParent(); + return((Text)node).getParentElement(); else if (node instanceof ProcessingInstruction) - return((ProcessingInstruction)node).getParent(); + return((ProcessingInstruction)node).getParentElement(); else if (node instanceof Comment) - return((Comment)node).getParent(); + return((Comment)node).getParentElement(); else if (node instanceof EntityRef) - return((EntityRef)node).getParent(); + return((EntityRef)node).getParentElement(); else // With 2.1 semantics it makes more sense to just return a null and let the core // throw an InvalidReferenceException and the template writer can use ?exists etcetera. (JR) @@ -878,7 +878,7 @@ LinkedList list = new LinkedList(); do { list.addFirst(parent); - parent = parent.getParent(); + parent = parent.getParentElement(); } while (parent != null); return list; @@ -894,7 +894,7 @@ list.addFirst(node); do { list.addFirst(parent); - parent = parent.getParent(); + parent = parent.getParentElement(); } while (parent != null); return list; @@ -950,10 +950,10 @@ if (node instanceof Element) doc = ((Element)node).getDocument(); else if (node instanceof Attribute) { - Element parent = ((Attribute)node).getParent(); + Element parent = ((Text)node).getParentElement(); doc = parent == null ? null : parent.getDocument(); } else if (node instanceof Text) { - Element parent = ((Text)node).getParent(); + Element parent = ((Text)node).getParentElement(); doc = parent == null ? null : parent.getDocument(); } else if (node instanceof Document) doc = (Document)node; diff -Nru freemarker-2.3.23/source/src/main/java/freemarker/ext/xml/_JdomNavigator.java freemarker-2.3.23/source/src/main/java/freemarker/ext/xml/_JdomNavigator.java --- freemarker-2.3.23/source/src/main/java/freemarker/ext/xml/_JdomNavigator.java 2012-03-01 01:56:25.000000000 +0100 +++ freemarker-2.3.23/source/src/main/java/freemarker/ext/xml/_JdomNavigator.java 2012-05-16 13:32:06.328559677 +0200 @@ -169,7 +169,7 @@ result.add(new Attribute("data", pi.getData())); } else { - result.add(new Attribute(localName, pi.getValue(localName))); + result.add(new Attribute(localName, pi.getPseudoAttributeValue(localName))); } } else if (node instanceof DocType) { DocType doctype = (DocType)node; @@ -206,22 +206,22 @@ Object getParent(Object node) { if (node instanceof Element) { - return((Element)node).getParent(); + return((Element)node).getParentElement(); } if (node instanceof Attribute) { return((Attribute)node).getParent(); } if (node instanceof Text) { - return((Text)node).getParent(); + return((Text)node).getParentElement(); } if (node instanceof ProcessingInstruction) { - return((ProcessingInstruction)node).getParent(); + return((ProcessingInstruction)node).getParentElement(); } if (node instanceof Comment) { - return((Comment)node).getParent(); + return((Comment)node).getParentElement(); } if (node instanceof EntityRef) { - return((EntityRef)node).getParent(); + return((EntityRef)node).getParentElement(); } return null; } @@ -235,7 +235,7 @@ return parent == null ? null : parent.getDocument(); } else if (node instanceof Text) { - Element parent = ((Text)node).getParent(); + Element parent = ((Text)node).getParentElement(); return parent == null ? null : parent.getDocument(); } else if (node instanceof Document)