summaryrefslogtreecommitdiff
path: root/bug/subcomponents.xsl
diff options
context:
space:
mode:
authorLoic Dachary <loic@dachary.org>2011-09-13 23:12:49 +0200
committerLoic Dachary <loic@dachary.org>2011-09-13 23:12:49 +0200
commit8f2e8e7dc5334edfea6a7d23f5b901f286fda6d4 (patch)
tree9800bf6cd95b081f977f7d5539f0f6a3de965823 /bug/subcomponents.xsl
parent905c1103d30a2b0651ab57316ebc51a51e2bb8f7 (diff)
draft implementation of http://wiki.documentfoundation.org/QA-Projects-Incubator#Bug_Submission_Assistant
Diffstat (limited to 'bug/subcomponents.xsl')
-rw-r--r--bug/subcomponents.xsl26
1 files changed, 26 insertions, 0 deletions
diff --git a/bug/subcomponents.xsl b/bug/subcomponents.xsl
new file mode 100644
index 0000000..fbb3130
--- /dev/null
+++ b/bug/subcomponents.xsl
@@ -0,0 +1,26 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output indent="yes" encoding="UTF-8"/>
+ <xsl:strip-space elements="*"/>
+
+ <xsl:template match="text()" />
+
+ <xsl:template match="div[contains(@class,'component')]">
+ <xsl:element name="div">
+ <xsl:attribute name="class"><xsl:value-of select="translate(translate(*[position()=1],' ','_'),&quot;&#10;&quot;,'_')" /></xsl:attribute>
+ <select class="subcomponent" name="short_desc">
+ <option selected='selected' value=''>(chose one)</option>
+ <xsl:apply-templates select="descendant::*[contains(@class,'search')]"/>
+ </select>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="*[contains(@class,'search')]">
+ <xsl:if test="not(contains(*,'['))">
+ <xsl:element name="option">
+ <xsl:attribute name="value"><xsl:value-of select="*"/></xsl:attribute>
+ <xsl:value-of select="*"/>
+ </xsl:element>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>