mangle-tmpl.py: keep original Long_Description; only insert an include if it's...

mangle-tmpl.py: keep original Long_Description; only insert an include if it's not already the first line in there

Original commit message from CVS:

* mangle-tmpl.py:
keep original Long_Description; only insert an include if it's
not already the first line in there
* plugins.xsl:
output more information for plugins, including an origin hyperlink
parent b2b93148
2005-08-15 Thomas Vander Stichele <thomas at apestaart dot org>
* mangle-tmpl.py:
keep original Long_Description; only insert an include if it's
not already the first line in there
* plugins.xsl:
output more information for plugins, including an origin hyperlink
2005-08-15 Thomas Vander Stichele <thomas at apestaart dot org>
* gst-xmlinspect.py:
......
......@@ -39,6 +39,12 @@ class Tmpl:
else:
self._sections[id].append(line)
def get_section(self, id):
"""
Get the content from the given section.
"""
return self._sections[id]
def set_section(self, id, content):
"""
Replace the given section id with the given content.
......@@ -88,9 +94,14 @@ def main():
feature = elements[element]
description = feature.get_description()
tmpl.set_section("Short_Description", "%s\n\n" % description)
tmpl.set_section("Long_Description",
'<include xmlns="http://www.w3.org/2003/XInclude" href="element-' +
element + '-details.xml" />\n<para>\n\n</para>\n')
# put in an include if not yet there
line = '<include xmlns="http://www.w3.org/2003/XInclude" href="' + \
'element-' + element + '-details.xml" />\n'
section = tmpl.get_section("Long_Description")
if not section[0] == line:
section.insert(0, line)
tmpl.set_section("Long_Description", section)
tmpl.write()
main()
......@@ -85,12 +85,47 @@
<xsl:element name="refsect1">
<xsl:element name="title">Plugin Information</xsl:element>
<xsl:element name="variablelist">
<xsl:element name="varlistentry">
<xsl:element name="term">filename</xsl:element>
<xsl:element name="listitem">
<xsl:element name="simpara"><xsl:value-of select="basename" /></xsl:element>
</xsl:element>
</xsl:element>
<xsl:element name="varlistentry">
<xsl:element name="term">version</xsl:element>
<xsl:element name="listitem">
<xsl:element name="simpara"><xsl:value-of select="version" /></xsl:element>
</xsl:element>
</xsl:element>
<xsl:element name="varlistentry">
<xsl:element name="term">run-time license</xsl:element>
<xsl:element name="listitem">
<xsl:element name="simpara"><xsl:value-of select="license" /></xsl:element>
</xsl:element>
</xsl:element>
<xsl:element name="varlistentry">
<xsl:element name="term">package</xsl:element>
<xsl:element name="listitem">
<xsl:element name="simpara"><xsl:value-of select="package" /></xsl:element>
</xsl:element>
</xsl:element>
<xsl:element name="varlistentry">
<xsl:element name="term">origin</xsl:element>
<xsl:element name="listitem">
<xsl:element name="simpara">
<xsl:element name="ulink">
<xsl:attribute name="url"><xsl:value-of select="origin" /></xsl:attribute>
<xsl:value-of select="origin" />
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment