home *** CD-ROM | disk | FTP | other *** search
/ PC & Mediji 2002 March / PCM_0203.iso / MEDIA / DEMO / M10USWEB.exe / RCDATA / CABINET / money.cab / msmoney.chm / hhonstart.xsl < prev    next >
Extensible Markup Language  |  2001-07-25  |  16KB  |  372 lines

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:mnyhelp="urn:schemas-microsoft-com:vml">
  3. <xsl:script language="JScript"><![CDATA[
  4. var m_intTrkUse = 0;
  5. var m_intGuid   = 0;
  6. function GetUniqueID()
  7. {
  8.     if(m_intTrkUse < 2)
  9.     {
  10.         ++m_intTrkUse;
  11.         return "msmnyDropDownField" + m_intGuid;
  12.     }
  13.     else
  14.     {
  15.         m_intTrkUse = 1;
  16.         ++m_intGuid;    
  17.         return "msmnyDropDownField" + m_intGuid;
  18.     }
  19. }
  20. function GetVideoName(objNode)
  21. {
  22.     var L_strRtVlu;
  23.     var L_strHref = objNode.getAttribute("href");
  24.     switch(L_strHref.substring(L_strHref.length - 2,L_strHref.length))
  25.     {
  26.         case "02" : L_strRtVlu = "Manage your taxes";                        break;
  27.         case "04" : L_strRtVlu = "Enter checks and deposits";                break;
  28.         case "09" : L_strRtVlu = "Use the Lifetime Planner";                break;
  29.         case "10" : L_strRtVlu = "Create a budget";                            break;
  30.         case "11" : L_strRtVlu = "Create an investment account";            break;
  31.         case "12" : L_strRtVlu = "Balance an account to a paper statement";    break;
  32.         case "13" : L_strRtVlu = "Enter an investment transaction";            break;
  33.         case "14" : L_strRtVlu = "Reduce your debt";                        break;
  34.         case "15" : L_strRtVlu = "Categorize transactions";                    break;
  35.         case "16" : L_strRtVlu = "Introducing Money 2002";                    break;
  36.         case "18" : L_strRtVlu = "Work with Money backup files";            break;
  37.         case "19" : L_strRtVlu = "Bank online with Money";                    break;
  38.     }    
  39.     return L_strRtVlu;
  40. }
  41. ]]>
  42. </xsl:script>
  43. <xsl:template match="/">
  44.     <xsl:element name="H3"><xsl:value-of select="*/index/title" /></xsl:element>
  45.     <xsl:element name="P"><xsl:attribute name="ID">HeaderExpandText</xsl:attribute><xsl:attribute name="STYLE">display:none</xsl:attribute>For easier reading, click <xsl:element name="IMG"><xsl:attribute name="SRC">h.resize.gif</xsl:attribute><xsl:attribute name="BORDER">0</xsl:attribute></xsl:element> above.</xsl:element>
  46.     <xsl:element name="P"><xsl:attribute name="ID">HeaderContractText</xsl:attribute><xsl:attribute name="STYLE">display:none</xsl:attribute>To narrow this window, click <xsl:element name="IMG"><xsl:attribute name="SRC">h.resize.gif</xsl:attribute><xsl:attribute name="BORDER">0</xsl:attribute></xsl:element> above.</xsl:element>
  47.     <xsl:element name="HR" />
  48.     <xsl:choose>
  49.         <xsl:when test="*/content[@preference='cdn']">
  50.             <xsl:choose>
  51.                 <xsl:when test="*/index/category[.='tax']">
  52.                     <xsl:element name="P"><xsl:element name="IMG"><xsl:attribute name="STYLE">margin-right:3px</xsl:attribute><xsl:attribute name="SRC">mapleleaf.gif</xsl:attribute></xsl:element>Because taxation in the U.S. and Canada differs significantly, Money 2002 is unable to offer tax features while in the Canadian setting.</xsl:element>
  53.                     <xsl:element name="P">You may want to consider tax-specific software to do taxes most effectively.</xsl:element>
  54.                 </xsl:when>
  55.                 <xsl:otherwise>
  56.                     <xsl:choose>
  57.                         <xsl:when test="*/content[@styleType='disabled']">
  58.                             <xsl:element name="P"><xsl:element name="IMG"><xsl:attribute name="STYLE">margin-right:3px</xsl:attribute><xsl:attribute name="SRC">mapleleaf.gif</xsl:attribute></xsl:element>The information in this Help topic applies to a feature that is not available in the Canadian version.</xsl:element>
  59.                         </xsl:when>
  60.                         <xsl:otherwise>
  61.                             <xsl:if test="*/index/category[@fLocale='cdn']">
  62.                                 <xsl:element name="P"><xsl:element name="IMG"><xsl:attribute name="STYLE">margin-right:3px</xsl:attribute><xsl:attribute name="SRC">mapleleaf.gif</xsl:attribute></xsl:element>Some information in this Help topic may not be accurate in Canada.</xsl:element>
  63.                             </xsl:if>
  64.                         </xsl:otherwise>
  65.                     </xsl:choose>
  66.                     <xsl:apply-templates select="*/content" />
  67.                     <xsl:apply-templates select="*/footer" />
  68.                 </xsl:otherwise>
  69.             </xsl:choose>
  70.         </xsl:when>
  71.         <xsl:otherwise>
  72.             <xsl:if test="*/content[@styleType='disabled']">                
  73.                 <xsl:element name="IMG">
  74.                 <xsl:attribute name="SRC">MnyDLX.gif</xsl:attribute>
  75.                 <xsl:attribute name="ALT">Microsoft Money</xsl:attribute>
  76.                 </xsl:element>
  77.                 <xsl:element name="P">
  78.                 <xsl:attribute name="STYLE">color:#000000</xsl:attribute>
  79.                     The information in this Help topic applies to a feature in Microsoft Money 2002 Deluxe.  <xsl:element name="SPAN"><xsl:attribute name="STYLE">color:blue;cursor:hand</xsl:attribute><xsl:attribute name="onmouseover">this.style.textDecoration='underline'</xsl:attribute><xsl:attribute name="onmouseout">this.style.textDecoration='none'</xsl:attribute><xsl:attribute name="onclick">location.href='mnrefSpecialtool_upgradeinfo'</xsl:attribute>Click here</xsl:element> for a special offer to upgrade.
  80.                 </xsl:element>
  81.             </xsl:if>
  82.             <xsl:apply-templates select="*/content" />
  83.             <xsl:apply-templates select="*/footer" />
  84.         </xsl:otherwise>
  85.     </xsl:choose>    
  86.     <xsl:element name="DIV"><xsl:attribute name="ID">MSMNYUPDATE</xsl:attribute><xsl:attribute name="STYLE">display:none</xsl:attribute> </xsl:element>
  87. </xsl:template>
  88.  
  89. <xsl:template match="content">
  90.     <xsl:apply-templates />
  91. </xsl:template>
  92. <xsl:template match="text()">
  93.     <xsl:value-of />
  94. </xsl:template>
  95. <xsl:template match="footer">
  96.     <xsl:element name="HR" />
  97.     <xsl:apply-templates />
  98. </xsl:template>
  99. <xsl:template match="table">
  100.     <xsl:element name="TABLE">
  101.     <xsl:attribute name="CELLPADDING">2</xsl:attribute>
  102.     <xsl:attribute name="CELLSPACING">0</xsl:attribute>
  103.     <xsl:attribute name="STYLE">
  104.     table-layout    : fixed;
  105.     border-top        : 1px solid #999999;
  106.     border-bottom    : 1px solid #999999;
  107.     border-left        : 1px solid #999999
  108.     </xsl:attribute>
  109.     <xsl:attribute name="WIDTH"><xsl:value-of select="@width" /></xsl:attribute>
  110.     <xsl:element name="THEAD">
  111.     <xsl:attribute name="STYLE">background-color:#f7f7ef</xsl:attribute>
  112.         <xsl:for-each select="thead/column">
  113.             <xsl:element name="TD">
  114.             <xsl:attribute name="STYLE">
  115.             vertical-align    : bottom;
  116.             font-weight        : bold;
  117.             border-right    : 1px solid #999999;
  118.             border-bottom    : 1px solid #999999
  119.             </xsl:attribute>
  120.                 <xsl:apply-templates />
  121.             </xsl:element>
  122.         </xsl:for-each>
  123.     </xsl:element>
  124.     <xsl:element name="TBODY">
  125.     <xsl:for-each select="tbody/item">
  126.         <xsl:element name="TR">
  127.         <xsl:if test="category">
  128.             <xsl:element name="TD">
  129.             <xsl:attribute name="STYLE">
  130.             vertical-align    : top;
  131.             border-right    : 1px solid #999999
  132.             </xsl:attribute>
  133.                 <xsl:value-of select="category" />
  134.             </xsl:element>
  135.         </xsl:if>
  136.         <xsl:if test="flag">                
  137.             <xsl:element name="TD">
  138.             <xsl:attribute name="STYLE">
  139.             vertical-align    : top;
  140.             text-align        : <xsl:choose><xsl:when test="flag[.='-']">center</xsl:when><xsl:otherwise>left</xsl:otherwise></xsl:choose>;
  141.             border-right    : 1px solid #999999;
  142.             </xsl:attribute>
  143.                 <xsl:value-of select="flag" />
  144.             </xsl:element>
  145.         </xsl:if>
  146.         <xsl:if test="formline">                
  147.             <xsl:element name="TD">
  148.             <xsl:attribute name="STYLE">
  149.             vertical-align    : top;
  150.             text-align        : <xsl:choose><xsl:when test="formline[.='-']">center</xsl:when><xsl:otherwise>left</xsl:otherwise></xsl:choose>;
  151.             border-right    : 1px solid #999999
  152.             </xsl:attribute>
  153.                 <xsl:value-of select="formline" />
  154.             </xsl:element>
  155.         </xsl:if>
  156.         </xsl:element>
  157.     </xsl:for-each>
  158.     </xsl:element>
  159.     </xsl:element>
  160. </xsl:template>
  161. <xsl:template match="p">
  162.     <xsl:element name="P">
  163.         <xsl:if test="@variant[.='note']">
  164.             <xsl:element name="SPAN">
  165.             <xsl:attribute name="STYLE">font-weight:bold;margin-right:0.4em</xsl:attribute>
  166.                 Note
  167.             </xsl:element>
  168.         </xsl:if>
  169.         <xsl:if test="@variant[.='warn']">
  170.             <xsl:element name="IMG">
  171.             <xsl:attribute name="SRC">important.gif</xsl:attribute>
  172.             <xsl:attribute name="BORDER">0</xsl:attribute>
  173.             <xsl:attribute name="STYLE">margin-right:0.3em</xsl:attribute>
  174.             </xsl:element>
  175.             <xsl:element name="SPAN">
  176.             <xsl:attribute name="STYLE">font-weight:bold;margin-right:0.4em</xsl:attribute>
  177.                 Warning
  178.             </xsl:element>
  179.         </xsl:if>
  180.         <xsl:if test="@variant[.='impt']">
  181.             <xsl:element name="IMG">
  182.             <xsl:attribute name="SRC">important.gif</xsl:attribute>
  183.             <xsl:attribute name="BORDER">0</xsl:attribute>
  184.             <xsl:attribute name="STYLE">margin-right:0.3em</xsl:attribute>
  185.             </xsl:element>
  186.             <xsl:element name="SPAN">
  187.             <xsl:attribute name="STYLE">font-weight:bold;margin-right:0.4em</xsl:attribute>
  188.                 Important
  189.             </xsl:element>
  190.         </xsl:if>
  191.         <xsl:apply-templates />
  192.     </xsl:element>
  193. </xsl:template>
  194. <xsl:template match="br">
  195.     <xsl:element name="BR" />
  196. </xsl:template>
  197. <xsl:template match="extend">
  198.     <xsl:apply-templates />
  199. </xsl:template>
  200. <xsl:template match="tease">
  201.     <xsl:element name="P">
  202.         <xsl:element name="SPAN">
  203.         <xsl:attribute name="STYLE">behavior:url('hcDropDown.htc')</xsl:attribute>
  204.         <xsl:attribute name="FieldToToggle"><xsl:eval>GetUniqueID()</xsl:eval></xsl:attribute>
  205.             <xsl:element name="IMG">
  206.             <xsl:attribute name="SRC">bluedrop.gif</xsl:attribute>
  207.             <xsl:attribute name="BORDER">0</xsl:attribute>
  208.             <xsl:attribute name="STYLE">margin-right:0.3em</xsl:attribute>
  209.             </xsl:element>
  210.             <xsl:apply-templates />
  211.         </xsl:element>
  212.     </xsl:element>
  213. </xsl:template>
  214. <xsl:template match="reveal">
  215.     <xsl:element name="DIV">
  216.     <xsl:attribute name="CLASS">HiddenTextField</xsl:attribute>
  217.     <xsl:attribute name="ID"><xsl:eval>GetUniqueID()</xsl:eval></xsl:attribute>
  218.         <xsl:apply-templates />
  219.     </xsl:element>
  220. </xsl:template>
  221. <xsl:template match="thumbnail">
  222.     <xsl:element name="DIV">
  223.     <xsl:attribute name="STYLE">behavior:url('hcThumbnail.htc');margin-top:0.3em</xsl:attribute>
  224.         <mnyhelp:vmlframe>
  225.         <xsl:attribute name="src"><xsl:value-of select="@src" /></xsl:attribute>
  226.         <xsl:attribute name="style">
  227.         position    : relative;
  228.         top            : 0;
  229.         left        : 0;
  230.         width        : <xsl:eval>Math.round(parseInt(this.getAttribute("zoomwidth")) * parseFloat(this.getAttribute("proportion")))</xsl:eval>;
  231.         height        : <xsl:eval>Math.round(parseInt(this.getAttribute("zoomheight")) * parseFloat(this.getAttribute("proportion")))</xsl:eval>;
  232.         border        : 1px solid black
  233.         </xsl:attribute>
  234.         </mnyhelp:vmlframe>
  235.         <xsl:element name="IMG">
  236.         <xsl:attribute name="SRC">faux.gif</xsl:attribute>
  237.         <xsl:attribute name="ImgSource"><xsl:eval>this.getAttribute("src").substring(this.getAttribute("src").indexOf("#") + 1,this.getAttribute("src").length)</xsl:eval></xsl:attribute>
  238.         <xsl:attribute name="ImgHeight"><xsl:value-of select="@zoomheight" /></xsl:attribute>
  239.         <xsl:attribute name="ImgWidth"><xsl:value-of select="@zoomwidth" /></xsl:attribute>
  240.         <xsl:attribute name="STYLE">
  241.         position    : absolute;
  242.         top            : expression(parentElement.offsetTop);
  243.         left        : expression(parentElement.offsetLeft);
  244.         width        : <xsl:eval>Math.round(parseInt(this.getAttribute("zoomwidth")) * parseFloat(this.getAttribute("proportion")))</xsl:eval>;
  245.         height        : <xsl:eval>Math.round(parseInt(this.getAttribute("zoomheight")) * parseFloat(this.getAttribute("proportion")))</xsl:eval>;
  246.         cursor        : hand;
  247.         z-index        : 2;
  248.         </xsl:attribute>
  249.         </xsl:element>
  250.         <xsl:element name="P">
  251.             <xsl:element name="SPAN">
  252.             <xsl:attribute name="ImgSource"><xsl:eval>this.getAttribute("src").substring(this.getAttribute("src").indexOf("#") + 1,this.getAttribute("src").length)</xsl:eval></xsl:attribute>
  253.             <xsl:attribute name="ImgHeight"><xsl:value-of select="@zoomheight" /></xsl:attribute>
  254.             <xsl:attribute name="ImgWidth"><xsl:value-of select="@zoomwidth" /></xsl:attribute>
  255.             <xsl:attribute name="STYLE">color:blue;cursor:hand</xsl:attribute>
  256.                 Enlarge image
  257.             </xsl:element>
  258.         </xsl:element>
  259.     </xsl:element>
  260. </xsl:template>
  261. <xsl:template match="ul">
  262.     <xsl:element name="UL"><xsl:apply-templates /></xsl:element>
  263. </xsl:template>
  264. <xsl:template match="ol">
  265.     <xsl:element name="OL"><xsl:apply-templates /></xsl:element>
  266. </xsl:template>
  267. <xsl:template match="li">
  268.     <xsl:element name="LI"><xsl:apply-templates /></xsl:element>
  269. </xsl:template>
  270. <xsl:template match="emph">
  271.     <xsl:element name="SPAN">
  272.     <xsl:attribute name="STYLE">font-weight:bold</xsl:attribute>
  273.         <xsl:apply-templates />
  274.     </xsl:element>
  275. </xsl:template>
  276. <xsl:template match="i">
  277.     <xsl:element name="SPAN">
  278.     <xsl:attribute name="STYLE">font-style:italic</xsl:attribute>
  279.         <xsl:apply-templates />
  280.     </xsl:element>
  281. </xsl:template>
  282. <xsl:template match="onlineguide">
  283.     <xsl:element name="SPAN">
  284.     <xsl:attribute name="ID"><xsl:value-of select="@id" /></xsl:attribute>
  285.     <xsl:attribute name="STYLE">behavior:url('hcOnlineGuide.htc');color:blue;cursor:hand</xsl:attribute>
  286.         <xsl:value-of />
  287.     </xsl:element>
  288. </xsl:template>
  289. <xsl:template match="ndash">–</xsl:template>
  290. <xsl:template match="mdash">—</xsl:template>
  291. <xsl:template match="euro">€</xsl:template>
  292. <xsl:template match="pound">£</xsl:template>
  293. <xsl:template match="Lguillemet">«</xsl:template>
  294. <xsl:template match="Rguillemet">»</xsl:template>
  295. <xsl:template match="showme">
  296.     Show me how
  297. </xsl:template>
  298. <xsl:template match="glossary">
  299.     <xsl:element name="SPAN">
  300.     <xsl:attribute name="STYLE">behavior:url('hcGlossary.htc')</xsl:attribute>
  301.     <xsl:attribute name="tNum"><xsl:value-of select="@tNum" /></xsl:attribute>
  302.         <xsl:value-of />
  303.     </xsl:element>
  304. </xsl:template>
  305. <xsl:template match="img">
  306.     <xsl:element name="IMG">
  307.     <xsl:attribute name="SRC"><xsl:value-of select="@src" /></xsl:attribute>
  308.     <xsl:attribute name="BORDER">0</xsl:attribute>
  309.     </xsl:element>
  310. </xsl:template>
  311. <xsl:template match="frgmnt">
  312.     <xsl:element name="SPAN">
  313.     <xsl:attribute name="CLASS">Frgmnt__<xsl:value-of select="@sku" /></xsl:attribute>
  314.         <xsl:apply-templates />
  315.     </xsl:element>
  316. </xsl:template>
  317. <xsl:template match="alink">
  318.     <xsl:if test="//content[@styleType!='disabled']">    
  319.         <xsl:if test="@type[.='cncpt']">
  320.             <xsl:element name="A"><xsl:attribute name="HREF"><xsl:value-of select="@href" /></xsl:attribute>Tell me more</xsl:element>.
  321.         </xsl:if>
  322.         <xsl:if test="@type[.='prcdr']">
  323.             <xsl:element name="A"><xsl:attribute name="HREF"><xsl:value-of select="@href" /></xsl:attribute>Tell me how</xsl:element>.
  324.         </xsl:if>
  325.         <xsl:if test="@type[.='xtnl']">
  326.             <xsl:element name="A"><xsl:attribute name="HREF"><xsl:value-of select="@href" /></xsl:attribute><xsl:attribute name="TARGET">_blank</xsl:attribute><xsl:value-of /></xsl:element>
  327.         </xsl:if>
  328.         <xsl:if test="@type[.='adhoc']">
  329.             <xsl:element name="P">
  330.                 <xsl:element name="A">
  331.                 <xsl:attribute name="HREF"><xsl:value-of select="@href" /></xsl:attribute>
  332.                     <xsl:value-of />
  333.                 </xsl:element>
  334.             </xsl:element>
  335.         </xsl:if>
  336.     </xsl:if>
  337. </xsl:template>
  338. <xsl:template match="klink">
  339.     <xsl:if test="//content[@styleType!='disabled']">    
  340.         <xsl:choose>
  341.             <xsl:when test="@type[.='auvid']">
  342.                 <xsl:element name="IMG">
  343.                 <xsl:attribute name="SRC">AV_icon.gif</xsl:attribute>
  344.                 <xsl:attribute name="BORDER">0</xsl:attribute>
  345.                 <xsl:attribute name="STYLE">margin-right:0.3em</xsl:attribute>
  346.                 </xsl:element>
  347.                 <xsl:element name="A">
  348.                 <xsl:attribute name="HREF"><xsl:value-of select="@href" /></xsl:attribute>
  349.                     Watch the <xsl:element name="SPAN"><xsl:attribute name="STYLE">font-weight:bold</xsl:attribute><xsl:eval>GetVideoName(this)</xsl:eval></xsl:element> video
  350.                 </xsl:element>
  351.             </xsl:when>
  352.             <xsl:when test="@type[.='devgrown']">
  353.                 <xsl:element name="A">
  354.                 <xsl:attribute name="HREF"><xsl:value-of select="@href" /></xsl:attribute>
  355.                     <xsl:apply-templates />
  356.                 </xsl:element>
  357.             </xsl:when>
  358.             <xsl:otherwise>
  359.                 <xsl:if test="@type[.!='auvid']">
  360.                     <xsl:element name="P">
  361.                         <xsl:element name="A">
  362.                         <xsl:attribute name="HREF"><xsl:value-of select="@href" /></xsl:attribute>
  363.                             <xsl:value-of />
  364.                         </xsl:element>
  365.                     </xsl:element>
  366.                 </xsl:if>
  367.             </xsl:otherwise>
  368.         </xsl:choose>
  369.     </xsl:if>    
  370. </xsl:template>
  371.  
  372. </xsl:stylesheet>