WADL - resource path attribute and "WADL to HTML documentation stylesheet".

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

WADL - resource path attribute and "WADL to HTML documentation stylesheet".

thboileau

Hello all,

I've a simple question about the "path" attribute. As written in the
specification, this attribute provides a relative URI template, wich as
far as I understand can either starts with a "/" character or not.
Having said that, I notice that the "WADL to HTML documentation
stylesheet" maintained by Mark Nottingham systematically appends a
leading "/" character to the resource path atribute. And at the same
time, it takes care of the "base" attribute of the "Resources" item in
order to remove the ending "/" character.
Do I miss something? Is it possible to update the stylesheet in order to
appends the leading "/" character of the "path" attribute only when
required?

Best regards,
Thierry Boileau


Reply | Threaded
Open this post in threaded view
|

Re: WADL - resource path attribute and "WADL to HTML documentation stylesheet".

Mark Nottingham-2

I'm happy to update it if that's the intent; frankly I haven't thought  
about WADL for a few months; Mark, what's your take?
On 04/07/2008, at 7:20 PM, Thierry Boileau wrote:

>
> Hello all,
>
> I've a simple question about the "path" attribute. As written in the  
> specification, this attribute provides a relative URI template, wich  
> as far as I understand can either starts with a "/" character or  
> not. Having said that, I notice that the "WADL to HTML documentation  
> stylesheet" maintained by Mark Nottingham systematically appends a  
> leading "/" character to the resource path atribute. And at the same  
> time, it takes care of the "base" attribute of the "Resources" item  
> in order to remove the ending "/" character.
> Do I miss something? Is it possible to update the stylesheet in  
> order to appends the leading "/" character of the "path" attribute  
> only when required?
>
> Best regards,
> Thierry Boileau
>
>


--
Mark Nottingham     http://www.mnot.net/


Reply | Threaded
Open this post in threaded view
|

Re: WADL - resource path attribute and "WADL to HTML documentation stylesheet".

Marc Hadley

The algorithm in section 2.5.1 of the spec appends a '/' character to  
the parent resource/resources URI if it doesn't end with one and then  
appends the value of the path. It doesn't cope with a path that  
contains a leading '/'. On the one hand this seems reasonable since a  
leading '/' implies an absolute path rather than a relative one but  
given the semantics of the path attribute a more accommodating  
algorithm might be in order. Is there a reason you want to put in a  
leading '/' in path values ?

Marc.

On Aug 19, 2008, at 12:14 AM, Mark Nottingham wrote:

>
> I'm happy to update it if that's the intent; frankly I haven't  
> thought about WADL for a few months; Mark, what's your take?
> On 04/07/2008, at 7:20 PM, Thierry Boileau wrote:
>
>>
>> Hello all,
>>
>> I've a simple question about the "path" attribute. As written in  
>> the specification, this attribute provides a relative URI template,  
>> wich as far as I understand can either starts with a "/" character  
>> or not. Having said that, I notice that the "WADL to HTML  
>> documentation stylesheet" maintained by Mark Nottingham  
>> systematically appends a leading "/" character to the resource path  
>> atribute. And at the same time, it takes care of the "base"  
>> attribute of the "Resources" item in order to remove the ending "/"  
>> character.
>> Do I miss something? Is it possible to update the stylesheet in  
>> order to appends the leading "/" character of the "path" attribute  
>> only when required?
>>
>> Best regards,
>> Thierry Boileau
>>
>>
>
>
> --
> Mark Nottingham     http://www.mnot.net/
>
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.