Hi Francesco,

Finally, not an issue but a praise for a WADL stylesheet shipped with
Syncope. I saw a recent presentation from Colm, and I thought, wow,
would it be great if CXF WADLGenerator could optionally reference such
a stylesheet via an XML processing instruction. In fact I've even
updated the generator to do it if it is configured with a reference to
a class path resource.
We've done in CXF some work for the optional Swagger integration and
Andriy Redko even did a demo. I think one of the reasons Swagger is so
popular because people can get UI auto-generated out of it.

Would it possible to get this style-sheet shipped in a self-contained
module? CXF users who need would add it to a classpath and then
configure CXF WADLGenerator with a class path reference to it...

Nice that you like our old-fashioned-technology XSLT :-)
When I built that I've also taken a look at Swagger, liked it but had to
drop it out because of some heavy dependency (the Scala compiler).

I think WADL is very capable. I think Swagger is flying because it is
uses a JSON format (it is just more popular as opposed to more capable
than XML), has the option to add the extensions, and + UI.
WADL is more capable in describing REST services IMHO, the extensions
can be easily added, UI can be there. I'm not trying to say people have
to use WADL if they like Swagger :-), but WADL does deserve a bit more
'justice' I'd say, it was a very well designed spec from M.Hadley

If you want, and also provide some details and guidance about how to fit
into there, I can contribute the XSL to a new CXF module and we can have
also Syncope to depend on that. WDYT?

I'll try to create a CXF test with some basic copy/transform template
and then I'll share a link and we can discuss what might be done next


I prototyped some initial code where CXF WADLGenerator can be asked to either add a processing instruction to a WADL DOM response or transform it locally ([1], [2]).

So the idea is that a developer would update WADLGenerator with a template reference, and then the local or browser based transformation will happen.

A template like the one at [3] is easy enough to use as it has no extra parameters. I've checked Syncope WADL templates, they are a bit more involved with JQuery being used, etc, no wonder the result is so impressive :-)

I'm not sure if it really makes sense to try and do a browser-based transformation with Syncope templates, the local one might do.

I'd like to experiment with the index.xsl first. It depends on JQuery libraries being available at the web server. I think it is reasonable, just a minor query here, can JQuery optionally tried first at CDN first and if it is a local network only then do try a local web server ?

The other question is what is the relationship between index.xsl and schema.xsl. Can index.html import schema.xsl in principle ? Can using index.xsl only would turn WADL to HTML ?

I guess it makes sense to see if this model (configuring CXF WADLGenerator with a reference to Syncope index.xsl only) works - either with a local or in-browser transform.

Thanks, Sergey


[1] http://git-wip-us.apache.org/repos/asf/cxf/commit/28379a02
[2] http://git-wip-us.apache.org/repos/asf/cxf/commit/ad8e4ddf
[3] https://github.com/ipcsystems/wadl-stylesheet/blob/master/wadl.xsl

Reply via email to