> I'd like some input on how the XPathQueryService should handle namespaces.
> A while back I posted the following set of options. I'm currently leaning
> toward #4.
I like #2. To #4: What about an array of Namespace objects (similar to
the ones in JDOM) instead of an array of Strings?
The class would look like this:
class Namespace {
public Namespace(String prefix, String uri);
public String getPrefix();
public String getURI();
}
This class can be extended/subclassed (new constructors) to parse the
different string representations such as "xmlns(x=http....)".
I'm for #5: Second arg as an array of Namespace objects.
namespaces[0] = new Namespace("x", "http://example.com/foo");
namespaces[1] = new Namespace("y", "http://example.com/y");
query("//x:bar", namespaces);
What do you think? Is this portable?
Jeremias M�rki
mailto:[EMAIL PROTECTED]
OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch
----------------------------------------------------------------------
Post a message: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Contact administrator: mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------