Skip to main content
Log in

Optimizing the Execution Time for Checking the Consistency of XML Documents

  • Published:
Journal of Intelligent Information Systems Aims and scope Submit manuscript

Abstract

The problem of checking the consistency of the semantics associated with extensible markup language (XML) documents is considered. We propose a novel technique to add semantics to XML documents by attaching semantic information to the XML element tag attributes. We call this XML semantics. This approach is based on the same concept of attribute grammars (AGs), attaching and checking static semantics of programming languages through their attributes. The goal of this paper is to introduce the notions of copy rules and copy attributes that can be deployed in the XML semantics. Moreover, we will show how it can be represented in the SLXS language. The SLXS language is a description language based on XML; we have designed it to describe the semantic dependencies of XML documents. In addition, we demonstrate the copy bypass attribute propagation algorithm that can be used to eliminate the evaluation of copy attributes in copy rule chains. It dynamically replaces copy rules with non-local dependencies. Given such elimination, we get a faster attribute evaluator and avoid evaluating unnecessary attributes. Furthermore, more than half of the generated code associated with copy rules is reduced. In this way, we gain an optimization technique to evaluate and check the consistency of XML documents that may contain such attributes. Finally, we evaluate experimentally the performance benefits of our technique using a variety of XML documents.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • Alblas, H. and Melichar, B. (Eds.). (1991a). Attribute Grammars, Applications and Systems. In Prague, LNCS 545, Springer-Verlag, New York-Heidelberg-Berlin.

    Google Scholar 

  • Alblas, H. (1991b). Attribute Evaluation Methods. In Henk Alblas and Borivoj Melichar (Eds.), Attribute Grammars, Applications and Systems, LNCS 545 (pp. 48-113). Prague, Springer-Verlag, New York-Heidelberg-Berlin.

    Google Scholar 

  • Bosak, J. (1998). Religion 2.00, October 6, http://www.ibiblio.org/xml/examples/religion/.

  • Bray, T., Paoli, J., and Sperberg-McQueen, C.M. (2000). Extensible Markup Language (XML) 1.0 (2nd Edn.), W3C Recommendation 6 October 2000, http://www.w3.org/TR/2000/REC-xml-20001006.

  • Clark, J. (1999). XSL Transformations (XSLT) Version 1.0. W3C Recommendation, http://www.w3.org/TR/xslt1.

  • Deransart, P., Jourdan, M., and Lorho, B. (1988). Attribute Grammars, Definitions, Systems and Bibliography. LNCS 323, Springer-Verlag.

  • Engelfriet, E. (1984). Attribute Grammars: Attribute Evaluation Methods. In Bernard Lorho (Ed.), Methods and Tools for Compiler Construction (pp. 103-138). New York: Cambridge University Press.

    Google Scholar 

  • Hoover, R. (1986). Dynamically Bypassing Copy Rule Chains in Attribute Grammars. In thirteenth Annual ACM Symposium on Principles of Programming Languages (POPL) (pp. 14-25). St. Petersburg Beach, Florida.

  • Jourdan, M. (1984). Recursive Evaluators for Attribute Grammars: An Implementation. In B. Lorho (Ed.), Methods and Tools for Compiler Construction (pp. 139-164). Cambridge University Press.

  • Katayama, T. (1984). Translation of Attribute Grammars into Procedures. ACM Transactions on Programming Languages and Systems, 6(3), 344-369.

    Google Scholar 

  • Knuth, D.E. (1968). Semantics of Context-Free Languages. Math. System Theory J.2, 127-145.

    Google Scholar 

  • Kotb, Y., Gondow, K., and Katayama, T. (2002a). Checking Consistency of XML Semantics Using Attribute Grammars. In Inter. Conf. on East-Asian Language Processing and Internet Information Technology, EALPIIT 2002 (pp. 29-38).

  • Kotb,Y., Gondow, K., and Katayama, T. (2002b). The SLXS Specification Language for Describing Consistency of XML Documents. In The Fourth Workshop on Information and Computer Science (WICS'2002) (pp. 289-304).

  • Kotb, Y., Gondow, K., and Katayama, T. (2002c). The XML Semantics Checker Model. In The Third Intern. Conf. on Parallel and Distributed Computing, Applications and Technologies (PDCAT'02) (pp. 430-438). Japan.

  • Megginson, D. (2001). SAX-Version 2, A Simple API for XML. http://sax.sourceforge.net/.

  • Mordani, M., Davidson, J., and Boag, S. (2001). Java APIs for XML Processing (JAXP), JavaTM Technology and XML. http://java.sun.com/xml/jaxp.html.

  • Neven, F. (2000). Extensions of Attribute Grammars for Structured Document Queries. In The 7th Inter.Workshop on Database Programming Languages (Kinloch Rannoch, Scotland, 1999), LNCS 1949 (pp. 99-116). Springer.

  • Psaila, G. and Crespi-Reghizzi, S. (1999). Adding Semantics to XML. In D. Parigot and V. Mernik (Eds.), '99) (pp. 113-132). Amsterdam, The Netherlands, INRIA Rocquencourt.

    Google Scholar 

  • Thompson, H. et al. (2001). XML Schema Part 1: Structures. W3C Recommendation 2 May 2001, http://www.w3.org/TR/xmlschema-1/.

  • Tokuda, T. (1986). Two Methods for Eliminating Redundant Copy Operations from the Evaluation of Attribute Grammars. Journal of Information Processing, 9(2), 79-85.

    Google Scholar 

  • Wood, L. et al. (1998). Document Object Model (DOM), Maintained by the W3C DOM WG, http://www.w3.org/TR/REC-DOM-Level-1/.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Kotb, Y., Gondow, K. & Katayama, T. Optimizing the Execution Time for Checking the Consistency of XML Documents. Journal of Intelligent Information Systems 22, 257–279 (2004). https://doi.org/10.1023/B:JIIS.0000019279.81927.c5

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/B:JIIS.0000019279.81927.c5

Navigation