You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Gianugo Rabellino <gi...@rabellino.it> on 2001/12/22 19:44:06 UTC

XML:DB XPath URL syntax

Ciao,

first of all thanks Vadim for adding the XPathQuery capability to the 
XML:DB pseudo protocol as well as for adding the xmldb.jar: this was a 
long awaited feature, and I could never find the time to fill in the 
gap, so your help was really appreciated here :) Besides, your patches 
also pointed me out a flaw in the AbstractSAXSource implementation: I 
fixed the getLastModified() so there is no need to override it from the 
Source.

Now, regarding the XPath stuff, I see that support was added considering 
everything that comes after the "?" character in the URL as the actual 
XPath being requested. I'm afraid that this might get us some troubles 
so I'd like to have a final word about this issue. When we discussed 
about it there were basically two suggestion:

1. use an "Xpointerish" syntax, e.g. xmldb:xindice:///collection#/my/XPath

2. use an "xpath" parameter, e.g:
xmldb:xindice:///collection?xpath=/my/XPath

I like the first one best, since it's much cleaner in design: the only 
problem is that this syntax seems to suggest that an XPointer "query" is 
being done, while what takes place is "just" plain XPath. The second one 
is probably safer, but it seems to me a bit clumsy (not to mention that 
we probably should do some sort of URL encoding on it, shouldn't we?).

Any suggestion? Should we run a vote on it? I'm also wondering if it 
might be the case to ask the XML:DB community to come up with a standard 
URL syntax for this case.

Ciao,

-- 
Gianugo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: DB XPath URL syntax

Posted by Vadim Gritsenko <va...@verizon.net>.
Thanks a lot! Will use it.

Vadim

> -----Original Message-----
> From: wouter@ewsp.nl [mailto:wouter@ewsp.nl]
> Sent: Monday, December 24, 2001 11:27 AM
> To: cocoon-dev@xml.apache.org
> Subject: Re: DB XPath URL syntax
> 
> <snip />
> >
> > Another question: Is it possible to use XPath query on single
resource,
> > not collection? I did not found a way yet... (Need to go to eye
doctor
> > or API is not there? ;)
> Interface  XPathQueryService
> in org.xmldb.api.modules
> defines a queryResource (java.lang.String id, java.lang.String query)
> where id is The id of the document to run the query against.
> 
> HTH,
> wouter
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: DB XPath URL syntax

Posted by wo...@ewsp.nl.
<snip />
> 
> Another question: Is it possible to use XPath query on single resource,
> not collection? I did not found a way yet... (Need to go to eye doctor
> or API is not there? ;)
Interface  XPathQueryService
in org.xmldb.api.modules
defines a queryResource (java.lang.String id, java.lang.String query)
where id is The id of the document to run the query against.

HTH,
wouter

> 
> Vadim
> 
> > 
> > Ciao,
> > 
> > --
> > Gianugo
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: DB XPath URL syntax

Posted by Colin Britton <cb...@metatomix.com>.
> > so I'd like to have a final word about this issue. When we discussed
> > about it there were basically two suggestion:
> >
> > 1. use an "Xpointerish" syntax, e.g.
> xmldb:xindice:///collection#/my/XPath
> >
> > 2. use an "xpath" parameter, e.g:
> > xmldb:xindice:///collection?xpath=/my/XPath
> >

This is an interesting paper on the kind of issues that building URI's
brings.

http://www.w3.org/DesignIssues/Axioms.html

rgds
CB


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: DB XPath URL syntax

Posted by Vadim Gritsenko <va...@verizon.net>.
Modified XML:DB source: Now query URL have following form:
	xmldb:dbxml://host:port/db/collection/#/my/XPath
to query collections, and
	xmldb:dbxml://host:port/db/collection/resource#/my/XPath
to query resources.

Regards,
Vadim

> -----Original Message-----
> From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]
> Sent: Saturday, December 22, 2001 11:03 PM
> To: cocoon-dev@xml.apache.org
> Subject: RE: DB XPath URL syntax
> 
> > From: Gianugo Rabellino [mailto:gianugo@rabellino.it]
> >
> > Ciao,
> >
> > first of all thanks Vadim for adding the XPathQuery capability to
the
> > XML:DB pseudo protocol as well as for adding the xmldb.jar: this was
a
> > long awaited feature, and I could never find the time to fill in the
> > gap, so your help was really appreciated here :) Besides, your
patches
> 
> :)
> 
> > also pointed me out a flaw in the AbstractSAXSource implementation:
I
> > fixed the getLastModified() so there is no need to override it from
> the
> > Source.
> >
> > Now, regarding the XPath stuff, I see that support was added
> considering
> > everything that comes after the "?" character in the URL as the
actual
> > XPath being requested. I'm afraid that this might get us some
troubles
> 
> That's was first shot, to test how it works. I found urlParameters and
> "seized the moment" :)
> 
> > so I'd like to have a final word about this issue. When we discussed
> > about it there were basically two suggestion:
> >
> > 1. use an "Xpointerish" syntax, e.g.
> xmldb:xindice:///collection#/my/XPath
> >
> > 2. use an "xpath" parameter, e.g:
> > xmldb:xindice:///collection?xpath=/my/XPath
> >
> > I like the first one best, since it's much cleaner in design: the
only
> > problem is that this syntax seems to suggest that an XPointer
"query"
> is
> > being done, while what takes place is "just" plain XPath. The second
> one
> > is probably safer, but it seems to me a bit clumsy (not to mention
> that
> > we probably should do some sort of URL encoding on it, shouldn't
we?).
> 
> I guess (1) also would require URL encoding, isn't it? But I also like
> this first XPointer-like syntax better.
> 
> >
> > Any suggestion? Should we run a vote on it? I'm also wondering if it
> > might be the case to ask the XML:DB community to come up with a
> standard
> > URL syntax for this case.
> 
> If I won't hear any objections, I will change code to use "#" :)
> 
> Another question: Is it possible to use XPath query on single
resource,
> not collection? I did not found a way yet... (Need to go to eye doctor
> or API is not there? ;)
> 
> Vadim
> 
> >
> > Ciao,
> >
> > --
> > Gianugo
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: DB XPath URL syntax

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Gianugo Rabellino [mailto:gianugo@rabellino.it]
> 
> Ciao,
> 
> first of all thanks Vadim for adding the XPathQuery capability to the
> XML:DB pseudo protocol as well as for adding the xmldb.jar: this was a
> long awaited feature, and I could never find the time to fill in the
> gap, so your help was really appreciated here :) Besides, your patches

