|
Abstract |
|
||
Program slicing is a well-known technique to extract the program statements that (potentially) affect the values computed at some
point of interest. In this work, we introduce a novel slicing
method for XML documents. Essentially, given an XML document
(which is valid w.r.t. some DTD), we produce a new XML document
(a slice) that contains the relevant information in the
original XML document according to some criterion. Furthermore,
we also output a new DTD such that the computed slice is valid
w.r.t. this DTD. A prototype implementation of the XML slicer
has been undertaken. |
||||
Program Slicing |
||||
One of the most widely used program transformations is program slicing. It consists of a decomposition technique for the extraction of those program statements that (potentially) affect the values computed at some point of interest. Program slicing was originally introduced by Weiser and has now many applications such as debugging, code understanding, program specialization, etc. Some useful links to program slicing works: Original Definition Debugging Partial Evaluation Program Specialization Survey |
||||
XML |
||||
XML was developed by an XML Working Group formed under the auspices of the World Wide Web Consortium (W3C) in 1996. XML documents are made up of basic units called "elements'' according to a set of restrictions specified on an independent specification called Document Type Definition (DTD). More information about XML can be found in:
|
||||
Slicing XML Documents | ||||
An DTD/XML slicer can bring many benefits for the manipulation and maintenance of webpages. For instance, the following webpage has been automatically generated from the XML file PersonalInfo.xml (valid with respect to PersonalInfo.dtd) by using the PersonalInfo.xsl XSLT file:
If we slice the DTD and XML documents with respect to some criteria, the associated web page is consequently also sliced automatically. For instance, Of course, slices can be also sliced in order to obtain more specialized information. Results
Main Applications
Webpage of Tesco at www.tesco.com Slice of the previous webpage This webpage has been sliced w.r.t. ths slicing criterion "mobile phones". After the slicing process, text, banners and images that were not semantically (in the XML document) related to mobile phones have been deleted. Future Work
|
||||
Implementation | ||||
Here you can download some files with the implementation
of the DTD/XML slicer. We have implemented our prototype in Haskell. Haskell provides us a formal basis with many advantages for the manipulation of XML documents such as the HaXml library. data Element = Elem Name [Attribute] [Content] |