Annotation of qemu/roms/openbios/config/xml/config-c.xsl, revision 1.1.1.1

1.1       root        1: <?xml version="1.0" encoding="ISO-8859-15" ?>
                      2: 
                      3: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
                      4:  
                      5:   <xsl:template match="/">
                      6:    <!-- add comment -->
                      7:    <xsl:text>/*&#10; * Automatically generated C config: don't edit&#10; */&#10;&#10;</xsl:text>
                      8: 
                      9:    <!-- scan all config options -->
                     10:    <xsl:for-each select="config/option">
                     11:     <xsl:choose>
                     12:     
                     13:      <!-- config option "boolean" -->
                     14:      <xsl:when test="@type='boolean'">
                     15:       <xsl:choose>
                     16:        <xsl:when test="@value='true'">
                     17:         <xsl:text>#define </xsl:text>
                     18:         <xsl:value-of select="@name"/>
                     19:         <xsl:text> 1</xsl:text>
                     20:        </xsl:when>
                     21:        <xsl:when test="@value='false'">
                     22:         <xsl:text>#undef  </xsl:text>
                     23:         <xsl:value-of select="@name"/>
                     24:        </xsl:when>
                     25:        <xsl:otherwise>
                     26:       <xsl:message terminate="yes">&#10;ERROR: boolean configuration option '<xsl:value-of select="@name"/>' has unsupported value '<xsl:value-of select="@type"/>' instead of [true|false].</xsl:message>
                     27:        </xsl:otherwise>
                     28:       </xsl:choose>
                     29:      </xsl:when>
                     30:      
                     31:      <!-- config option "integer" -->
                     32:      <xsl:when test="@type='integer'">
                     33:       <xsl:text>#define </xsl:text>
                     34:       <xsl:value-of select="@name"/><xsl:text> </xsl:text>
                     35:       <xsl:value-of select="@value"/>
                     36:      </xsl:when>
                     37: 
                     38:      <!-- config option "string" -->
                     39:      <xsl:when test="@type='string'">
                     40:       <xsl:text>#define </xsl:text>
                     41:       <xsl:value-of select="@name"/><xsl:text> </xsl:text> "<xsl:value-of select="@value"/>" </xsl:when>
                     42:     
                     43:      <!-- unsupported config option: bail out -->
                     44:      <xsl:otherwise>
                     45:       <xsl:message terminate="yes">&#10;ERROR: configuration option '<xsl:value-of select="@name"/> has unsupported type '<xsl:value-of select="@type"/>'.</xsl:message>
                     46:      </xsl:otherwise>
                     47:      
                     48:     </xsl:choose>
                     49:     
                     50:     <xsl:text>&#10;</xsl:text>
                     51:    </xsl:for-each>
                     52:    
                     53:   </xsl:template>
                     54:   
                     55:   <xsl:output method="text" indent="no" encoding="iso-8859-15"/>
                     56: 
                     57: </xsl:stylesheet>

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.