home *** CD-ROM | disk | FTP | other *** search
/ 11 Top Anwendungen / CD_ROM_MAGAZIN.iso / MoneyMethod-Demo / Beispiel / source / XML / tune.xsl < prev   
Encoding:
Extensible Markup Language  |  2000-05-29  |  2.0 KB  |  66 lines

  1. <xsl:stylesheet
  2.   version="1.0"
  3.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4.   xmlns:xt="http://www.jclark.com/xt">
  5. <xsl:output method="html"/>
  6. <xsl:strip-space elements="*"/>
  7.  
  8. <xsl:variable name="tmp">
  9.   <xsl:value-of select="concat ($server, '+-=')"/>
  10. </xsl:variable>
  11.  
  12. <xsl:variable name="srv">
  13. <xsl:choose>
  14.     <xsl:when test="contains ($tmp, '/+-=') != true()">
  15.         <xsl:value-of select="concat ($server, '/')"/>
  16.     </xsl:when>
  17.     <xsl:otherwise>
  18.         <xsl:value-of select="$server"/>    
  19.     </xsl:otherwise>
  20. </xsl:choose>
  21. </xsl:variable>
  22.  
  23. <xsl:template name="maketune">
  24. <script>
  25.  
  26. var linescolor = "<xsl:value-of select="$mpcolor3"/>";
  27. var sendmethod = "<xsl:value-of select="$sendmethod"/>";
  28. var sendprice  = "<xsl:value-of select="$sendprice"/>";
  29. var storemail  = "<xsl:value-of select="$semail"/>";
  30. var serverloc  = "<xsl:value-of select="$server"/>";
  31. var okloc      = "<xsl:value-of select="concat ($server, '/ok.htm')"/>";
  32. </script>
  33. </xsl:template>
  34.  
  35. <xsl:template name="startshop">
  36. <script>
  37.  
  38.   <xsl:comment>
  39.       if(start("parent.shop",
  40.         <xsl:choose>
  41.             <xsl:when test="$sendmethod='1'">
  42.               "mailto:<xsl:value-of select="$semail"/>",
  43.             </xsl:when>
  44.             <xsl:when test="$sendmethod='2'">
  45.               "http://www.jourist.de/MoneyMethod/cgi-bin/send.php3",
  46.             </xsl:when>
  47.             <xsl:when test="$sendmethod='3'">        
  48.                "<xsl:value-of select="concat ($srv, 'send.php3')"/>",
  49.             </xsl:when>
  50.         </xsl:choose>
  51.           "1000",
  52.           "100",
  53.       "<xsl:value-of select="$currency"/>",
  54.       <xsl:value-of select="$rate"/>,
  55.           "-16", <xsl:if test="string-length($sendprice) = 0">
  56.                     0
  57.                  </xsl:if>
  58.           <xsl:value-of select="$sendprice"/>, "<xsl:value-of select="$mpcolor3"/>")) {
  59.             define("string","NO_ORDER","<CENTER><B>Es sind keine Produkte im Warenkorb</B></CENTER>");
  60.         }
  61. // </xsl:comment>
  62. </script>
  63. </xsl:template>
  64.  
  65. </xsl:stylesheet>
  66.