Abstract
Structured documents are usually processed by tree-based document transformers, which transform the document tree representing the structure of the input document into another tree structure. Event-based document transformers, by contrast, recognize the input as a stream of parsing events, i.e., lexical tokens, and process the events one by one in an event-driven manner. Event-based document transformers have advantages that they need less memory space and that they are more tolerant of large inputs, compared to tree-based transformers, which construct the intermediate tree representation. This paper proposes an algorithm which derives an event-based transformer from a given specification of a document transformation over a tree structure. The derivation of an event-based transformer is carried out in the framework of attribute grammars. We first obtain an attribute grammar which processes a stream of parsing events, by applying a deforestation method; We then derive an attribute evaluation scheme relevant to the event-based transformation. Using this algorithm, one can develop event-based document transformers in a more declarative style than directly programming over the stream of parsing events.
Original language | English |
---|---|
Pages (from-to) | 181-205 |
Number of pages | 25 |
Journal | Electronic Notes in Theoretical Computer Science |
Volume | 44 |
Issue number | 2 |
DOIs | |
Publication status | Published - 2001 Jun |
Externally published | Yes |
Event | LDTA'01, First Workshop on Language Descriptions, Tools and Applications (a Satellite Event of ETAPS 2001) - Genova, Italy Duration: 2001 Apr 7 → 2001 Apr 7 |
Keywords
- Attribute evaluation scheme
- Attribute grammars
- Descriptional composition
- Event-based document transformation
- XML
ASJC Scopus subject areas
- Theoretical Computer Science
- Computer Science(all)