b4a5899
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
b4a5899
--- freemarker-2.3.23/source/src/main/java/freemarker/ext/jdom/NodeListModel.java	2012-03-01 01:56:25.000000000 +0100
b4a5899
+++ freemarker-2.3.23/source/src/main/java/freemarker/ext/jdom/NodeListModel.java	2012-05-16 13:29:44.097551911 +0200
c333a00
@@ -734,7 +734,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) {
c333a00
                 DocType doctype = (DocType)node;
c333a00
                 if ("publicId".equals(localName))
c333a00
@@ -844,17 +844,17 @@
c333a00
     private static final Element getParent(Object node)
c333a00
     {
c333a00
         if (node instanceof Element)
c333a00
-            return((Element)node).getParent();
c333a00
+            return((Element)node).getParentElement();
c333a00
         else if (node instanceof Attribute)
c333a00
             return((Attribute)node).getParent();
c333a00
         else if (node instanceof Text)
c333a00
-            return((Text)node).getParent();
c333a00
+            return((Text)node).getParentElement();
c333a00
         else if (node instanceof ProcessingInstruction)
c333a00
-            return((ProcessingInstruction)node).getParent();
c333a00
+            return((ProcessingInstruction)node).getParentElement();
c333a00
         else if (node instanceof Comment)
c333a00
-            return((Comment)node).getParent();
c333a00
+            return((Comment)node).getParentElement();
c333a00
         else if (node instanceof EntityRef)
c333a00
-            return((EntityRef)node).getParent();
c333a00
+            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)
c333a00
@@ -878,7 +878,7 @@
c333a00
             LinkedList list = new LinkedList();
c333a00
             do {
c333a00
                 list.addFirst(parent);
c333a00
-                parent = parent.getParent();
c333a00
+                parent = parent.getParentElement();
c333a00
             }
c333a00
             while (parent != null);
c333a00
             return list;
c333a00
@@ -894,7 +894,7 @@
c333a00
             list.addFirst(node);
c333a00
             do {
c333a00
                 list.addFirst(parent);
c333a00
-                parent = parent.getParent();
c333a00
+                parent = parent.getParentElement();
c333a00
             }
c333a00
             while (parent != null);
c333a00
             return list;
c333a00
@@ -950,10 +950,10 @@
c333a00
             if (node instanceof Element)
c333a00
                 doc = ((Element)node).getDocument();
c333a00
             else if (node instanceof Attribute) {
c333a00
-                Element parent = ((Attribute)node).getParent();
c333a00
+                Element parent = ((Text)node).getParentElement();
c333a00
                 doc = parent == null ? null : parent.getDocument();
c333a00
             } else if (node instanceof Text) {
c333a00
-                Element parent = ((Text)node).getParent();
c333a00
+                Element parent = ((Text)node).getParentElement();
c333a00
                 doc = parent == null ? null : parent.getDocument();
c333a00
             } else if (node instanceof Document)
c333a00
                 doc = (Document)node;
b4a5899
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
b4a5899
--- freemarker-2.3.23/source/src/main/java/freemarker/ext/xml/_JdomNavigator.java	2012-03-01 01:56:25.000000000 +0100
b4a5899
+++ freemarker-2.3.23/source/src/main/java/freemarker/ext/xml/_JdomNavigator.java	2012-05-16 13:32:06.328559677 +0200
c333a00
@@ -169,7 +169,7 @@
c333a00
                 result.add(new Attribute("data", pi.getData()));
c333a00
             }
c333a00
             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) {
c333a00
             DocType doctype = (DocType)node;
c333a00
@@ -206,22 +206,22 @@
c333a00
 
c333a00
     Object getParent(Object node) {
c333a00
         if (node instanceof Element) {
c333a00
-            return((Element)node).getParent();
c333a00
+            return((Element)node).getParentElement();
c333a00
         }
c333a00
         if (node instanceof Attribute) {
c333a00
             return((Attribute)node).getParent();
c333a00
         }
c333a00
         if (node instanceof Text) {
c333a00
-            return((Text)node).getParent();
c333a00
+            return((Text)node).getParentElement();
c333a00
         }
c333a00
         if (node instanceof ProcessingInstruction) {
c333a00
-            return((ProcessingInstruction)node).getParent();
c333a00
+            return((ProcessingInstruction)node).getParentElement();
c333a00
         }
c333a00
         if (node instanceof Comment) {
c333a00
-            return((Comment)node).getParent();
c333a00
+            return((Comment)node).getParentElement();
c333a00
         }
c333a00
         if (node instanceof EntityRef) {
c333a00
-            return((EntityRef)node).getParent();
c333a00
+            return((EntityRef)node).getParentElement();
c333a00
         }
c333a00
         return null;
c333a00
     }
c333a00
@@ -235,7 +235,7 @@
c333a00
             return parent == null ? null : parent.getDocument();
c333a00
         } 
c333a00
         else if (node instanceof Text) {
c333a00
-            Element parent = ((Text)node).getParent();
c333a00
+            Element parent = ((Text)node).getParentElement();
c333a00
             return parent == null ? null : parent.getDocument();
c333a00
         } 
c333a00
         else if (node instanceof Document)