home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 September / CHIPCD_9_99.iso / software / uaktualnienia / OptionPackPL / iis4_06.cab / samp2lpi.asp < prev    next >
Text File  |  1998-04-27  |  3KB  |  44 lines

  1.  <% If Request("DontFrame")<>1 Then Response.Redirect "/iissamples/sdk/asp/docs/SampFram.asp?ovfile=/iishelp/iis/htm/sdk/samp2lpi.asp&srcfile=Interaction/CDF" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  3. <HTML>
  4. <HEAD>
  5. <META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
  6. <title>CDF</title>
  7. <script language="JavaScript">
  8.  
  9.     szNavVersion = navigator.appVersion
  10.  
  11.     if (navigator.appName == "Microsoft Internet Explorer") {
  12.     if (szNavVersion.indexOf ("4.") >= 0) {
  13.         document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie4.css">');
  14.     } else {
  15.         document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie3.css">');
  16.     }
  17.     }
  18.     else if (navigator.appName == "Netscape") {
  19.     document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie4.css">');
  20.     }
  21.     else {
  22.     document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie3.css">');
  23.     }
  24.  
  25. </script>
  26. <META NAME="DESCRIPTION" CONTENT="Internet Information Server reference information"></HEAD>
  27. <BODY BGCOLOR=#FFFFFF TEXT=#000000>
  28. <font face="Verdana, Arial, Helvetica">
  29. <h3><a name="_cdf"></a>CDF</h3>
  30. <p>
  31. Channel Definition Format (CDF) is an application of the Extensible Markup Language (XML) that gives you the ability to offer automatic information delivery to client browsers in the form of channels. CDF uses special data files to define logical groupings and scheduling for a set of channels, and this sample will demonstrate how one of these CDF files can be created dynamically.</p>
  32. <p>
  33. In general, .cdf files look quite a bit like .htm files. Each channel definition is contained within the <CHANNEL> tags, and includes the channel title, description, and schedule information. A list of the actual channel items follows, each item marked with the <ITEM> tags. </p>
  34. <p>
  35. In this example, the channel configuration is already specified, and the script builds the rest of the .cdf file from a text file. The <b>FileSystemObject.OpenTextFile</b> method is used to open the text file, which is simply a list of title string-link string pairs, each element on a new line of the file. The script then iterates through the file, using the <b>ReadLine</b> method in a <b>Do</b> loop, writing a new <ITEM> entry to the client browser for each title-link pair contained in filelist.txt. </p>
  36. <p>
  37. For more information about CDF, visit the Microsoft® Web site at www.microsoft.com, and the World Wide Web Consortium's Web site at www.w3.org.</p>
  38. <p>
  39. <b>Note</b>  While the CDF output that is sent to the client browser by the server has a lot in common with HTML, it is important to note that HTML and CDF are not one in the same. HTML and CDF look similar because both are essentially markup languages defined by SGML and XML, but CDF is an independent entity from HTML. For that reason, it is important that the content-type of the output be set to application/x-cdf. You can do this either explicitly, using the <b>Response.ContentType</b> property, or implicitly, by giving the ASP script which is creating the CDF file a .cdx extension. In the latter case, ASP automatically sets the appropriate content-type for any output generated by the script. </p>
  40. <hr class="iis" size="1">
  41. <p align="center"><em><a href="/iishelp/common/colegal.htm">© 1997 by Microsoft Corporation. All rights reserved.</a></em></p>
  42. </BODY>
  43. </HTML>
  44.