xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] namespaces and the not() function
- From: Elliotte Rusty Harold <elharo AT ibiblio.org>
- To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] namespaces and the not() function
- Date: Fri, 4 May 2012 20:50:38 -0400
I've fixed the one you reported as a bug in my local client. I think
your workaround should also fail:
public void testNotWithNamespaceWorkaround() throws
ParsingException, IOException {
Document doc = new Builder().build(new StringReader("<root
xmlns='http://www.example.org'/>"));
XPathContext context =
XPathContext.makeNamespaceContext(doc.getRootElement());
context.addNamespace("a", doc.getRootElement().getNamespaceURI());
context.addNamespace("f", "");
Nodes query = doc.query("//*[f:not(self::a:test)]", context);
assertEquals(1, query.size());
}
I.e. "//*[f:not(self::a:test)]" is not a correct XPath 1.0 expression,
at least not when f is bound to the empty string.
Michael, what do you think?
--
Elliotte Rusty Harold
elharo AT ibiblio.org
-
[XOM-interest] How to read attribute value from Nodes class.,
Kunal Chauhan, 05/03/2012
-
Re: [XOM-interest] How to read attribute value from Nodes class.,
Elliotte Rusty Harold, 05/03/2012
-
Re: [XOM-interest] How to read attribute value from Nodes class.,
Regier Avery J, 05/03/2012
- Re: [XOM-interest] How to read attribute value from Nodes class., Michael Kay, 05/03/2012
-
Re: [XOM-interest] How to read attribute value from Nodes class.,
Elliotte Rusty Harold, 05/03/2012
-
Re: [XOM-interest] How to read attribute value from Nodes class.,
Regier Avery J, 05/03/2012
-
Re: [XOM-interest] How to read attribute value from Nodes class.,
Elliotte Rusty Harold, 05/03/2012
-
[XOM-interest] namespaces and the not() function,
Regier Avery J, 05/04/2012
- Re: [XOM-interest] namespaces and the not() function, Elliotte Rusty Harold, 05/04/2012
- Re: [XOM-interest] namespaces and the not() function, Elliotte Rusty Harold, 05/04/2012
- Re: [XOM-interest] namespaces and the not() function, Elliotte Rusty Harold, 05/04/2012
- Re: [XOM-interest] namespaces and the not() function, Elliotte Rusty Harold, 05/04/2012
- Re: [XOM-interest] namespaces and the not() function, Michael Kay, 05/05/2012
- Re: [XOM-interest] namespaces and the not() function, Dave Pawson, 05/05/2012
-
[XOM-interest] namespaces and the not() function,
Regier Avery J, 05/04/2012
-
Re: [XOM-interest] How to read attribute value from Nodes class.,
Elliotte Rusty Harold, 05/03/2012
- Re: [XOM-interest] namespaces and the not() function, Elliotte Rusty Harold, 05/05/2012
-
Re: [XOM-interest] How to read attribute value from Nodes class.,
Regier Avery J, 05/03/2012
-
Re: [XOM-interest] How to read attribute value from Nodes class.,
Regier Avery J, 05/03/2012
-
Re: [XOM-interest] How to read attribute value from Nodes class.,
Elliotte Rusty Harold, 05/03/2012
Archive powered by MHonArc 2.6.24.