1 The Jaxen libraries included here are based on Jaxen 1.0-FCS. Jaxen 1.0-FCS
2 was written against JDOM Beta 9, and for Jaxen to support JDOM Beta 10+, we
3 had to make the following change to org.jaxen.jdom.DocumentNavigator. The
4 jaxen-jdom.jar provided here includes this change, and it's the only
5 difference between the JARs here and the Jaxen 1.0-FCS JARs.
8 --- DocumentNavigator.java.orig Tue Aug 31 16:23:32 2004
9 +++ DocumentNavigator.java Fri Sep 03 00:08:37 2004
12 import org.jdom.Document;
13 import org.jdom.Element;
14 +import org.jdom.Parent;
15 +import org.jdom.Content;
16 import org.jdom.Comment;
18 import org.jdom.Attribute;
20 nsMap.put( ns.getPrefix(), new XPathNamespace(elem, ns) );
23 - current = current.getParent();
24 + current = current.getParentElement();
27 nsMap.put( "xml", new XPathNamespace(elem, Namespace.XML_NAMESPACE) );
32 - else if ( contextNode instanceof Element )
33 + else if ( contextNode instanceof Content )
35 - parent = ((Element)contextNode).getParent();
37 - if ( parent == null )
39 - if ( ((Element)contextNode).isRootElement() )
41 - parent = ((Element)contextNode).getDocument();
44 + parent = ((Content)contextNode).getParent();
46 else if ( contextNode instanceof Attribute )
50 parent = ((XPathNamespace)contextNode).getJDOMElement();
52 - else if ( contextNode instanceof ProcessingInstruction )
54 - parent = ((ProcessingInstruction)contextNode).getParent();
56 - else if ( contextNode instanceof Comment )
58 - parent = ((Comment)contextNode).getParent();
60 - else if ( contextNode instanceof Text )
62 - parent = ((Text)contextNode).getParent();
69 element = (Element) context;
71 - else if ( context instanceof Text )
72 + else if ( context instanceof Content )
74 - element = ((Text)context).getParent();
75 + element = ((Content)context).getParentElement();
77 else if ( context instanceof Attribute )
80 else if ( context instanceof XPathNamespace )
82 element = ((XPathNamespace)context).getJDOMElement();
84 - else if ( context instanceof Comment )
86 - element = ((Comment)context).getParent();
88 - else if ( context instanceof ProcessingInstruction )
90 - element = ((ProcessingInstruction)context).getParent();
93 if ( element != null )