cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: XMLDBSource XPathQueries
Date Tue, 20 Apr 2004 19:37:02 GMT
Andrew Thornton wrote:

> Hi!
>    I'm currently trying to use the xmldb source. However I've spotted 
> a problem. The source doesn't currently handle xpaths with namespaces.
>
> We have a few suggestions for how to make it do this:

...

> xmldb:xindice-embed:/xmlns(x=http://apache.org/cocoon/xmldb/1.0)xmlns(ns=NAMESPACE-URI)x:collection(/db/collection/collection)x:resource(resource)xpointer(ns:xpath[predicate()])


Total Overkill, me thinks.


> (ii) Leverage the xpointer idea only for namespaces:
>
> xmldb:xindice-embed:///db/collection/collection/resource#/ns:xpath[predicate()] 
>
>
> becomes
>
> xmldb:xindice-embed:/xmlns(ns=NAMESPACE-URI)xmlns(other=OTHER)//db/collection/collection/resource#ns:xpath[predicate()]


I don't like this much also. Why don't you suggest the syntax which is 
already used for xinclude transformer? See examples:

    <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.


Vadim


Mime
View raw message