Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I write/format HTML with RDFa to be easily human-readable in source?
    primarykey
    data
    text
    <p>Adding RDFa is quite fun, but tends to make my source almost impossible to read, (even when the editor has decent syntax highlighting.) For instance:</p> <pre><code>&lt;div id="me" prefix="foaf: http://xmlns.com/foaf/0.1/ schema: http://schema.org/Person" typeof="foaf:Person schema:Person" resource="http://carlboettiger.info#me"&gt; &lt;p&gt; &lt;img property="foaf:depiction" src="assets/img/carlboettiger.png" alt="Photo of Carl Boettiger" style="float: right; margin: 10px 10px"/&gt; I am &lt;a property="foaf:homepage schema:url" href="http://carlboettiger.info"&gt;&lt;span property="foaf:name schema:name"&gt;&lt;span property="foaf:givenName schema:givenName"&gt;Carl&lt;/span&gt; &lt;span property="foaf:familyName schema:familyName"&gt;Boettiger&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, &lt;span property="schema:jobTitle"&gt;a graduate student&lt;/span&gt; with &lt;span property="foaf:knows"&gt;&lt;span typeof="foaf:Person"&gt;&lt;span property="foaf:name"&gt;&lt;a property="foaf:homepage" href="http://two.ucdavis.edu/%7Eme"&gt;Alan Hastings&lt;/a&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; in the &lt;a property="foaf:workplaceHomepage" href="http://www-eve.ucdavis.edu/eve/pbg/"&gt;Population Biology&lt;/a&gt; Ph.D program at&lt;span property="schema:affiliation"&gt;UC Davis&lt;/span&gt;, working on &lt;span property="foaf:interest"&gt;regime shifts&lt;/span&gt; in &lt;span property="foaf:interest"&gt;ecology&lt;/span&gt; and &lt;span property="foaf:interest"&gt;evolution&lt;/span&gt;. Such shifts mark the most dramatic events in &lt;span property="foaf:interest"&gt;complex systems&lt;/span&gt; </code></pre> <p>I mislike dense markup in general, for which reason I frequently prefer to write in markdown, but this seems impossible in the context of adding RDFa markup, such as this example. </p> <p>It seems like one might exploit whitespace to make this a bit more human readable. Are there any existing tools or conventions for this? (the example below just comes from <code>!fmt</code> wordwrapping in vim, which usually looks decent but seems at a loss in this case). </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload