aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-11-14 01:23:22 +0000
committerDavid Robillard <d@drobilla.net>2011-11-14 01:23:22 +0000
commitdb32487a23a07dcf62686480aa8642c4795f3787 (patch)
treebe0af6d7a0b7bc7984520551f01ebfceba7fa761
parent708a01ffb58ed30bb813fbfedca19d16d33ac887 (diff)
downloadlv2-db32487a23a07dcf62686480aa8642c4795f3787.tar.xz
Make all lv2:documentation valid XHTML Basic 1.1.
Validate lv2:documentation in lv2specgen (if lxml is available).
-rw-r--r--core.lv2/lv2.ttl18
-rw-r--r--ext/atom.lv2/atom.ttl62
-rw-r--r--ext/contexts.lv2/contexts.ttl10
-rw-r--r--ext/cv-port.lv2/cv-port.ttl20
-rw-r--r--ext/midi.lv2/midi.ttl8
-rw-r--r--ext/parameter.lv2/parameter.ttl8
-rw-r--r--ext/pui-event.lv2/pui-event.ttl4
-rw-r--r--ext/pui-gtk.lv2/pui-gtk.ttl4
-rw-r--r--ext/pui.lv2/pui.ttl6
-rw-r--r--ext/reference.lv2/reference.ttl6
-rw-r--r--ext/state.lv2/state.ttl19
-rw-r--r--ext/string-port.lv2/string-port.ttl40
-rw-r--r--ext/time.lv2/time.ttl4
-rw-r--r--ext/uri-unmap.lv2/uri-unmap.ttl10
-rw-r--r--ext/urid.lv2/urid.ttl26
-rw-r--r--extensions/ui.lv2/ui.ttl8
-rwxr-xr-xlv2specgen/lv2specgen.py33
17 files changed, 158 insertions, 128 deletions
diff --git a/core.lv2/lv2.ttl b/core.lv2/lv2.ttl
index 49a7bf2..dd570a6 100644
--- a/core.lv2/lv2.ttl
+++ b/core.lv2/lv2.ttl
@@ -35,10 +35,10 @@ An LV2 Resource (e.g. plugin, specification, or any other LV2 related thing).
lv2:Specification a rdfs:Class , owl:Class ;
rdfs:subClassOf lv2:Resource ;
lv2:documentation """
-An LV2 specification (i.e. this specification, or an LV2 extension).
+<p>An LV2 specification (i.e. this specification, or an LV2 extension).</p>
-Specification data, like plugin data, is distributed in bundles
-so hosts may discover <em>all</em> present LV2 data.
+<p>Specification data, like plugin data, is distributed in bundles
+so hosts may discover <em>all</em> present LV2 data.</p>
""" .
lv2:documentation a rdf:Property , owl:AnnotationProperty ;
@@ -48,7 +48,7 @@ lv2:documentation a rdf:Property , owl:AnnotationProperty ;
lv2:documentation """
<p>Relates a Resource to documentation markup. The value of this property
MUST be a string literal which is a valid XHTML Basic 1.1 fragment suitable
-for use as the content of a &lt;div&gt; element. This can be used by
+for use as the content of the &lt;body&gt; element. This can be used by
hosts to provide rich online documentation or by tools to generate external
documentation pages. The standard language tagging facility of RDF can be
used to provide multi-lingual documentation.</p>
@@ -174,7 +174,6 @@ otherwise precisely describe their threading rules.</p>
lv2:PluginBase a rdfs:Class , owl:Class ;
rdfs:subClassOf lv2:Resource ;
lv2:documentation """
-
<p>An abstract plugin-like resource that MAY not actually be an LV2 plugin
(e.g. may not actually have a plugin binary).</p>
@@ -409,7 +408,7 @@ resolves to a shared library object (the actual type of this library is system
specific).</p>
<p>This is a required property of a Plugin which MUST be included in the
-bundle's <tt>manifest.ttl</tt> file. The lv2:binary of an lv2:Plugin is the
+bundle's manifest.ttl file. The lv2:binary of an lv2:Plugin is the
shared object containing the <code>lv2_descriptor()</code> function which can
be used to access the descriptor for that plugin. This property may be used
similarly by extensions to relate other resources to their implementations.</p>
@@ -423,7 +422,7 @@ lv2:appliesTo a rdf:Property , owl:ObjectProperty ;
<p>Specifies that a resource is related to a plugin. This is primarily intended
for discovery purposes: bundles that describe resources that work with
particular plugins (e.g. presets or user interfaces) SHOULD use this predicate
-in <tt>manifest.ttl</tt> to relate the resource to the applicable
+in manifest.ttl to relate the resource to the applicable
plugin(s), e.g.:</p>
<pre>
&lt;thing&gt;
@@ -516,9 +515,9 @@ lv2:minimum a rdf:Property , owl:DatatypeProperty ;
rdfs:domain lv2:Port ;
rdfs:label "Minimum value" ;
lv2:documentation """
-A hint to the host for the minimum useful value that the port will use. This
+<p>A hint to the host for the minimum useful value that the port will use. This
is a <q>soft</q> limit; the plugin is required to gracefully accept all values
-in the range of a port's data type.
+in the range of a port's data type.</p>
""" .
lv2:maximum a rdf:Property , owl:DatatypeProperty ;
@@ -614,7 +613,6 @@ it impossible for hosts to use the plugin to process data <q>in-place</q>.</p>
lv2:hardRTCapable a lv2:Feature ;
rdfs:label "Hard realtime capable" ;
lv2:documentation """
-
<p>Indicates that the plugin is capable of running not only in a conventional
host but also in a <q>hard real-time</q> environment. To qualify for this the
plugin MUST satisfy all of the following:</p>
diff --git a/ext/atom.lv2/atom.ttl b/ext/atom.lv2/atom.ttl
index e49c544..f01100a 100644
--- a/ext/atom.lv2/atom.ttl
+++ b/ext/atom.lv2/atom.ttl
@@ -168,9 +168,9 @@ atom:URID
rdfs:label "Integer ID mapped from a URI" ;
atom:cType "LV2_Atom_ID" ;
lv2:documentation """
-An unsigned 32-bit integer mapped from a URI using the <a
+<p>An unsigned 32-bit integer mapped from a URI using the <a
href="http://lv2plug.in/ns/ext/uri-map">URI Map</a> extension's
-LV2_URI_Map_Feature::uri_to_id() with <code>map = NULL</code>.
+LV2_URI_Map_Feature::uri_to_id() with <code>map = NULL</code>.</p>
""" .
atom:BlankID
@@ -179,10 +179,10 @@ atom:BlankID
rdfs:label "Integer ID for a blank node" ;
atom:cType "LV2_Atom_ID" ;
lv2:documentation """
-An unsigned 32-bit integer identifier for a blank node. A BlankID is only
+<p>An unsigned 32-bit integer identifier for a blank node. A BlankID is only
meaningful within a limited scope (e.g. the Atom in which it appears), and
MUST NOT be used as a global identifier. In particular, a BlankID is NOT a
-URID, and can not be mapped to/from a URI.
+URID, and can not be mapped to/from a URI.</p>
""" .
atom:Vector
@@ -255,8 +255,8 @@ atom:Resource
rdfs:subClassOf atom:Thing ;
atom:cType "LV2_Thing" ;
lv2:documentation """
-An atom:Thing where <code>id</code> is the URI of the resource mapped to an
-atom:URID.
+<p>An atom:Thing where <code>id</code> is the URI of the resource mapped to an
+atom:URID.</p>
""" .
atom:Blank
@@ -264,10 +264,10 @@ atom:Blank
rdfs:subClassOf atom:Thing ;
atom:cType "LV2_Thing" ;
lv2:documentation """
-An atom:Thing where <code>id</code> is the blank node ID of the object, which
-is only meaningful within a certain limited scope (e.g. the container of the
-Blank) and MUST NOT be used as a global ID. In particular, <code>id</code> is
-NOT an <a href="ID">ID</a>.
+<p>An atom:Thing where <code>id</code> is the blank node ID of the object,
+which is only meaningful within a certain limited scope (e.g. the container of
+the Blank) and MUST NOT be used as a global ID. In particular, <code>id</code>
+is NOT an <a href="ID">ID</a>.</p>
""" .
atom:Message
@@ -275,12 +275,12 @@ atom:Message
rdfs:subClassOf atom:Thing ;
atom:cType "LV2_Thing" ;
lv2:documentation """
-A atom:Thing where <code>id</code> is a message type ID. Conceptually,
-a Message is identical to a Blank, but is a distinct type with a single type
-field to allow simple and fast dispatch by handling code.
+<p>A atom:Thing where <code>id</code> is a message type ID. Conceptually, a
+Message is identical to a Blank, but is a distinct type with a single type
+field to allow simple and fast dispatch by handling code.</p>
-A Message may be serialised as a Blank by adding an rdf:type property with the
-value <code>id</code> unmapped to a URI.
+<p>A Message may be serialised as a Blank by adding an rdf:type property with
+the value <code>id</code> unmapped to a URI.</p>
""" .
atom:Event
@@ -288,8 +288,8 @@ atom:Event
rdfs:label "Event" ;
atom:cType "LV2_Atom_Event" ;
lv2:documentation """
-An atom with a time stamp header prepended, typically for sample accurate
-transmission via LV2 ports. See struct LV2_Atom_Event.
+<p>An atom with a time stamp header prepended, typically for sample accurate
+transmission via LV2 ports. See struct LV2_Atom_Event.</p>
""" .
atom:Bang
@@ -336,10 +336,10 @@ atom:blobSupport
a lv2:Feature ;
rdfs:label "Blob support" ;
lv2:documentation """
-Support for dynamically allocated blobs. If a host supports this feature, it
-MUST pass a LV2_Feature with <code>URI</code>
+<p>Support for dynamically allocated blobs. If a host supports this feature,
+it MUST pass a LV2_Feature with <code>URI</code>
http://lv2plug.in/ns/ext/atom#blobSupport and <code>data</code> pointing to a
-LV2_Blob_Support.
+LV2_Blob_Support.</p>
""" .
atom:AtomPort
@@ -369,8 +369,8 @@ atom:ValuePort
rdfs:subClassOf atom:AtomPort ;
rdfs:label "Value Port" ;
lv2:documentation """
-An AtomPort that interprets its data as a persistent and time-independent
-"value".
+<p>An AtomPort that interprets its data as a persistent and time-independent
+"value".</p>
<ul>
<li>If a plugin has fixed input values for all ports, all ValuePort outputs
are also fixed regardless of the number of times the plugin is run.</li>
@@ -380,8 +380,8 @@ for all ports.</li>
<li>If a ValuePort contains a reference then the blob it refers to is
constant; plugin MUST NOT modify the blob in any way.</li>
</ul>
-Value ports can be thought of as purely functional ports: if a plugin
-callback has only value ports, then the plugin callback is a pure function.
+<p>Value ports can be thought of as purely functional ports: if a plugin
+callback has only value ports, then the plugin callback is a pure function.</p>
""" .
atom:MessagePort
@@ -414,12 +414,12 @@ atom:EventPort
rdfs:label "Event port" ;
rdfs:subClassOf lv2:Port ;
lv2:documentation """
-A port used for communicating time-stamped atoms in the audio context. Ports
-of this type are connected to an LV2_Atom_Buffer, which contains a flat
-time-stamped sequence of atom:Event.
+<p>A port used for communicating time-stamped atoms in the audio context.
+Ports of this type are connected to an LV2_Atom_Buffer, which contains a flat
+time-stamped sequence of atom:Event.</p>
-This port type is intended as a simpler and atom compatible successor to <a
-href="http://lv2plug.in/ns/ext/event#EventPort">ev:EventPort</a>.
+<p>This port type is intended as a simpler and atom compatible successor to <a
+href="http://lv2plug.in/ns/ext/event#EventPort">ev:EventPort</a>.</p>
""" .
atom:supports
@@ -428,8 +428,8 @@ atom:supports
rdfs:range atom:Atom ;
rdfs:label "supports" ;
lv2:documentation """
-Indicates that a Port supports a certain atom:Atom type. This is distinct from
+<p>Indicates that a Port supports a certain atom:Atom type. This is distinct from
the port type - e.g. the port type ValuePort can hold atoms with many different
types. This property is used to describe which Atom types a Port expects to
-receive or send.
+receive or send.</p>
""" .
diff --git a/ext/contexts.lv2/contexts.ttl b/ext/contexts.lv2/contexts.ttl
index 1290b3d..c56c649 100644
--- a/ext/contexts.lv2/contexts.ttl
+++ b/ext/contexts.lv2/contexts.ttl
@@ -96,10 +96,10 @@ ctx:audioContext a ctx:Context , lv2:Feature ;
ctx:messageContext a ctx:Context , lv2:Feature ;
lv2:documentation """
-A non-realtime context for plugin control via message passing. This context
+<p>A non-realtime context for plugin control via message passing. This context
has a run method which takes a bitset of flags for parameters specifying which
input and output ports are valid before and after the run method has executed,
-respectively (see <code>LV2_Contexts_MessageContext</code>).
+respectively (see <code>LV2_Contexts_MessageContext</code>).</p>
""" .
ctx:idleContext a ctx:Context , lv2:Feature ;
@@ -110,10 +110,10 @@ This context never has any ports.
ctx:requestRunFeature a lv2:Feature ;
lv2:documentation """
-A feature allowing the plugin to request the execution of a particular context
-at an arbitrary time. To support this feature, the host MUST pass an
+<p>A feature allowing the plugin to request the execution of a particular
+context at an arbitrary time. To support this feature, the host MUST pass an
LV2_Feature to <code>instantiate</code> with <code>data</code> pointing to a
-LV2_Contexts_Request_Run_Feature.
+LV2_Contexts_Request_Run_Feature.</p>
<p>The plugin MAY call <code>request_run</code> with the given
<code>data</code> from any non-realtime context to demand soon-as-possible execution
diff --git a/ext/cv-port.lv2/cv-port.ttl b/ext/cv-port.lv2/cv-port.ttl
index d751692..f49024b 100644
--- a/ext/cv-port.lv2/cv-port.ttl
+++ b/ext/cv-port.lv2/cv-port.ttl
@@ -32,15 +32,13 @@
rdfs:seeAlso <http://drobilla.net/drobilla.rdf>
] ;
lv2:documentation """
-
-This extension defines Control Voltage (CV) ports, which are audio-rate control
-ports like those used on classical voltage-controlled synthesizers. These
-ports serve as control ports like <a
+<p>This extension defines Control Voltage (CV) ports, which are audio-rate
+control ports like those used on classical voltage-controlled synthesizers.
+These ports serve as control ports like <a
href="http://lv2plug.in/ns/lv2core#ControlPort">lv2:ControlPort</a> but can
also be used for audio-rate modulation of control signals. This enables many
types of processing and synthesis which are not possible with a lower control
-rate.
-
+rate.</p>
""" .
cv:CVPort
@@ -49,7 +47,7 @@ cv:CVPort
rdfs:subClassOf lv2:Port ;
lv2:documentation """
-Ports of this type have identical semantics to <a
+<p>Ports of this type have identical semantics to <a
href="http://lv2plug.in/ns/lv2core#AudioPort">lv2:AudioPort</a> in terms of
buffer format and connection/input/output logistics. However, rather than the
buffer representing audio, the buffer represents audio-rate control data. A
@@ -58,12 +56,12 @@ href="http://lv2plug.in/ns/lv2core#ControlPort">lv2:ControlPort</a> typically
has to describe appropriate control values (e.g. <a
href="http://lv2plug.in/ns/lv2core#minimum">lv2:minimum</a>, <a
href="http://lv2plug.in/ns/lv2core#maximum">lv2:maximum</a>, <a
-href="http://lv2plug.in/ns/lv2core#default">lv2:default</a>)
+href="http://lv2plug.in/ns/lv2core#default">lv2:default</a>)</p>
-Hosts SHOULD take care to prevent data from a CVPort port from being used as
-audio except in cases where this is known to be safe.
+<p>Hosts SHOULD take care to prevent data from a CVPort port from being used as
+audio except in cases where this is known to be safe.</p>
-Example:
+<p>Example:</p>
<pre class="turtle-code">
&lt;http://example.org/some-plugin&gt;
lv2:port [
diff --git a/ext/midi.lv2/midi.ttl b/ext/midi.lv2/midi.ttl
index cbd80c3..bf293d1 100644
--- a/ext/midi.lv2/midi.ttl
+++ b/ext/midi.lv2/midi.ttl
@@ -43,11 +43,11 @@
foaf:mbox <mailto:lars.luthman@gmail.com>
] ;
lv2:documentation """
-This extension defines a data type for a MIDI message, midi:MidiEvent, which is
-normalized for fast and convenient processing by plugins. It is particularly
-useful as the payload of an <a
+<p>This extension defines a data type for a MIDI message, midi:MidiEvent, which
+is normalized for fast and convenient processing by plugins. It is
+particularly useful as the payload of an <a
href="http://lv2plug.in/ns/ext/atom#Atom">Atom</a> or <a
-href="http://lv2plug.in/ns/ext/event#Event">Event</a>.
+href="http://lv2plug.in/ns/ext/event#Event">Event</a>.</p>
""" .
midi:MidiEvent
diff --git a/ext/parameter.lv2/parameter.ttl b/ext/parameter.lv2/parameter.ttl
index f136ad9..191aa81 100644
--- a/ext/parameter.lv2/parameter.ttl
+++ b/ext/parameter.lv2/parameter.ttl
@@ -68,10 +68,10 @@ param:supportsType a rdf:Property ;
rdfs:range atom:AtomType ;
rdfs:label "supports type" ;
lv2:documentation """
-Indicates that a Parameter has values of a particular type. A Parameter
-may support many types. Parameter values are always LV2 Atoms as defined
-by the <a href="http://lv2plug.in/ns/ext/atom">LV2 Atom</a> Extension
-Any type of LV2 Atom may be used as a parameter value.
+<p>Indicates that a Parameter has values of a particular type. A Parameter may
+support many types. Parameter values are always LV2 Atoms as defined by the <a
+href="http://lv2plug.in/ns/ext/atom">LV2 Atom</a> Extension Any type of LV2
+Atom may be used as a parameter value.</p>
""" .
diff --git a/ext/pui-event.lv2/pui-event.ttl b/ext/pui-event.lv2/pui-event.ttl
index 031b9e5..2a4bdb3 100644
--- a/ext/pui-event.lv2/pui-event.ttl
+++ b/ext/pui-event.lv2/pui-event.ttl
@@ -49,8 +49,8 @@
foaf:mbox <mailto:mail@larsluthman.net>;
];
lv2:documentation """
-This extension defines an pui:PortProtocol for passing events (MIDI, OSC,
-etc.) between LV2 plugins and UIs.
+<p>This extension defines an pui:PortProtocol for passing events (MIDI, OSC,
+etc.) between LV2 plugins and UIs.</p>
""".
puiev:events a pui:PortProtocol;
diff --git a/ext/pui-gtk.lv2/pui-gtk.ttl b/ext/pui-gtk.lv2/pui-gtk.ttl
index 63c8417..3af016e 100644
--- a/ext/pui-gtk.lv2/pui-gtk.ttl
+++ b/ext/pui-gtk.lv2/pui-gtk.ttl
@@ -44,8 +44,8 @@
foaf:mbox <mailto:mail@larsluthman.net>;
];
lv2:documentation """
-This extension defines an UI type for the in-process UI extension that can be
-used in a Gtk+ program.
+<p>This extension defines an UI type for the in-process UI extension that can
+be used in a Gtk+ program.</p>
""".
gtkui:GtkUI a rdfs:Class;
diff --git a/ext/pui.lv2/pui.ttl b/ext/pui.lv2/pui.ttl
index 98db919..2d3a373 100644
--- a/ext/pui.lv2/pui.ttl
+++ b/ext/pui.lv2/pui.ttl
@@ -86,9 +86,9 @@ instance.</p>
code and the process that loads the shared object file containing the actual
plugin implementation do not have to be the same. There are many valid reasons
for having the plugin and the UI in different processes, or even on different
-machines. This means that you can <b>not</b> use singletons and global
-variables and expect them to refer to the same objects in the UI and the actual
-plugin. The function callback interface defined in the header pui.h is
+machines. This means that you can <strong>not</strong> use singletons and
+global variables and expect them to refer to the same objects in the UI and the
+actual plugin. The function callback interface defined in the header pui.h is
all you can expect to work.</p>
""".
diff --git a/ext/reference.lv2/reference.ttl b/ext/reference.lv2/reference.ttl
index 6d5870f..1e030ee 100644
--- a/ext/reference.lv2/reference.ttl
+++ b/ext/reference.lv2/reference.ttl
@@ -61,10 +61,10 @@ a plugin, except via functions provided by the host in LV2_Blob_Support.</p>
reference:blobSupport a lv2:Feature ;
rdfs:label "Blob support" ;
lv2:documentation """
-Support for dynamically allocated blobs. If a host supports this feature, it
-MUST pass a LV2_Feature with <code>URI</code>
+<p>Support for dynamically allocated blobs. If a host supports this feature,
+it MUST pass a LV2_Feature with <code>URI</code>
http://lv2plug.in/ns/ext/atom#blobSupport and <code>data</code> pointing to a
-LV2_Blob_Support.
+LV2_Blob_Support.</p>
""" .
reference:Blob a rdfs:Class ;
diff --git a/ext/state.lv2/state.ttl b/ext/state.lv2/state.ttl
index 9d8305e..1d85bd3 100644
--- a/ext/state.lv2/state.ttl
+++ b/ext/state.lv2/state.ttl
@@ -177,12 +177,13 @@ state:Interface
a rdfs:Class ;
rdfs:subClassOf lv2:ExtensionData ;
lv2:documentation """
-A structure (LV2_State_Interface) which contains functions to be called by the
-host to save and restore state. In order to support this extension, the plugin
-must return a valid LV2_State_Interface from LV2_Descriptor::extension_data()
-when it is called with URI "http://lv2plug.in/ns/ext/state#StateInterface".
+<p>A structure (LV2_State_Interface) which contains functions to be called by
+the host to save and restore state. In order to support this extension, the
+plugin must return a valid LV2_State_Interface from
+LV2_Descriptor::extension_data() when it is called with URI
+"http://lv2plug.in/ns/ext/state#StateInterface".</p>
-The plugin data file should describe this like so:
+<p>The plugin data file should describe this like so:</p>
<pre class="turtle-code">
@prefix state: &lt;http://lv2plug.in/ns/ext/state#&gt; .
@@ -210,11 +211,11 @@ state:instanceState
a rdf:Property ;
rdfs:range state:InstanceState ;
lv2:documentation """
-Predicate to relate a plugin instance to an InstanceState. This may be used
+<p>Predicate to relate a plugin instance to an InstanceState. This may be used
wherever the state of a particular plugin instance needs to be represented.
Note that the domain of this property is unspecified, since LV2 does not define
any RDF class for plugin instance. This predicate may be used wherever it makes
-sense to do so, e.g.:
+sense to do so, e.g.:</p>
<pre class="turtle-code">
@prefix eg: &lt;http://example.org/&gt; .
@@ -224,7 +225,7 @@ sense to do so, e.g.:
eg:favourite-number 2
] .
</pre>
-Note that this property is provided because it may be useful for hosts,
+<p>Note that this property is provided because it may be useful for hosts,
plugins, or extensions that work with instance state, but its use is not
-required to support the LV2 State extension.
+required to support the LV2 State extension.</p>
""" .
diff --git a/ext/string-port.lv2/string-port.ttl b/ext/string-port.lv2/string-port.ttl
index 35cd594..f36fa7a 100644
--- a/ext/string-port.lv2/string-port.ttl
+++ b/ext/string-port.lv2/string-port.ttl
@@ -36,28 +36,28 @@
foaf:name "Krzysztof Foltman" ;
] ;
lv2:documentation """
-Defines ports which contain string data.
+<p>Defines ports which contain string data.</p>
<h4>UI issues</h4>
-When using port_event / write_port (and possible other communication
+<p>When using port_event / write_port (and possible other communication
mechanisms), the format parameter should contain the numeric value of URI
LV2_STRING_PORT_URI (mapped with http://lv2plug.in/ns/extensions/ui specified
-as map URI).
+as map URI).</p>
-It's probably possible to use ports belonging to message context
+<p>It's probably possible to use ports belonging to message context
&lt;http://lv2plug.in/ns/ext/contexts#MessageContext&gt; for transfer. However,
-contexts mechanism does not offer any way to notify the message recipient
-about which ports have been changed. To remedy that, this extension defines
-a flag LV2_STRING_DATA_CHANGED_FLAG that carries that information inside a
-port value structure.
+contexts mechanism does not offer any way to notify the message recipient about
+which ports have been changed. To remedy that, this extension defines a flag
+LV2_STRING_DATA_CHANGED_FLAG that carries that information inside a port value
+structure.</p>
<h4>Storage</h4>
-The value of string port are assumed to be "persistent": if a host saves
-and restores a state of a plugin (e.g. control port values), the values
-of input string ports should also be assumed to belong to that state. This
-also applies to message context: if a session is being restored, the host
-MUST resend the last value that was sent to the port before session has been
-saved. In other words, string port values "stick" to message ports.
+<p>The value of string port are assumed to be "persistent": if a host saves and
+restores a state of a plugin (e.g. control port values), the values of input
+string ports should also be assumed to belong to that state. This also applies
+to message context: if a session is being restored, the host MUST resend the
+last value that was sent to the port before session has been saved. In other
+words, string port values "stick" to message ports.</p>
""" .
sp:StringTransfer a lv2:Feature ;
@@ -66,22 +66,22 @@ sp:StringTransfer a lv2:Feature ;
sp:StringPort a lv2:Port ;
rdfs:label "String port" ;
lv2:documentation """
-Indicates that the port data points to a LV2_String_Data structure
-as defined in accompanying header file.
+<p>Indicates that the port data points to a LV2_String_Data structure
+as defined in accompanying header file.</p>
<h4>Input Port Semantics</h4>
-If the port does not have a context specified (it runs in the default,
+<p>If the port does not have a context specified (it runs in the default,
realtime audio processing context), the values in the structure and the actual
string data MUST remain unchanged for the time a run() function of a plugin
is executed. However, if the port belongs to a different context, the same
data MUST remain unchanged only for the time a run() or message_process()
-function of a given context is executed.
+function of a given context is executed.</p>
<h4>Output Port Semantics</h4>
-The plugin may only change the string or length in a run() function (if
+<p>The plugin may only change the string or length in a run() function (if
the port belongs to default context) or in context-defined counterparts
(if the port belongs to another context). Because of that, using default
-context output string ports is contraindicated for longer strings.
+context output string ports is contraindicated for longer strings.</p>
""" .
sp:default a rdf:Property ;
diff --git a/ext/time.lv2/time.ttl b/ext/time.lv2/time.ttl
index 4823d07..40bfdbb 100644
--- a/ext/time.lv2/time.ttl
+++ b/ext/time.lv2/time.ttl
@@ -42,10 +42,10 @@ time:Position
a rdfs:Class ;
rdfs:label "LV2 time position" ;
lv2:documentation """
-Type for an LV2_Time_Position struct. This can be mapped to an integer and
+<p>Type for an LV2_Time_Position struct. This can be mapped to an integer and
used as the type field of an event to indicate that the event payload is an
LV2_Time_Positon struct. Plugins SHOULD indicate that a port supports time
-information using the ev:supports predicate, e.g.:
+information using the ev:supports predicate, e.g.:</p>
<pre class="turtle-code">
&lt;plugin&gt; lv2:port [
a lv2:InputPort , ev:EventPort ;
diff --git a/ext/uri-unmap.lv2/uri-unmap.ttl b/ext/uri-unmap.lv2/uri-unmap.ttl
index a55de8a..053bb37 100644
--- a/ext/uri-unmap.lv2/uri-unmap.ttl
+++ b/ext/uri-unmap.lv2/uri-unmap.ttl
@@ -38,9 +38,9 @@
rdfs:seeAlso <http://drobilla.net/drobilla.xrdf>
] ;
lv2:documentation """
-This extension is the opposite of the <a href="http://lv2plug.in/ns/ext/uri-map"
->LV2 URI Map</a> extension. It allows the host to pass an id_to_uri function
-to the plugin which can be used for unmapping an integer (previously mapped using
-the URI map extension's uri_to_id) back to a string.
-""" .
+<p>This extension is the opposite of the <a
+href="http://lv2plug.in/ns/ext/uri-map" >LV2 URI Map</a> extension. It allows
+the host to pass an id_to_uri function to the plugin which can be used for
+unmapping an integer (previously mapped using the URI map extension's
+uri_to_id) back to a string.</p>""" .
diff --git a/ext/urid.lv2/urid.ttl b/ext/urid.lv2/urid.ttl
index 6b05071..a87b368 100644
--- a/ext/urid.lv2/urid.ttl
+++ b/ext/urid.lv2/urid.ttl
@@ -35,33 +35,33 @@
foaf:homepage <http://gabe.is-a-geek.org/>
] ;
lv2:documentation """
-This extension defines a simple mechanism for plugins to map URIs to and from
-integers, usually for performance reasons (e.g. processing events typed by URIs
-in real time). Typically, plugins map URIs to integers for things they
+<p>This extension defines a simple mechanism for plugins to map URIs to and
+from integers, usually for performance reasons (e.g. processing events typed by
+URIs in real time). Typically, plugins map URIs to integers for things they
"understand" at instantiation time, and store those values for use in the audio
thread without doing any string comparison. This allows for the extensibility
-of RDF but with the performance of integers.
+of RDF but with the performance of integers.</p>
-This extension is intended as an improved and simpler replacement for the
-<a href="http://lv2plug.in/ns/ext/uri-map">uri-map</a> extension, since the
-<q>map</q> context parameter has been found problematic.
+<p>This extension is intended as an improved and simpler replacement for the <a
+href="http://lv2plug.in/ns/ext/uri-map">uri-map</a> extension, since the
+<q>map</q> context parameter has been found problematic.</p>
""" .
urid:map
a lv2:Feature ;
lv2:documentation """
-A feature which is used to map URIs to integers. To support this feature, the
-host must pass an LV2_Feature to LV2_Descriptor::instantiate() with
-<em>URI</em> <q>http://lv2plug.in/ns/ext/urid#map</q> and <em>data</em>
-pointed to an instance of LV2_URID_Map.
+<p>A feature which is used to map URIs to integers. To support this feature,
+the host must pass an LV2_Feature to LV2_Descriptor::instantiate() with
+<em>URI</em> <q>http://lv2plug.in/ns/ext/urid#map</q> and <em>data</em> pointed
+to an instance of LV2_URID_Map.</p>
""" .
urid:unmap
a lv2:Feature ;
lv2:documentation """
-A feature which is used to unmap URIs previously mapped to integers by
+<p>A feature which is used to unmap URIs previously mapped to integers by
urid:map. To support this feature, the host must pass an LV2_Feature to
LV2_Descriptor::instantiate() with <em>URI</em>
<q>http://lv2plug.in/ns/ext/urid#unmap</q> and <em>data</em> pointed to an
-instance of LV2_URID_Unmap.
+instance of LV2_URID_Unmap.</p>
""" .
diff --git a/extensions/ui.lv2/ui.ttl b/extensions/ui.lv2/ui.ttl
index 36fc9bd..2aa7864 100644
--- a/extensions/ui.lv2/ui.ttl
+++ b/extensions/ui.lv2/ui.ttl
@@ -74,10 +74,10 @@ editing the original plugin bundle.</p>
code and the process that loads the shared object file containing the actual
plugin implementation are not necessarily the same process (and not even
necessarily on the same machine). This means that plugin and UI code can
-<b>not</b> use singletons and global variables and expect them to refer to
-the same objects in the UI and the actual plugin. The function callback
-interface defined in this header is the only method of communication between
-UIs and plugin instances (extensions may define more, though this is
+<strong>not</strong> use singletons and global variables and expect them to
+refer to the same objects in the UI and the actual plugin. The function
+callback interface defined in this header is the only method of communication
+between UIs and plugin instances (extensions may define more, though this is
discouraged unless absolutely necessary since the significant benefits of
network transparency and serialisability are lost).</p>
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 428a6ef..5c62701 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -47,6 +47,12 @@ import sys
import xml.sax.saxutils
try:
+ from lxml import etree
+ have_lxml = True
+except:
+ have_lxml = False
+
+try:
import pygments
import pygments.lexers
import pygments.formatters
@@ -70,6 +76,7 @@ spec_url = None
spec_ns_str = None
spec_ns = None
spec_pre = None
+specgendir = None
ns_list = {
"http://www.w3.org/1999/02/22-rdf-syntax-ns#" : "rdf",
"http://www.w3.org/2000/01/rdf-schema#" : "rdfs",
@@ -230,6 +237,29 @@ def getComment(m, urinode, classlist):
c = findOne(m, urinode, lv2.documentation, None)
if c:
markup = getLiteralString(getObject(c))
+ if have_lxml:
+ try:
+ # Parse and validate documentation as XHTML Basic 1.1
+ doc = """<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN"
+ "DTD/xhtml-basic11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head xml:lang="en" profile="profile">
+ <title>Validation Skeleton Document</title>
+ </head>
+ <body>
+%s
+ </body>
+</html>
+""" % str(markup.decode())
+
+ oldcwd = os.getcwd()
+ os.chdir(specgendir)
+ parser = etree.XMLParser(dtd_validation=True, no_network=True)
+ root = etree.fromstring(doc, parser)
+ os.chdir(oldcwd)
+ except Exception as e:
+ print("Invalid lv2:documentation for %s\n%s" % (urinode, e))
# Syntax highlight all C code
if have_pygments:
@@ -894,6 +924,9 @@ def specgen(specloc, indir, docdir, style_uri, doc_base, doclinks, instances=Fal
global spec_ns
global spec_pre
global ns_list
+ global specgendir
+
+ specgendir = os.path.abspath(indir)
# Template
temploc = os.path.join(indir, "template.html")