|
|
||
Marc Hadley's BlogURI TemplatingPosted by mhadley on October 05, 2006 at 08:40 AM | Comments (2)One of the features added to WADL in the latest revision of the specification was the ability to embed parameters in resource path definitions. E.g., the following describes a set of resources identified by a parameterized URI: <resources base="http://example.com/">
<resource path="applications/widgets/{widget_id}">
...
</resource>
<resources>
The above extract describes a set of resources identified by the URIs conforming to the following template: http://example.com/applications/widgets/{widget_id}
Where Defining URIs in this way is useful in a number of scenarios and for the last few months I've been working with Joe Gregorio, Mark Nottingham, David Orchard, James Snell and DeWitt Clinton on a more general specification for parameterized URIs which we are calling URI Templates. The first draft of the specification has now been published as an Internet Draft. To provide feedback on the specification, join the W3C URI mailing list. URI Templates are deliberately simple; WADL offers a mechanism by which additional metadata can be supplied for a template variable, e.g.: <resources base="http://example.com/">
<resource path="applications/widgets/{widget_id}">
<param name="widget_id" style="plain" type="xsd:int">
<doc xml:lang="en">
<xhtml:p>Specifies the identifier of a particular widget.</xhtml:p>
</doc>
</param>
...
</resource>
<resources>
When the value of the The Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment
| ||
|
|