Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.2.8 released

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Regier Avery J <RegierAveryJ AT JohnDeere.com>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] XOM 1.2.8 released
  • Date: Mon, 14 May 2012 12:55:18 -0500

Yet I can still do it.

public void testNotWithNamespace() throws ValidityException,
ParsingException, IOException {
Document doc = new Builder().build(new StringReader("<hi
xmlns='there://mr.space/alien'/>"));
XPathContext context =
XPathContext.makeNamespaceContext(doc.getRootElement());
context.addNamespace("a",
doc.getRootElement().getNamespaceURI());
Nodes query = doc.query("//*[not(self::a:human)]", context);
assertEquals(1, query.size());
}


I am quite happy that this now works:


Avery J. Regier
IVS Solutions Infrastructure Technical Architect
Work: 515 331-9905 / Cell: 309 781-1366
RegierAveryJ AT JohnDeere.com


-----Original Message-----
From: xom-interest-bounces AT lists.ibiblio.org
[mailto:xom-interest-bounces AT lists.ibiblio.org] On Behalf Of Elliotte Rusty
Harold
Sent: Monday, May 14, 2012 12:49 PM
To: XOM API for Processing XML with Java
Subject: Re: [XOM-interest] XOM 1.2.8 released

As Michael surmised, that's a deliberate bug fix. You should no longer
need to bind anything to the default namespace.

--
Elliotte Rusty Harold
elharo AT ibiblio.org
_______________________________________________
XOM-interest mailing list
XOM-interest AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest




Archive powered by MHonArc 2.6.24.

Top of Page