~ubuntu-branches/ubuntu/quantal/aqsis/quantal

« back to all changes in this revision

Viewing changes to libs/core/api/ri_validate.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2009-08-06 04:53:26 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806045326-z6xeaaao62idxcc6
Tags: 1.6.0-0ubuntu1
* New upstream release
* debian/control:
  - changed name of lib package to libaqsis1 instead of aqsis-libsc2a
  - changed name of dev package to libaqsis-dev instead of aqsis-libs-dev
  - Added aqsis-data package
  - Revised summary text according to that specified by the RISpec (Pixar)
* Moved examples installation from aqsis.install to aqsis-data.install
* debian/rules: 
  - added content to binary-indep target
* debian/rules: added explicit name of mime file to force dh_installmime
  to generate postinst and prerm scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8" ?>
 
2
 
 
3
<!DOCTYPE interface [
 
4
        <!ENTITY cr "&#xa;">
 
5
        <!ENTITY tab "&#x9;">
 
6
]>
 
7
 
 
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"/>
 
11
 
 
12
        <xsl:template match="RiAPI">
 
13
                <xsl:apply-templates select="Procedures/Procedure"/>
 
14
                <xsl:text>&cr;</xsl:text>
 
15
        </xsl:template>
 
16
 
 
17
        <!-- Many RI calls are only valid within a given scope.  This is 
 
18
        -->
 
19
        <xsl:template match="Procedure">
 
20
#define VALIDATE_<xsl:value-of select="translate(Name, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
 
21
<xsl:if test="ValidScope"> \
 
22
{ \
 
23
        if(!ValidateState(<xsl:value-of select="count(ValidScope/*)"/>, <xsl:apply-templates select="ValidScope/*"/>) ) \
 
24
        { \
 
25
                Aqsis::log() &lt;&lt; error &lt;&lt; "Invalid state for <xsl:value-of select="Name"/> [" &lt;&lt; GetStateAsString() &lt;&lt; "]" &lt;&lt; std::endl; \
 
26
                return<xsl:if test="ReturnType != 'RtVoid'">(0)</xsl:if>; \
 
27
        } \
 
28
}
 
29
</xsl:if>
 
30
        </xsl:template>
 
31
 
 
32
        <xsl:template match="ValidScope/*">
 
33
                <xsl:value-of select="name()"/>
 
34
                <xsl:if test="position() != last()">
 
35
                        <xsl:text>, </xsl:text>
 
36
                </xsl:if>
 
37
        </xsl:template>
 
38
 
 
39
</xsl:stylesheet>