diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-07-10 16:23:38 +0000 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2009-02-13 00:01:43 +0200 |
commit | e151c7b91d9fc55de46de1b99f9d5eed806c32d4 (patch) | |
tree | 983cdb2adb19f668c35c527a9d1cbb3c753a174b /tools | |
parent | 91e1a8270e939f4531cdcff625fb869931f1d412 (diff) |
doc-generator.xsl: abort on stray text (not in a tp:docstring, tp:copyright or whatever) - apply templates to tp:copyright in mode "text" to evade this
Diffstat (limited to 'tools')
-rw-r--r-- | tools/doc-generator.xsl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/doc-generator.xsl b/tools/doc-generator.xsl index 332482c..c9811b4 100644 --- a/tools/doc-generator.xsl +++ b/tools/doc-generator.xsl @@ -202,7 +202,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA <xsl:template match="/tp:spec/tp:copyright"> <div xmlns="http://www.w3.org/1999/xhtml"> - <xsl:apply-templates/> + <xsl:apply-templates mode="text"/> </div> </xsl:template> <xsl:template match="/tp:spec/tp:license"> @@ -1159,6 +1159,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA <xsl:apply-templates /> </xsl:template> + <xsl:template match="text()"> + <xsl:if test="normalize-space(.) != ''"> + <xsl:message terminate="yes"> + <xsl:text>Stray text: {{{</xsl:text> + <xsl:value-of select="." /> + <xsl:text>}}} </xsl:text> + </xsl:message> + </xsl:if> + </xsl:template> + <xsl:template match="*"> <xsl:message terminate="yes"> <xsl:text>Unrecognised element: {</xsl:text> |