purple-include Granular transclusions for the common man. version 0.8 (July 2, 2007) http://blueoxen.net/c/purple/purple-include/ INTRODUCTION purple-include is a client-side JavaScript library that allows you to do client-side transclusions. What the heck does that mean? It means that you can include and display fragments of one HTML page in another without copying and pasting any content. For example, you could quote the second paragraph from another person's blog entry by embedding something like: in your blog page. The expression following the explanation point in the URL is an XPath expression. If the page you want to transclude has a fragment identifier or a purple number, you can transclude that directly: INSTALLATION In order to do remote transclusions (transcluding content not hosted on your web server), you need to use a proxy. We have included a brain-dead PHP proxy (purple-proxy.php). You can set the path to your proxy in your HTML documents by adding the following meta tag: EXAMPLES See tests/examples.html OUR STORY purple-include is one of many projects in the "Purple" universe -- simple tools that implement some of Doug Engelbart's many ideas in today's world. It was developed by core members of the HyperScope (http://hyperscope.org/) team (Brad Neuberg, Jonathan Cheyer, and Eugene Eric Kim) in response to the question, "What's something cool, simple, and HyperScope-inspired we could hack in a couple of hours?" purple-include is an extension of Mark Nottingham's most excellent hack, hinclude.js: http://www.mnot.net/javascript/hinclude/ We used Tony Chang's interactive XPath tester to test our XPath expressions, then ended up stealing some of his code too: http://ponderer.org/download/xpath/ THE FUTURE The coolness doesn't end here. There are a bunch of small hacks we can make to the code that will really make this interesting. See TODO and HAIRYISSUES for more ideas. LICENSE BSD, baby. Just give us some credit, and give some love to Mark and Tony, too.