]> git.saurik.com Git - wxWidgets.git/blobdiff - build/buildbot/tools/embedded.xsl
using default compiler
[wxWidgets.git] / build / buildbot / tools / embedded.xsl
index ca192823cc8d5d0d59c7cf1f9c0d6dc9ac92e6df..d1b18bc6b0e1a83dd930fa215efb83c9209d5c7a 100644 (file)
@@ -2,11 +2,11 @@
 
 <!--
     Name:       embedded.xsl
-    Purpose:    Embedded XSLT
+    Purpose:    Used by check.sh for offline checking of the configuration.
     Author:     Mike Wetherell
     RCS-ID:     $Id$
     Copyright:  (c) 2007 Mike Wetherell
-    Licence:    wxWidgets licence
+    Licence:    wxWindows licence
 -->
 
 <transform xmlns="http://www.w3.org/1999/XSL/Transform"
 <template mode="copy-xsl" match="*[//xsl:template[not(ancestor::*[name() != name(/*)])]/@name = name()]">
     <choose>
         <when test="ancestor::xsl:template[@name = name(current())]">
-            <XSL:choose>
-                <XSL:when test="name() = '{name()}'">
-                    <XSL:copy>
-                        <call-template name="copy-xsl-children"/>
-                    </XSL:copy>
-                </XSL:when>
-                <XSL:otherwise>
-                    <copy>
-                        <call-template name="copy-xsl-children"/>
-                    </copy>
-                </XSL:otherwise>
-            </XSL:choose>
+            <copy>
+                <call-template name="copy-xsl-children"/>
+            </copy>
         </when>
         <otherwise>
             <call-template name="expand">
         </if>
 
         <for-each select="@*">
-            <variable name="expr">
-                <call-template name="before">
-                    <with-param name="string" select="substring-after(., '{')"/>
-                    <with-param name="target">}</with-param>
-                </call-template>
-            </variable>
+            <variable name="len" select="string-length(.)"/>
             <choose>
-                <when test="string-length($expr) = string-length(.) - 2">
-                    <XSL:with-param name="{name()}" select="{$expr}"/>
+                <when test="substring(., 1, 1) = '{' and
+                            substring(., $len, 1) = '}'">
+                    <XSL:with-param name="{name()}"
+                                    select="{substring(., 2, $len - 2)}"/>
                 </when>
                 <otherwise>
                     <XSL:with-param name="{name()}">
-                        <call-template name="avt">
-                            <with-param name="string" select="."/>
-                        </call-template>
+                        <call-template name="avt"/>
                     </XSL:with-param>
                 </otherwise>
             </choose>
 </template>
 
 <template name="avt">
-    <param name="string"/>
+    <param name="string" select="."/>
 
     <variable name="before1" select="substring-before(concat($string, '{'), '{')"/>
     <variable name="len1" select="string-length($before1)"/>