:)

> also pointed me out a flaw in the AbstractSAXSource implementation: I
> fixed the getLastModified() so there is no need to override it from
the
> Source.
> 
> Now, regarding the XPath stuff, I see that support was added
considering
> everything that comes after the "?" character in the URL as the actual
> XPath being requested. I'm afraid that this might get us some troubles

That's was first shot, to test how it works. I found urlParameters and
"seized the moment" :)

> so I'd like to have a final word about this issue. When we discussed
> about it there were basically two suggestion:
> 
> 1. use an "Xpointerish" syntax, e.g.
xmldb:xindice:///collection#/my/XPath
> 
> 2. use an "xpath" parameter, e.g:
> xmldb:xindice:///collection?xpath=/my/XPath
> 
> I like the first one best, since it's much cleaner in design: the only
> problem is that this syntax seems to suggest that an XPointer "query"
is
> being done, while what takes place is "just" plain XPath. The second
one
> is probably safer, but it seems to me a bit clumsy (not to mention
that
> we probably should do some sort of URL encoding on it, shouldn't we?).

I guess (1) also would require URL encoding, isn't it? But I also like
this first XPointer-like syntax better.

> 
> Any suggestion? Should we run a vote on it? I'm also wondering if it
> might be the case to ask the XML:DB community to come up with a
standard
> URL syntax for this case.

If I won't hear any objections, I will change code to use "#" :)

Another question: Is it possible to use XPath query on single resource,
not collection? I did not found a way yet... (Need to go to eye doctor
or API is not there? ;)

Vadim

> 
> Ciao,
> 
> --
> Gianugo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org