17939Re: [rest-discuss] Using URI templates in XHTML
- Nov 9, 2011"Philippe Mougin" wrote:
>XForms is also very useful for constructing URLs on the client.
> I'm using XHTML for the representation of some resources, in a
> Restful machine-to-machine context. In particular, I'm using it for
> representing the "entry point" of my system, from where clients can
> dynamically learn how to construct URLs to other resources and start
> navigate the resource space. To that end I've been using XHTML <a>
> and <form> elements as hypermedia controls.
>Consensus will need to be reached, eventually, but I'd suggest that URI
> I'd like to use URI template as hypermedia control in XHTML, as a
> (richer) alternative to my existing forms. What do you think is the
> best way to do so ? Specifically, how would you represent an URI
> template in XHTML (given it must be used as a hypermedia control for
> programatic clients)?
templates be integrated into (X)HTML with new attributes -- any existing
attribute which takes a URI (@href, @src etc.) may take a suffix of 't'
to indicate the presence of an expansion model which yields a URI
(@hreft, @srct etc.).
The real problem is how to indicate the allowable values for expansions,
for the purpose of generating a list of possible state transitions (just
like a form). I can imagine doing this in XForms, and having a re-
usable library. I don't know the nature of the library you mention, but
code-on-demand is just as valid for generating a list of links (even as
a GET <form>).
- << Previous post in topic Next post in topic >>