Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean html format and microformats #80

Open
marc-portier opened this issue Apr 6, 2012 · 4 comments
Open

clean html format and microformats #80

marc-portier opened this issue Apr 6, 2012 · 4 comments
Assignees

Comments

@marc-portier
Copy link
Contributor

The current table-oriented format is often sparse, confusing, less then helpful.

I suppose the goal is to find a clear and direct mapping between some data-structure in php and an html dump, dunno if such exists in the open, but I really think we can do better then the current awkward table.

I propose to:

  • nest structures like they are nested in the php object
  • map lists to ul or ol with li
  • map hash-tables to dl with dd and dt
  • map values into span or abbr/@title as suggested in microformats

Additonally I would like us to consider adding semantics through selected class files.

  • consider using microformats.org for semantic structures (if they can be recognised as such through e.g the semantifier)
  • additionally inject maybe own schema/parameter names from the resource-dfinition or structure

So when this.json returns
{
test: [1,2,3],
when: "2012-03-14T12:34:56Z",
loc: {lat: 51.26, long: 2.15}
}

I would find it logic if this.html gives something along the lines of

<dl class="this">
  <dd>test</dd>
  <dt class="test">
    <ol>
      <li><span class="value type_int">1</span></li>
      <li><span class="value type_int">2</span></li>
      <li><span class="value type_int">3</span></li>
    </ol>
  </dt>

  <dd>when</dd>
  <dt class="when"><abbr class="value type_date" title="2012-03-14T12:34:56Z">March 14 2012 at 12:34 GMT</abbr></dt>  

  <dd>loc</dd>
  <dt class="loc geo">
     <abbr class="latitude" title="51.26">N 51° 43.333</abbr> 
     <abbr class="longitude" title=" 2.15">W 2° 25</abbr>
  </dt>
</dl>
@coreation
Copy link
Member

Hm the logic to parse pieces and identify them as a time, geo and so forth are idd something that a semantifier needs to do. I think the HTML formatter should remain agnostic, and just "html-ize" the php object ? Perhaps in future versions of TDT ( there are plans for a full semantified core TDT ) these kinds of "smart" formatters could be enabled.

@marc-portier
Copy link
Contributor Author

We can't have an agnostic formatter if we want the described kind of output.

But we can have an optianal 'semantic' or 'schema' information object available for the formatter.

Even without that one being present (and the 'class; anotations added to the output) we should already consider the better HTML formatting.

@ghost ghost assigned coreation Apr 7, 2012
@mielvds
Copy link
Member

mielvds commented Apr 10, 2012

In case of a semantic HTML output, I would prefer RDFa instead of microformats. It's a w3c standard primer and is more easily integrated with current implementation. However, since The DataTank does not really supply a human readable interface (e.g., actual HTML pages with full text), I don't see the point of semantically annotating an HTML dump of raw data. I would suggest creating an HTML view on top of the RDF output instead.

@marc-portier
Copy link
Contributor Author

I love the adagium of the compulsive neurotic: When in doubth: choose both!

Now we also have a .kml AND a .map output. I see how both are useful.
Equally I would like us to be pragmatic about how useful microformats are.

Anyway, this is issue is more about my dislike for the current HTML output :)
In the end we might need to look at semantics-based templating and multiple variants for one content-type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants