alps-io / spec

ALPS Specification documents.
59 stars 13 forks source link

add TITLE element to ALPS #87

Closed mamund closed 4 years ago

mamund commented 4 years ago

follow up to #75

add TITLE element to allow naming things for humans to read (also for document generation).

<alps>
  <title>Haberdashery Profile</title>
  <descriptor id="hatSize" type="semantic">
    <title>Hat Size Property</title>
    <doc>Contains the hat's size in standardized fractions (1, 1 1/4, etc.)</doc>
   ...
  </descriptor>
</alps>

and

{
  "alps" : {
    "title" : "Haberdashery Profile",
    "descriptor" : [
      {
        "id" : "hatSize",
        "type" : "semantic",
        "title" : "Hat Size Property",
        "doc" : "Contains the hat's size in standardized fractions (1, 1 1/4, etc."
      }
    ]
  }
}

also consider making TITLE a property for XML DESCRIPTORS:

<descriptor id="hatSize" type="semantic" title="Hat Size Property" />
smizell commented 4 years ago

I personally like making it a property for XML DESCRIPTORS. This is more aesthetics than anything because a new tag could make the XML kind of ugly.

<alps version="1.0">
  <title>Contact Profile</title>
  <descriptor id="contact" type="semantic">
    <title>Contact</title>
    <descriptor id="item" type="safe">
      <title>Item</title>
      <doc>A link to an individual contact.</doc>
    </descriptor>
    <descriptor id="fullName" type="semantic">
      <title>Full Name</title>
    </descriptor>
    <descriptor id="email" type="semantic">
      <title>Email</title>
    </descriptor>
    <descriptor id="phone" type="semantic">
      <title>Phone</title>
    </descriptor>
  </descriptor>
</alps>

I like the TITLE tag directly under ALPS, though. It would end up looking something like this.

<alps version="1.0">
  <title>Contact Profile</title>
  <descriptor id="contact" type="semantic" title="Contact">
    <descriptor id="item" type="safe" title="Item">
      <doc>A link to an individual contact.</doc>
    </descriptor>
    <descriptor id="fullName" type="semantic" title="Full Name" />
    <descriptor id="email" type="semantic" title="Email" />
    <descriptor id="phone" type="semantic" title="Phone" />
  </descriptor>
</alps>
mamund commented 4 years ago

yes -- the <title> tag is well-known in HTML, too. it can easily be treated differerently than using <doc> in a special way, too.

i also prefer to not create overrides of existing elements for other uses.

mamund commented 4 years ago

added the TITLE element as a child of ALPS. this does not meet the need of single-string attributes for DESCRIPTOR, LINK, or DOC, tho. new issue?