summaryrefslogtreecommitdiffstats
path: root/documentation/template
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2014-10-06 12:46:00 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-10 16:44:34 +0100
commit3e991ee6851d9396e99aab37b8706426ff5185f1 (patch)
tree42bf45f38c7688a0743f5d84c7051de580527c9b /documentation/template
parent6f32f3c757209df6d5d8b1eb0dfb2e831acd948a (diff)
downloadpoky-3e991ee6851d9396e99aab37b8706426ff5185f1.tar.gz
ref-manual, template: Permalinks for QA errors and warnings
Updated the ref-qa-checks.xml chapter so that each QA warning or error message would generate a permalink that is suitable for searching from the poky codebase. To implement this, I had to embed an id marker in the <para> tag that precedes each <code></code> tag pair. The 'xxx' string of the id is the leaf portion of the permalink. This creates the following tag construct: <para id='xxx'> <code> some-warning-or-error-message </code> </para> The permalink is generated with the help of the new qa-code-permalinks.xsl file, which triggers on the <para><code></code></para> construct. This new file resides in documentation/template. Right now, this construct is unique to the ref-manual's chapter on the QA error and warnings chapter only. However, if for some reason that construct is used in any other part of the ref-manual, a generically numbered permalink would also be generated. The ref-manual-customization.xsl file was also altered to include the new documentation/template/qa-code-permalinks.xsl file. Reported-by: Paul Eggleton <paul.eggleton@linux.intel.com> (From yocto-docs rev: aec27a9f8337575d31bfe0066563da99259046e0) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/template')
-rw-r--r--documentation/template/qa-code-permalinks.xsl23
1 files changed, 23 insertions, 0 deletions
diff --git a/documentation/template/qa-code-permalinks.xsl b/documentation/template/qa-code-permalinks.xsl
new file mode 100644
index 0000000000..a309095c60
--- /dev/null
+++ b/documentation/template/qa-code-permalinks.xsl
@@ -0,0 +1,23 @@
1<!--
2This XSL sheet enables creation of permalinks for <para><code>
3constructs. Right now, this construct occurs only in the ref-manual
4book's qa issues and warnings chapter. However, if the construct
5were to appear anywhere in that ref-manual, a permalink would be
6generated. I don't foresee any <para><code> constructs being used
7in the future but if they are then a permalink with a generically
8numbered permalink would be generated.
9-->
10<xsl:stylesheet version="1.0"
11 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
12 xmlns:d="http://docbook.org/ns/docbook"
13 xmlns="http://www.w3.org/1999/xhtml">
14
15 <xsl:template match="para/code">
16 <xsl:apply-imports/>
17 <xsl:if test="$generate.permalink != 0">
18 <xsl:call-template name="permalink">
19 <xsl:with-param name="node" select=".."/>
20 </xsl:call-template>
21 </xsl:if>
22 </xsl:template>
23</xsl:stylesheet>