Maybe you could let a factory create the PointerParts, and pass the factory as an argument to the constructor of the parser.
Seems like that is probably the best idea.
Or you could indeed move the processing out of these classes, though that's about the only thing they do...
Hmm. XPaths don't process documents there's an XPathProcessor for that. Similarly is it correct the XPointers process Contexts?
That being said, I think the XmlnsPart.process() does do the right thing. It sets the namespaces on the Context. Maybe the XPointerPart is trying to do too much. Perhaps the XPointerPart should simply do the XPath with respect to the Context, and not stream?
Thanks,
andy -- [EMAIL PROTECTED] / [EMAIL PROTECTED] "Absinthe makes the hog Jane Fonda"