diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-10-19 15:37:26 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-10-19 15:37:26 +0300 |
commit | 6c6e567eb34ad0f5a3bd90f6585c521543106401 (patch) | |
tree | 7f8dc62f12dd2b720ffdc738d393cd1a8f82921c /doc/checkapisym.xsl | |
parent | 7421ae696c1ef2fb48adc73ba8564ef2f276d618 (diff) | |
parent | 218d404f34d79a8837f9c0230dd9d9f1180b4068 (diff) | |
download | libxml2-pristine-tar.tar.gz |
Merge branch 'pristine-tar' of git://anonscm.debian.org/debian-xml-sgml/libxml2 into pristine-tarpristine-tar
Diffstat (limited to 'doc/checkapisym.xsl')
-rw-r--r-- | doc/checkapisym.xsl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/checkapisym.xsl b/doc/checkapisym.xsl new file mode 100644 index 0000000..8591393 --- /dev/null +++ b/doc/checkapisym.xsl @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- This stylesheet is used to check that symbols exported + from libxml2-api.xml are also present in the symbol file + symbols.xml which is used to generate libxml2.syms setting + up the allowed access point to the shared libraries --> + + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:output method="text" encoding="UTF-8"/> + + <xsl:variable name="syms" select="document('symbols.xml')"/> + + <xsl:template match="/"> + <xsl:message terminate="no"> + <xsl:text>Looking for functions in symbols.xml</xsl:text> + </xsl:message> + <xsl:apply-templates select="/api/symbols/function"/> + <xsl:message terminate="no"> + <xsl:text>Found </xsl:text> + <xsl:value-of select="count(/api/symbols/function)"/> + <xsl:text> functions</xsl:text> + </xsl:message> + <xsl:message terminate="no"> + <xsl:text>Looking for variables in symbols.xml</xsl:text> + </xsl:message> + <xsl:apply-templates select="/api/symbols/variable"/> + <xsl:message terminate="no"> + <xsl:text>Found </xsl:text> + <xsl:value-of select="count(/api/symbols/variable)"/> + <xsl:text> variables</xsl:text> + </xsl:message> + </xsl:template> + + <xsl:template match="function|variable"> + <xsl:variable name="name" select="@name"/> + <xsl:variable name="symbol" + select="$syms/symbols/release/symbol[. = $name]"/> + <xsl:if test="string($symbol) != $name"> + <xsl:message terminate="yes"> + <xsl:text>Failed to find export in symbols.xml: </xsl:text> + <xsl:value-of select="$name"/> + </xsl:message> + </xsl:if> + </xsl:template> + +</xsl:stylesheet> + |