Changeset 2113

Show
Ignore:
Timestamp:
06/14/09 21:13:01 (15 months ago)
Author:
drobilla
Message:

Emit some RDFa data.

Location:
trunk/lv2specgen
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/lv2specgen/lv2specgen.py

    r2111 r2113  
    375375            term_uri = term 
    376376         
    377         doc += """<div class="specterm" id="term_%s">\n<h3>%s: <a href="%s">%s</a></h3>\n""" % (t, category, term_uri, curie) 
     377        doc += """<div class="specterm" id="term_%s" about="%s">\n<h3>%s: <a href="%s">%s</a></h3>\n""" % (t, term_uri, category, term_uri, curie) 
    378378 
    379379        label, comment = get_rdfs(m, term)     
     
    381381        doc += "<p><em>%s</em></p>" % label 
    382382        if comment!='': 
    383             doc += "<p>%s</p>" % comment 
     383                        doc += "<p property=\"rdfs:comment\">%s</p>" % comment 
    384384        terminfo = "" 
    385385        if category=='Property': 
     
    537537    for i in m.find_statements(RDF.Statement(None, doap.maintainer, None)): 
    538538        for j in m.find_statements(RDF.Statement(i.object, foaf.name, None)): 
    539             ret += '<div class="author">' + j.object.literal_value['string'] + '</div>\n' 
     539            ret += '<div class="author" property="dc:creator">' + j.object.literal_value['string'] + '</div>\n' 
    540540    return ret 
    541541 
  • trunk/lv2specgen/template.html

    r2111 r2113  
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> 
    2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:mvcb="http://webns.net/mvcb/" xml:lang="en"> 
     2<html about="@URI@" 
     3      xmlns="http://www.w3.org/1999/xhtml" 
     4      xmlns:dc="http://purl.org/dc/elements/1.1/" 
     5      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
     6      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
     7      xml:lang="en"> 
    38  <head> 
    49    <title>@NAME@</title> 
    510    <meta http-equiv="content-type" content="text/xhtml+xml; charset=utf-8" /> 
     11    <meta name="generator" content="lv2specgen" /> 
    612    <!--<link rel="stylesheet" type="text/css" href="./style.css" />--> 
    713  </head> 
     
    2632  <a href="http://lv2plug.in/ns/lv2core">LV2</a> specification.</p> 
    2733  <h2 id="status">About this Document</h2> 
    28   <p>This document was automatically generated by 
    29   <a href="http://drobilla.net/software/lv2specgen">lv2specgen</a> from the extension definition 
    30   <a href="./@FILENAME@">@FILENAME@</a>.  You may use, reproduce, redistribute, and create derivative 
    31   works of this document, but the extension URI must be changed if any changes are made that 
    32   contradict this specification, or would break an implementation conforming to this specification. 
     34  <p>This document is an <a href="http://validator.w3.org/check/referer?outline=1&amp;verbose=1" 
     35    title="Valid XHTML 1.0 Strict">XHTML+RDFa</a> 
     36  page automatically generated from <a href="./@FILENAME@">@FILENAME@</a> by 
     37  <a href="http://drobilla.net/software/lv2specgen">lv2specgen</a>. 
     38  You may use, reproduce, redistribute, and create derivative works of 
     39  this document, but the extension URI must be changed if any changes are 
     40  made that contradict this specification, or would break an implementation 
     41  conforming to this specification. 
    3342  </p> 
    3443 
     
    7685    </dd> 
    7786  </dl> 
    78  
    7987  </body> 
    8088</html>