We present the design and implementation of XEBRA system. XEBRA is an integrated programming environment for XML processing and browsing on which users can build their own XML processing applications. XEBRA has a lisp interpreter as its main control system. The lisp interpreter provides programming interface for users. It also provides XML manipulation routines and data structures devoted to XML. We designed the XEBRA architecture to be extensible by modules. We implemented some modules which have functionalities for XML and web related common technologies such as XSLT, XSL-FO, HTTP and CSS to XML conversion. Users may build customized programs by combining functionalities provided by these modules. Finally, we show an HTML browser as an example application of the system. We demonstrate that this browser shows potential of our system and its design.
After appearance of XML [1], the world of World Wide Web is now getting into the second generation based on XML and XML family technologies like XSLT [2]. Compared with the first generation web computing that is based on HTML, the second generation web computing that is based on XML will provide openness, flexibility and extensibility for users by using XML as a meta language for all documents and data. Our main interest of this paper is how we can bring potential of XML into user's processing and browsing environment.
Existing web environment for users consists of HTML browser and its extension. However, handling of XML documents is more than just browsing. For example, we may want to gather XML files from various sites, combine these files into an XML tree, transform this tree into an XSL Formating Object [3], and then browse it. In such cases, we require programmable environment on which we can build our own XML processing applications.
In order to satisfy our interest, we developed XEBRA (eXtensible Environment for BRowser Architecture) system. We designed this system as integrated programming environment for XML processing. Users of XEBRA have ability to create their own customized XML application.
In our system XEBRA, we introduced a lisp interpreter as its main control system. We employed modular extensible architecture in the main system. We implemented some functions of XML family technologies as modules. Figure 1 shows the system overview of XEBRA.
The lisp interpreter provides interactive programming environment for users. With the lisp interpreter, users can build and execute their own program in an interactive session. Our lisp interpreter has both functions and data structures devoted to XML processing. Furthermore, users can freely combine modules for their own applications by calling modules as lisp functions.
The lisp interpreter and modules are written in C language. Because we wanted to make free both lisp users and module writers from memory management, we introduced memory allocation system with mark and sweep garbage collection.
We implemented modules described below. In order to make C functions of modules available to lisp programs, each module has glue functions for lisp. Users can build their own applications by combining these modules in their lisp programs.
an XML vocabulary for specifying formatting semantics[3]. We employ XSL-FO as basis for rendering and displaying XML data. Our XSL-FO module converts XML trees described with XSL-FO vocabulary into device dependent drawables and displays it directly on screens.
XEBRA is an integrated environment for XML processing and it is not intended only for implementing web browsers. However, in order to show basic ability of the system, we implemented an HTML browser with XEBRA. Main part of this simple HTML browser is expressed in 14 lines of lisp program. It consists of roughly following three steps.
Customizing this browser is relatively easy. For example, it is easy to insert a lisp program which call the XSLT module with a stylesheet which summarizes H1 element of HTML documents and display their summarized versions.
After implementing the basic part of XEBRA system, we implemented each module independently. Then, we tried to write the HTML browser as a lisp program. Nevertheless the design of each module was left to implementor of each module, writing the lisp program of the HTML browser was far easier than we anticipated. With this experience, we proved the effectiveness of our basic design of XEBRA and potential of the system.
This research was supported by IPA (Information-technology Promotion Agency, Japan).