aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-26 22:19:32 +0000
committerDavid Robillard <d@drobilla.net>2012-03-26 22:19:32 +0000
commit11173eca2f57199b57bffa20630ed795631adc26 (patch)
treecf2da0df07cc02bbea8b794ea51e3081b51c6941 /lv2specgen
parentc88b0a886429738c48e2f36a94d7588c9457cccf (diff)
downloadlv2-11173eca2f57199b57bffa20630ed795631adc26.tar.xz
Sort class hierarchy index at every level.
Diffstat (limited to 'lv2specgen')
-rwxr-xr-xlv2specgen/lv2specgen.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 54eb77b..d0ed35a 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -737,10 +737,16 @@ def buildIndex(m, classlist, proplist, instalist=None):
def class_tree(c):
tree = ''
shown[c] = True
+
+ subclasses = []
for s in findStatements(m, None, rdfs.subClassOf, c):
- s_name = termName(m, getSubject(s))
+ subclasses += [getSubject(s)]
+ subclasses.sort()
+
+ for s in subclasses:
+ s_name = termName(m, s)
tree += '<li><a href="#%s">%s</a>\n' % (s_name, s_name)
- tree += class_tree(getSubject(s))
+ tree += class_tree(s)
tree += '</li>'
if tree != '':
tree = '<ul>' + tree + '</ul>'