On Fri, 2004-04-23 at 11:06, Andrew Thornton wrote:
> >    <xi:include 
> > href="test2.xml#xmlns(my=http://localhost/my)xpointer(/page/content/my:abc/*)"/> 
> > 
> > 
> > 
> > If you to implement a patch allowing to do:
> > 
> >    
> > xindice:///db/collection/resource#xmlns(my=http://localhost/my)xpointer(/page/content/my:abc/*)
> >  
> > 
> > 
> > Then I'd happily apply it. Under one condition: old URIs without 
> > namespaces / xpointers should still work.
> 
> OK. I'm currently trying to use the XPointerFramework that is used by 
> the XIncludeTransformer, mainly because I don't think it would be 
> correct to rewrite a parser.

the parser's quite small actually

>  However the framework is very tied to the 
> idea of processing on the cocoon side whereas I need the processing to 
> be done by the XMLDB. I'm trying to spoof the required behaviour but I'm 
> not sure I should be doing this.
> 
> What do people think? Should I fix the XPointerFramework so that the 
> XPointerParts returned by the Parser do not the processing?

Maybe you could let a factory create the PointerParts, and pass the
factory as an argument to the constructor of the parser.

Then you make your own factory which returns your own PointerPart
implementations (which wouldn't even need to implement the PointerPart
interface).

Or you could indeed move the processing out of these classes, though
that's about the only thing they do...

>  Should I 
> reimplement the framework for the XMLDBSource? Or should I carry on with 
> my spoofing attempt?
> 
> My spoofing idea was to the hack together a context, manager and 
> processor and make them interact with the database transparently to the 
> Framework. In that when the context has prefixes added it sends them to 
> the XPathQueryService of the XMLDB, and when the XPointerPart calls the 
> XPathProcessor, it actually speaks to the database returning the obvious 
> parts. (A similar idea was to get the XPathProcessor to throw an 
> exception/or just to return null, and then I could ask the processor 
> what the XPointer wanted.)
> 
> Any ideas?
> 
> Thanks,
> andy
-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]

Reply via email to