home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / cfmlsyntaxcheck.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  7.7 KB  |  244 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  2.  
  3. <HTML>
  4. <HEAD>
  5.     <TITLE>CFML 4.0 Syntax Checker</TITLE>
  6.  
  7. <script language="Javascript">
  8.  
  9. var DocRemote = 0;
  10.  
  11. function makeRemote(){
  12.  
  13.     if(DocRemote){
  14.         if(DocRemote.closed){
  15.             DocRemote = 0;
  16.             makeRemote();
  17.         }else{
  18.             DocRemote.focus();
  19.         }
  20.     }else{
  21.         DocRemote = window.open('search.cfm', 
  22.                         'Search', 
  23.                         'scrollbars,resizable,width=510,height=300');
  24.         }
  25. }
  26.  
  27. </script>
  28.  
  29. <script language="JavaScript1.1">
  30.  
  31.     blank = new Image();
  32.     blank.src = 'images/mouseovers/blank.gif';
  33.     
  34.     imgBack = new Image();
  35.     imgBack.src = 'images/mouseovers/back.gif';
  36.  
  37.     imgSearch = new Image();
  38.     imgSearch.src = 'images/mouseovers/search.gif';
  39.  
  40.     imgTop = new Image();
  41.     imgTop.src = 'images/mouseovers/toplevel.gif';
  42.  
  43.     imgUp = new Image();
  44.     imgUp.src = 'images/mouseovers/uplevel.gif';
  45.  
  46.     imgNext = new Image();
  47.     imgNext.src = 'images/mouseovers/next.gif';
  48.  
  49. </script>
  50. </HEAD>
  51.  
  52. <body background="images/bgblue.gif" bgcolor="#99CC99" text="#333333" vlink="#669966">
  53. <basefont size=2 face="Arial, Helvetica">
  54. <center>
  55. <table width="600" border="0" cellspacing="0" cellpadding="2" bgcolor="#000066">
  56. <tr><td><a name="top"></a>
  57.  
  58. <table border="0" cellspacing="0" cellpadding="0" bgcolor="white" width=600>
  59.  
  60. <tr>  <!--- 7 cols. Col 7 = color only --->
  61. <td width=50 nowrap bgcolor="000066"></td>
  62. <td width=25 nowrap bgcolor="000066"></td>
  63. <td width=25 nowrap bgcolor="000066"></td>
  64. <td width=425 nowrap bgcolor="000066"></td>
  65. <td width=50 nowrap bgcolor="000066"></td>
  66. <td width=13 nowrap bgcolor="000066"></td>
  67. <td width=2 nowrap rowspan=99 bgcolor=336633> </td>
  68. </tr>
  69.  
  70. <tr>
  71. <td colspan=1> </td>
  72. <td colspan=5 height=25 align=right valign="top">
  73.    <!--- Navbar --->
  74.        <table border="0" cellspacing="0" cellpadding="0">
  75.     <tr>
  76.         <td valign=top>
  77.             <img src="images/mouseovers/blank.gif" name="DescText" width=157 height=33 border=0><br>
  78.         </td>
  79.         <td valign=top>
  80.             <a href="main.htm" OnMouseOut="DescText.src=blank.src" OnMouseOver="DescText.src=imgBack.src"><img src="images/navwidgets/back.gif" width=80 height=33 border=0></a><br>
  81.         </td>
  82.         <td>
  83.             <a href="javascript: makeRemote();" OnMouseOut="DescText.src=blank.src" OnMouseOver="DescText.src=imgSearch.src"><img src="images/navwidgets/search.gif" width=39 height=33 border=0></a><br>
  84.         </td>
  85.         <td>
  86.             <a href="main.htm" OnMouseOut="DescText.src=blank.src" OnMouseOver="DescText.src=imgUp.src"><img src="images/navwidgets/up.gif" width=41 height=33 border=0></a><br>
  87.         </td>
  88.         <td>
  89.            <img src="images/navwidgets/next.gif" width=40 height=33 border=0><br>
  90.         </td>
  91.     </tr>
  92.     </table>
  93.  
  94. </td>
  95. </tr>
  96.  
  97. <tr>
  98. <td height=75 bgcolor=ffFFff colspan=5> </td>
  99. <td rowspan=99 bgcolor=339933> </td> <!--- Col 6 = color only  (Col 7 is color only too) --->
  100. </tr>
  101. <!-- End of header content. Page content displays below. -->
  102.  
  103. <tr>
  104.     <td bgcolor=ffFFff> </td>
  105.     <td bgcolor=ffFFff> </td>
  106.     <td align="right" bgcolor=ffFFff colspan=2><img src="images/welcomecover/allaire.gif" width="177" height="25" hspace="25" border="0" alt="allaire">
  107.  
  108. <br>
  109. <br>
  110.  
  111. </td>
  112. <td bgcolor=ffFFff> </td>  
  113. </tr> 
  114. <tr>
  115.     <td colspan=1 bgcolor=ffFFff> </td>
  116.     <td colspan=3 bgcolor=ffFFff>
  117.     <font face="Arial Black, Helvetica" size="+2">CFML 4.0 Syntax Checker</font>
  118.     </td>
  119.         <td bgcolor=ffFFff> </td>
  120. </tr>
  121. <!--- Put some space between heading and body --->
  122. <tr><td height=8 bgcolor=ffFFff colspan=5> </td></tr>
  123.  
  124. <tr>
  125.     <td colspan=3 bgcolor=ffFFff> </td>
  126.     <td bgcolor=ffFFff>
  127.       <font face="Arial, Helvetica">
  128. <p>Version 4.0 of the Cold Fusion Application Server features
  129. stricter enforcement of CFML syntax rules. Strict checking can
  130. uncover hidden bugs and other types of undesirable behaviors in
  131. your CFML templates. Allaire recommends that you always use the
  132. strictest possible level of CFML template validation.</p>
  133.  
  134. <p>In rare cases, the more relaxed validation mechanisms used by
  135. previous versions of Cold Fusion may have allowed you to use
  136. syntactically incorrect CFML constructs. The CFML Syntax Checker
  137. is a simple application that can aid you in the process of
  138. discovering which of your CFML templates may not conform to the
  139. rules CFML 4.0.</p>
  140.  
  141. <p>Use the form below to specify the directory where your CFML
  142. templates are located. If you have some legacy DBML code, you may
  143. want to change the file search filter to <em>*.?fm</em> so that
  144. both <em>*.dbm</em> and <em>*.cfm</em> files are checked. If you
  145. do not want to look for CFML templates in nested sub-directories,
  146. you should uncheck the Recurse checkbox. (<strong>Note:</strong>
  147. Don't forget to check your custom tag templates. They reside in
  148. the CustomTags directory under the root of your Cold Fusion
  149. installation.)</p>
  150.  
  151. <p>The syntax checker will return a list of the templates that
  152. failed the syntax checks and the error message that each failed
  153. template generated. (<strong>Note:</strong> If you have many
  154. templates syntax checking can take a few minutes. Please, be
  155. patient.)</p>
  156. </font>
  157.  
  158. <!--- Establish common parameter set --->
  159. <cfif isDefined("url.execute")>
  160.     <cfparam name=directory default=#form.directory#>
  161.     <cfparam name=filter default=#form.filter#>
  162.     <cfif isDefined("form.recurse")>
  163.         <cfset recurse = true>
  164.     <cfelse>
  165.         <cfset recurse = false>
  166.     </cfif>    
  167. <cfelse>
  168.     <cfparam name=directory default="">
  169.     <cfparam name=filter default="*.cfm">
  170.     <cfparam name=recurse default=true>
  171. </cfif>
  172.  
  173. <!--- Display processing form --->
  174. <hr>
  175. <form action="cfmlsyntaxcheck.cfm?execute=yes&requestTimeout=1800" method="POST">
  176. <table>
  177. <cfoutput>
  178. <tr><td><font face="Arial, Helvetica">Directory:</font></td><td><input type="Text" name="Directory" value="#directory#" size="80"></td></tr>
  179. <tr><td><font face="Arial, Helvetica">Filter:</font></td><td><input type="Text" name="Filter" value="#filter#" size="12"></td></tr>
  180. <tr><td><font face="Arial, Helvetica">Recurse:</font></td><td><input type="Checkbox" name="Recurse" <cfif recurse>checked</cfif>></td></tr>
  181. </cfoutput>
  182. </table>
  183. <input type="reset">
  184. <input type="Submit" name="Submit" value="Check Syntax">
  185. </form>
  186. <hr>
  187.  <font face="Arial, Helvetica">
  188. <!--- Display result set --->
  189. <cfif isDefined("url.execute")>
  190.  
  191.     <hr><p><h2>Syntax Check Results</h2><p>
  192.     
  193.     <cf_syntaxcheck
  194.         directory=#directory#
  195.         filter=#filter#
  196.         recurse=#recurse#
  197.         resultquery=resultQuery>
  198.  
  199.     <cfif resultQuery.recordCount gt 0>
  200.     
  201.         <CFOUTPUT QUERY=resultQuery>
  202.             <hr color="ff0000">
  203.             Template Path: <b>#TemplatePath#</b><p>
  204.             #ErrorMessage#
  205.         </CFOUTPUT>
  206.     
  207.     <cfelse>
  208.     
  209.         <b>All templates comply with CFML 4.0 syntax rules!</b>    
  210.     
  211.     </cfif>
  212. </cfif>
  213. </font>
  214. </td>
  215. <td bgcolor=ffFFff> </td>  
  216. </tr>
  217.  
  218. <!---  begin footer --->    
  219. <tr><td height=100 colspan=5 bgcolor=ffFFff> </td></tr>
  220. <tr>
  221.     <td colspan=4 align=right bgcolor=ffFFff>
  222.       <a href="main.htm"><img src="images/navwidgets/lowerback.gif" WIDTH=50 HEIGHT=31 border=0 alt="Back"></a><a href="main.htm"><img src="images/navwidgets/lowertop.gif" alt="Up Level" WIDTH=41 HEIGHT=31 border=0></a><img src="images/navwidgets/lowernext.gif" alt="Next" WIDTH=50 HEIGHT=31 border=0><br>
  223.     </td>
  224.     <td bgcolor=ffFFff> </td>
  225. </tr>
  226. <tr><td height=120 colspan=5 bgcolor=ffFFff> </td></tr>
  227. <tr>
  228.     <td colspan=5 height=29 valign=top>
  229.     <font size="-2" face="Arial, Helvetica">
  230.         <p>
  231.         <a href="http://www.allaire.com"><img src="images/navwidgets/allaireblue.gif" width=230 border=0 hspace=0 vspace=0 height=29 align="left" alt="allaire"></a>
  232.               <a href="mailto:allairedoc@allaire.com">AllaireDoc@allaire.com</a><br>
  233.               Copyright © 1998, Allaire Corporation.   All rights reserved.<br>
  234.     </font>
  235.     </td>
  236. </tr>
  237.  
  238. </table>
  239.     </td>
  240. </tr>
  241. </table>
  242. </BODY>
  243. </HTML>
  244.