[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[99eb823a] | 2 |
|
---|
| 3 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 4 | version="1.0">
|
---|
| 5 |
|
---|
| 6 | <xsl:output method="text"/>
|
---|
| 7 |
|
---|
| 8 | <xsl:template match="/">
|
---|
| 9 | <xsl:apply-templates select="//sect1[./sect2[@role='installation']]"/>
|
---|
| 10 | </xsl:template>
|
---|
| 11 |
|
---|
| 12 | <xsl:template match="sect1">
|
---|
| 13 | <xsl:variable name="config-string">
|
---|
| 14 | <xsl:apply-templates
|
---|
| 15 | select=".//screen/userinput[contains(string(),'configure') or
|
---|
| 16 | contains(string(),'autogen') or
|
---|
| 17 | contains(string(),'cmake') or
|
---|
| 18 | contains(string(),'meson') or
|
---|
| 19 | contains(string(),'b2') or
|
---|
| 20 | contains(string(),'Local/Makefile') or
|
---|
| 21 | contains(string(),'testlog') or
|
---|
| 22 | contains(string(),'make')]"/>
|
---|
| 23 | </xsl:variable>
|
---|
| 24 | <xsl:text>
|
---|
| 25 | -------------------
|
---|
| 26 | </xsl:text>
|
---|
| 27 | <xsl:value-of select="@xreflabel"/>
|
---|
| 28 | <xsl:text>
|
---|
| 29 | -------------------
|
---|
| 30 | </xsl:text>
|
---|
| 31 | <xsl:apply-templates select=".//sect2[@role='commands']//option">
|
---|
| 32 | <xsl:with-param name="config-string"
|
---|
| 33 | select="normalize-space($config-string)"/>
|
---|
| 34 | </xsl:apply-templates>
|
---|
| 35 | <xsl:apply-templates select=".//sect2[@role='commands']//parameter">
|
---|
| 36 | <xsl:with-param name="config-string"
|
---|
| 37 | select="normalize-space($config-string)"/>
|
---|
| 38 | </xsl:apply-templates>
|
---|
| 39 | </xsl:template>
|
---|
| 40 |
|
---|
| 41 | <xsl:template match="parameter">
|
---|
| 42 | <xsl:param name="config-string"/>
|
---|
| 43 | <xsl:variable name="param-string">
|
---|
| 44 | <xsl:choose>
|
---|
| 45 | <xsl:when test="contains(string(),'...')">
|
---|
| 46 | <xsl:copy-of
|
---|
| 47 | select="normalize-space(substring-before(string(),'...'))"/>
|
---|
| 48 | </xsl:when>
|
---|
| 49 | <xsl:when test="contains(string(),'*')">
|
---|
| 50 | <xsl:copy-of
|
---|
| 51 | select="normalize-space(substring-before(string(),'*'))"/>
|
---|
| 52 | </xsl:when>
|
---|
| 53 | <xsl:otherwise>
|
---|
| 54 | <xsl:copy-of select="normalize-space(string())"/>
|
---|
| 55 | </xsl:otherwise>
|
---|
| 56 | </xsl:choose>
|
---|
| 57 | </xsl:variable>
|
---|
| 58 |
|
---|
| 59 | <xsl:if test="not(contains($config-string, $param-string))">
|
---|
| 60 | <xsl:copy-of select="string()"/>
|
---|
| 61 | <xsl:text> is a parameter, but is not in config string
|
---|
| 62 | </xsl:text>
|
---|
| 63 | </xsl:if>
|
---|
| 64 | </xsl:template>
|
---|
| 65 |
|
---|
| 66 | <xsl:template match="option">
|
---|
| 67 | <xsl:param name="config-string"/>
|
---|
| 68 | <xsl:variable name="option-string">
|
---|
| 69 | <xsl:choose>
|
---|
| 70 | <xsl:when test="contains(string(),'...')">
|
---|
| 71 | <xsl:copy-of
|
---|
| 72 | select="normalize-space(substring-before(string(),'...'))"/>
|
---|
| 73 | </xsl:when>
|
---|
| 74 | <xsl:when test="contains(string(),'*')">
|
---|
| 75 | <xsl:copy-of
|
---|
| 76 | select="normalize-space(substring-before(string(),'*'))"/>
|
---|
| 77 | </xsl:when>
|
---|
| 78 | <xsl:otherwise>
|
---|
| 79 | <xsl:copy-of select="normalize-space(string())"/>
|
---|
| 80 | </xsl:otherwise>
|
---|
| 81 | </xsl:choose>
|
---|
| 82 | </xsl:variable>
|
---|
| 83 |
|
---|
| 84 | <xsl:if test="contains($config-string, $option-string)">
|
---|
| 85 | <xsl:copy-of select="string()"/>
|
---|
| 86 | <xsl:text> is an option, but is in config string
|
---|
| 87 | </xsl:text>
|
---|
| 88 | </xsl:if>
|
---|
| 89 | </xsl:template>
|
---|
| 90 |
|
---|
| 91 | </xsl:stylesheet>
|
---|