cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Thornton <ar...@cantab.net>
Subject Re: XMLDBSource XPathQueries
Date Fri, 23 Apr 2004 16:16:52 GMT
Bruno Dumon wrote:
> On Fri, 2004-04-23 at 15:27, Andrew Thornton wrote:
>>Hmm. XPaths don't process documents there's an XPathProcessor for that. 
>>Similarly is it correct the XPointers process Contexts?
> 
> 
> Not sure what you mean with the word "XPaths" here. Are you referring to
> a class or to XPath expressions themselves?

I meant the Xpath expressions. Just thinking aloud. Maybe the classes 
are misnamed, they're really XPointerProcessors.

>>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?
> 
> And what alternative do you propose?
> 

I don't think that the XPointerPart.process() should stream the result. 
It should XPointerContext.setXPointerResult(NodeList) or return the 
NodeList. That way it is up to the original caller to do what it wants 
with the result, and the XPointer.process() behaves more like the 
XPathProcessor.

I think wrapping the XMLDB api stuff in an XPathProcessor and 
XPointerContext is probably the right thing to do. After all I am trying 
to leverage a Cocoon/Avalon API, I should make the XMLDB API behave in 
that world.

Thanks,
andy

-- 
andrew@caret.cam.ac.uk / art27@cantab.net
"Absinthe makes the hog Jane Fonda"

Mime
View raw message