-
Notifications
You must be signed in to change notification settings - Fork 3
An idea for URL Fragments #16
Comments
@sheavalentine-mdsol Makes sense till:
What would be a reason to subselect the |
I don't know that there's a /good/ reason, but it makes the interpretation of fragments generic. |
I've argued in email that if you've written your profile such that you expect to get a fragment request, you've written your profile wrong. If an attribute could reasonably be used as a profile in itself, it should be its own profile. Otherwise we risk the absurdity of having all references to the Right now you can serve HALE docs from pastebin if you want, do we really want to lose that? |
I should clarify. |
Ah, okay, cool. I'm still not sold on this being anything other than an antipattern, though: now we have clients downloading the giant But maybe it's inevitable and maybe we should have standards for it. |
Do you see this as a step toward telling clients in meta how access elements of resources, e.g. to build selectors? |
Okay, so here's the usecase: "_links" {
"docks_at" {"href": "http://farscape.services.com/leviathan/1735962#dock1
} So when a client gets my DRD resource, it can understand that the "docks_at" relationship references a specific element of the Leviathan resource. Thus the client, when semantically binding 'docks_at' can dereference the specific fragment being pointed to. |
"Do you see this as a step toward telling clients in meta how access elements of resources, e.g. to build selectors?" |
So, if a service is serving a Hale document, and a client requests a fragment, there is a sound and consistent way we could handle that (or that the client could handle it).
If an attribute matches the first part (divided by slashes) of a fragment it gets the attribute:
http://some.hale.doc/resource#attr1 returns
"foo"
http://some.hale.doc/resource#attr2 returns
You can also subselect
http://some.hale.doc/resource#attr2/sub1
"ninja"
If no attribute matches, check embedded:
http://some.hale.doc/resource#items
otherwise try and match a link
http://some.hale.doc/resource#self
and again you can subselect
http://some.hale.doc/resource#self/href
"http://some.hale.doc/resource"
(Obviously this is just some thoughts...)
The text was updated successfully, but these errors were encountered: