1
<?xml version="1.0" encoding="UTF-8" ?>
8
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
9
<xsl:output method="text"/>
10
<xsl:strip-space elements="RiAPI"/>
12
<xsl:template match="RiAPI">
13
<xsl:apply-templates select="Procedures/Procedure"/>
14
<xsl:text>&cr;</xsl:text>
17
<!-- Many RI calls are only valid within a given scope. This is
19
<xsl:template match="Procedure">
20
#define VALIDATE_<xsl:value-of select="translate(Name, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
21
<xsl:if test="ValidScope"> \
23
if(!ValidateState(<xsl:value-of select="count(ValidScope/*)"/>, <xsl:apply-templates select="ValidScope/*"/>) ) \
25
Aqsis::log() << error << "Invalid state for <xsl:value-of select="Name"/> [" << GetStateAsString() << "]" << std::endl; \
26
return<xsl:if test="ReturnType != 'RtVoid'">(0)</xsl:if>; \
32
<xsl:template match="ValidScope/*">
33
<xsl:value-of select="name()"/>
34
<xsl:if test="position() != last()">
35
<xsl:text>, </xsl:text>