XPath spec, 2.3:
Every axis has a principal node type. If an axis can contain elements, then the principal node type is element; otherwise, it is the type of the nodes that the axis can contain. Thus, * For the attribute axis, the principal node type is attribute. * For the namespace axis, the principal node type is namespace. * For other axes, the principal node type is element. --- So, preceding-sibling::* will select the preceding sibling of the type 'element', as I read it. Am I misinterpreting the spec? -bob On Thu, 18 Apr 2002, Mattias Reichel wrote: > Hi, > I'm using dom4j and of course also jaxen for some xml processing. Got > into trouble when trying to get a hold of a processing instruction via > an xpath expression. > > Example: > <a> > <b/> > <?toc order-by="x"?> > <c/> > </a> > > c.selectSingleNode("preceding-sibling::*[1]"); > returns b. > > Best Regards > Mattias Reichel > > > > > _______________________________________________ > Jaxen-interest mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jaxen-interest > _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest