users@jersey.java.net

[Jersey] Re: WADL generation bug?

From: Jason Erickson <jason_at_jasonerickson.com>
Date: Sun, 06 Mar 2011 10:10:29 -0800

Mark,

I'm not as familiar with the W3C spec as you are, but it seems to me
that if you have different representations supporting different
parameters (as you almost certainly would if you had POST that accepted
either "application/x-www-form-urlencoded" or "application/json" in the
Content-Type header) that siblings wouldn't be sufficient to express that.

Anyway, I just ran across this same problem and I modified the XSL
stylesheet to handle it. It didn't even occur to me that it was a bug
in the WADL. Anyway, I've attached a patch file for the XSL if you want
to use it.


On 3/6/2011 9:15 AM, Mark Petrovic wrote:
> cannot be correctly parsed by the Nottingham WADL stylesheets. The
> Form entity parameters (accountnumber, etc.) are missing from the html
> representation the stylesheet is supposed to produce.
>
> https://github.com/mnot/wadl_stylesheets
>
> I assume the reason is that the Nottingham stylesheet conforms to this
> W3C specfication for<method> definitions
>
> http://www.w3.org/Submission/wadl/#x3-170002.8.2
>
> Specifically, in the<request> element,<param>'s are not supposed to
> be children of<representation>; they are peers of<representation>.
> Both<param> and<representation> are supposed to be children of
> <request>.
>
>