Static Validation of Dynamically Generated HTML.pdf
文本预览下载声明
Static Validation of Dynamically Generated HTML
Claus Brabrand, Anders Møller, and Michael I. Schwartzbach
BRICS
Department of Computer Science
University of Aarhus, Denmark
{brabrand,amoeller,mis}@brics.dk
ABSTRACT our technique can be generalized to more powerful grammatical
We describe a static analysis of bigwig programs that effi- descriptions.
ciently decides if all dynamically computed XHTML documents Outline
presented to the client will validate according to the official DTD.
We employ two data-flow analyses to construct a graph summariz- First, in Section 2, we give a brief introduction to dynamically gen-
ing the possible documents. This graph is subsequently analyzed erating XHTML documents in the bigwiglanguage. Section 3
to determine validity of those documents. By evaluating the tech- formally defines the notion of summary graphs. In Sections 4 and 5,
nique on a number of realistic benchmarks, we demonstrate that it the two parts of the data-flow analysis are specified. Then, in Sec-
is sufficiently fast and precise to be practically useful. tion 6, a notion of abstract DTDs is defined and used for specifying
XHTML 1.0. Section 7 describes the algorithm for validating sum-
mary graphs with respect to abstract DTDs. In Section 8 we eval-
1. INTRODUCTION
显示全部