We are very proud to announce the first version 0.5.1 of XQuery in the Browser (XQIB) for IE6+. XQIB brings the power, elegance and simplicity of XQuery to all browser users and developers. XQIB is a browser plugin which embeds Zorba, a powerful XQuery engine. This plugin allows to execute XQuery in the same way you would execute JavaScript. Writing some functionality can be done in two simple steps:
- Create a <script/> tag with the type “text/xqueryp” in the head of the document
- Declare and implement a new function “main” in the local namespace, which will be executed after the page has loaded.
So a simple hello world looks like this:
<?xml version=’1.0′ encoding=”utf-8″?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml“>
<head>
<script type=”text/xqueryp”>
declare function local:main() {
browser:alert(//H1)
};
</script>
</head>
<body>
<h1>Hello, world!</h1>
</body>
</html>
Please have a look at our examples. You can download an installer for Internet Explorer (at least version 6) under Windows XP/Vista. The installation process is very simple and takes one minute. You can also access the source code of the plugin on SourceForge. A plugin for Firefox is on its way as well.
Disclaimer: this is experimental work! The plugin might contain security leaks. You are using it at your own risks.