he great thing about technology is not so much the gadgets and the radical changes in the way that we interact with the world, but it's that technology gives a small groupor even single individualthe power to change the lives of thousands. Whether it's for better or worse, technology often levels the playing field of power.
Undoubtedly, everyone who reads this will have at least a cursory familiarity with Eolas' successful patent ruling against Microsoft. Eolas owns a patent on browser plugin-style extensions that, according to the recent legal decision, is infringed by third-party plugins for Microsoft Internet Explorer, including popular software like Real Player and Flash Player. The vendors of those products are not the direct infringersthey have merely made use of the public API presented by Microsoftbut as a result of doing so, they have become its casualties.
While the patent itself has created a great deal of controversy, ultimately causing the U.S. Patent Office to agree to reevaluate the grounds on which the original patent was granted, for now this injunction forces Real, Macromedia, and others to take up different approaches to the way that their products interact with Internet Explorer.
Microsoft released information on a workaround that would allow Web developers to continue to use active content (ActiveX controls and plugins) without violating the patent. This was followed by a release at the PowerSDK site describing specific workarounds for the Flash Player. Macromedia dedicated a whole section of its DevNet Web site to the issue and spent considerable time and resources in developing solutions.
While these solutions allow developers to continue using active content in their future development projects, existing content will require manual interventionand thus more man-hours to correct the problem. Clearly, a solution is needed for existing content. This article describes one such technique that continues where other solutions leave off by translating HTML to a format that does not violate the Eolas patent.
Using XSL transformations and Web server filters it is possible to automate this task such that once such a tool is installed it is unlikely, in most cases, to need further intervention from the Web developer(s) or site support.
Web Filter Overview
Web server filters are not at all a new technology and have been used for a variety of things. In short, they provide an opportunity for a piece of processing logic to have a stab at processing the content of a Web document (typically an HTML page) before it gets sent to the requesting client. A filter can remove, alter, or amend content to the document. What is needed is to alter the HTML on-the-fly; a filter coupled with XSLT is an excellent solution.
For this particular article, we will not be investigating Microsoft's IIS filters, but the more prominent Java Server filters, whose implementation is provided by many vendors. Any of the vendors offering J2EE compliant Java Servers, such as Apache's Tomcat and Macromedia's JRun product can leverage this solution.
To this end, I'll show you how to construct a Java Server filter called MicrosoftEolasFilter.
|Author's Note: Your success using the MicrosoftEolasFilter will depend to a great extent on the quality of your HTML input. If you have well-formed HTML that conforms to XHTML standards, you're ready to go. If not, you may need to "tidy up" your HMTL using a tool such as HTMLtidy. Be sure to read the sidebar "Ivory Towers Are Expensive" for more information.