alps-io / spec

ALPS Specification documents.
59 stars 13 forks source link

Human Readable Titles #75

Closed smizell closed 3 years ago

smizell commented 8 years ago

As I'm working with ALPS, the one thing I feel that I'm missing is a way to provide a human-readable value for the document and descriptors.

I suppose this could be either an attribute on alps or descriptor or it could be its own element. The former feels simplest.

fosrias commented 8 years ago

Just use URL introspection and it will be whatever is on the end as the title/name of the profile. That is a reliable way to handle this. :stuck_out_tongue_winking_eye:

smizell commented 8 years ago

Just to add, when the href is to a descriptor within the page, you'd still need a title on the descriptor.

I can see a benefit of introspecting, as you have a single source of truth for the title. But I can think of a profile that links to several descriptors. Trade off I guess.

I'm building something that will display a profile in HTML, so you can browse it in the browser. Going to allow for following link to the page or transcluding to see how it fits inline.

filip26 commented 3 years ago

Hi @smizell , what about to display a content of 'doc' element attached to a descriptor or to a profile?

e.g.

<!-- a hypermedia control for returning contacts -->
<descriptor id="search" type="safe" rt="contact">
  <doc>
    Simple hypermedia control for getting a list of contacts
  </doc>
  <descriptor id="name" type="semantic">
    <doc>
      Input for search form
    </doc>
  </descriptor>
</descriptor>

HTML link:

<a href="...#search">Simple hypermedia control for getting a list of contacts</a>
...
<a href="...#name">Input for search form</a>
smizell commented 3 years ago

Hi @filip26 👋

The difference for me with doc is that:

  1. It might be long
  2. It might be a different type than plain text

I see Mike has proposed with #87. I'll add a couple of comments there on his specific idea, as I think it's what I was thinking.

mamund commented 3 years ago

i want to make sure runtime parsers can determine whether the description is to be displayed at runtime (e.g. text attribute) or used within design/build-time documentation (doc element). and the title is even unique in this case. title might be displayed either at runtime and/or design/build documentation.

let's make it easy to author and interpret documents. HTML has done this very well already (using title element and text attributes).