ÿþ<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Example</title> <link type="text/css" href="/css/site.css" rel="stylesheet" /> </head> <body> <div id="header"> <div id="logo"> <a href="/" title="Home"> <h1>Exyus</h1> </a> </div> <div id="menu"> <ul> <li><a href="/" title="Home">Home</a></li> <li><a href="/setup-exyus/" title="Setup Exyus">Setup</a></li> <li><a href="/faq/" title="FAQ">FAQ</a></li> <li><a href="/articles/" title="Articles">Articles</a></li> <li><a href="/samples/" title="Samples">Samples</a></li> <li><a href="/external/" title="Download">Download</a></li> <li><a href="/about/" title="About">About</a></li> </ul> </div> <div id="block"></div> </div> <div id="content"> <h1>Example</h1> <p>Below is a quick example of a complete <strong>Exyus</strong> application that allows authorized users to add, edit, delete HTML documents directly on the web. This was tested using the W3C's <a href="http://www.w3.org/Amaya/" title="Amaya">Amaya</a> web browser. This browser supports inline-editing and uses PUT w/ Etag support to edit data on the web. </p> <pre> using System; using Exyus.Web; namespace Exyus.Editable { // full read/write via PUT w/ ETags [UriPattern(@"/editable/(?<docid>[^/?]*)?(?:\.xcs)(?:[?])?(?:.*)?")] [MediaTypes("text/html")] public class editPages : XmlFileResource { public editPages() { this.ContentType = "text/html"; this.UpdateMediaTypes = new string[] { "text/html" }; this.AllowPost = false; this.AllowCreateOnPut = true; this.DocumentsFolder = "~/documents/editable/"; this.StorageFolder = "~/storage/editable/"; this.XHtmlNodes = new string[] { "//body" }; this.LocalMaxAge = 600; this.ImmediateCacheUriTemplates = new string[] { "/editable/.xcs", "/editable/{docid}.xcs" }; } } } </pre> </div> <div id="footer"> <ul> <li><a href="/" title="Home">Home</a></li> <li><a href="/setup-exyus/" title="Setup Exyus">Setup</a></li> <li><a href="/faq/" title="FAQ">FAQ</a></li> <li><a href="/articles/" title="Articles">Articles</a></li> <li><a href="/samples/" title="Samples">Samples</a></li> <li><a href="/external/" title="Download">Download</a></li> <li><a href="/about/" title="About">About</a></li> </ul> </div> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-2399548-2"); pageTracker._initData(); pageTracker._trackPageview(); </script> </body> </html>