Re: [basex-talk] RestXQ parameter matching

2013-02-27 Thread Marco Lettere
Hello, I'd like to add just my two cents to the discussion. We have to implement a specification called hData that stores healthcare data in document oriented way. The specs organizes the documents in a tree structure based on record/section/subsection/subsection/... where subsections can be

Re: [basex-talk] RestXQ parameter matching

2013-02-27 Thread Wendell Piez
Hi again, Yes, as I understand it Marco's request is the complementary opposite of mine, where in repository/{$path}/resource $path could match not only a path segment, but an arbitrary sequence of segments (which can be decomposed by the function when need be). Because it matches on

Re: [basex-talk] RestXQ parameter matching

2013-02-27 Thread Liam R E Quin
On Wed, 2013-02-27 at 10:58 -0500, Wendell Piez wrote: Because it matches on substrings not path segments, Apache Cocoon can do this and indeed it's very powerful. This is an area where I once tried to push for some standardization, and I still think defining a portable mechanism to map

Re: [basex-talk] RestXQ parameter matching

2013-02-27 Thread Marco Lettere
Yep, you got it exactly the right way. We are struggling to find a possible solution to that but still no way out and I think that together with yours the questions may converge into a more general restxq path flexibility issue. M. On 02/27/2013 04:58 PM, Wendell Piez wrote: Hi again, Yes,

Re: [basex-talk] RestXQ parameter matching

2013-02-27 Thread Christian Grün
Hi Marco, one way to circumvent this limitation is to specify a module with some default RESTXQ paths that only contain templates: declare function ... %restxq:path({$a}) ... { do($a) } declare function ... %restxq:path({$a}/{$b}) ... { do($a || '/' || $b) } declare function ...

[basex-talk] RestXQ parameter matching

2013-02-26 Thread Wendell Piez
Hi, I have this bit of RestXQ: declare %restxq:path(test/{$id}.html) %output:method(xhtml) %output:omit-xml-declaration(no) %output:doctype-public(-//W3C//DTD XHTML 1.0 Transitional//EN)

Re: [basex-talk] RestXQ parameter matching

2013-02-26 Thread Christian Grün
Dear Wendell, declare %restxq:path(test/{$id}.html) the RESTXQ spec. requires path segments to be either a string (such as test) or a template (such as {$id}) [1]. If you require the .html suffix, you’ll have to remove it from the assigned variable within your XQuery code: declare

Re: [basex-talk] RestXQ parameter matching

2013-02-26 Thread Wendell Piez
Christian, Ah, how ... non-obvious. Path segment. :- (Expecting more flexible string-matching behavior, a la Cocoon sitemaps, I guess I didn't even notice the language saying it wasn't.) Thanks! I guess I can live with a little working around, if it makes life easier for others. Cheers, Wendell

Re: [basex-talk] RestXQ parameter matching

2013-02-26 Thread Christian Grün
Hi Wendell, in our use case, we never work with file extensions in the URI, so we didn’t actually felt that this could be a restriction. Still, I agree that a more powerful path matcher could add flexibility. RESTXQ is still pretty young, so just wait and see how the standard evolves. Best,