Giter Club home page Giter Club logo

wadl-stylesheet's Introduction

README.txt (07-Sep-2012)

wadl.xsl is an XSLT stylesheet for transforming WADL, a Web Application's XML-based interface specification, into human-readable HTML documentation.

It is available at https://github.com/ipcsystems/wadl-stylesheet.

-------------------------------------------------------------------------------
Usage

    You can use this with a transformation engine but most modern browsers can handle it. Simply add a processing directive to your XML
    
        <?xml version="1.0" encoding="UTF-8"?>
        <?xml-stylesheet type="text/xsl" href="wadl.xsl"?>
        <wadl:application xmlns:wadl="http://wadl.dev.java.net/2009/02"
            etc., etc.   
        </wadl:application>
        
    The stylesheet has been tested with IE 9, Firefox 12, Chrome 21 and Apache Xalan 2.7.1 on Windows 7 and Safari and Chrome 21 on iOS 5.1.1. Note that links for external XML schema types do not work in Firefox. Also, Chrome doesn't process the XSL if the wadl is opened locally through a file URL. Serve it up over HTTP(s) to Chrome.
    
    
    The stylesheet works with the current WADL W3C Submission (http://www.w3.org/Submission/wadl/) whose namespace is http://wadl.dev.java.net/2009/02. If you need it to work with the original namespace, http://research.sun.com/wadl/2006/10, simply change the stylesheet's document element's wadl namespace, as follows:
    
        <xsl:stylesheet 
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
         xmlns:wadl="http://research.sun.com/wadl/2006/10"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns="http://www.w3.org/1999/xhtml">
        ...
        </xsl:stylesheet>

      
-------------------------------------------------------------------------------
Limitations

    The stylesheet does not handle globally defined methods or representations. These must be embedded within method elements (embedded within resources/resource elements). Other limitations are noted in the file header.
    
    Browser support for XSLT and CSS varies and the rendered view will differ. For example, Firefox does not generate hyperlinks for parameter types.

-------------------------------------------------------------------------------
Examples

    The example_xml.wadl is provided to show off the capabilities of the stylesheet.


-------------------------------------------------------------------------------
License

    Copyright (c) 2012 IPC Systems, Inc.
    
    Parts of this work are adapted from Mark Notingham's wadl_documentation.xsl, at
        https://github.com/mnot/wadl_stylesheets.
    
    This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 License.
    To view a copy of this license, visit 
        http://creativecommons.org/licenses/by-sa/3.0/
    or send a letter to 
        Creative Commons
        543 Howard Street, 5th Floor
        San Francisco, California, 94105, USA


-------------------------------------------------------------------------------
Contact

    For questions, contact Mark Sawers <[email protected]>.

wadl-stylesheet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wadl-stylesheet's Issues

XSL validation error in eclipse

Hi, I'm really novice in XML/XSLT stuff and appreciate you for this nice job.
The little problem I have is my eclipse XSL validator kept complaining XPath error on following line

<xsl:variable name="ns-uri" select="./namespace::*[name()=$prefix]"/>

Do you know how to resolve this?
Thanks

Chester

Parameter and Representation Enhancements

Parameter enhancements
* Enable hyperlink to type (via namespace tag value in param or in document element)
Representation enhancements
* Enable hyperlink to element (via namespace tag value in representation or in document element)
* Swapped representation doc and [schema] element columns – now appears as media type, element reference and description (doc)
* Show multi-line examples - Formatted description in as mono-spaced (in a ‘pre’ tag) if doc contains the word ‘Example’

Expose the semantics of the whole api as a wadl file + seft descripbing docs

Wadl is fairly easy to work with and gives something a formal (and parse-able) spec for a rest api

https://en.wikipedia.org/wiki/Web_Application_Description_Language

Note there might be something more modern and better (I think the latest soap was attempting to have rest bindings as well)

Then the next step is you can apply an xslt to turn the xml definition into a working self documenting html page which includes little testing forms for each endpoint

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.