Boolean Operations for Attribute-Element Constraints

Extended Abstract
  • Haruo Hosoya
  • Makoto Murata
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2759)


The history of schema languages for XML is an increase of expressiveness. While early schema languages mainly focused on the element structure, Clark first paid an equal attention to attributes by allowing both element and attribute constraints in a single regular expression. In this paper, we investigate an algorithmic aspect of Clark’s mechanism (called “attribute-element constraints”), namely, intersection and difference operations, which have been proved to be important in static typechecking for XML processing programs. The contributions here are (1) proofs of closure under intersection and difference and (2) algorithm formulations incorporating a “divide-and-conquer” strategy for avoiding an exponential blow-up for typical inputs.


Boolean Operation Regular Expression Element Expression Intersection Algorithm Attribute Expression 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    G. Berry and R. Sethi. From regular expressions to deterministic automata. Theoretical Computer Science, 48(1):117–126, 1986.zbMATHCrossRefMathSciNetGoogle Scholar
  2. [2]
    T. Bray, D. Hollander, A. Layman, and J. Clark. Namespaces in XML., 1999.
  3. [3]
    T. Bray, J. Paoli, C. M. Sperberg-McQueen, and E. Maler. Extensible markup language (XML™)., 2000.
  4. [4]
    J.A. Brzozowski. Derivatives of regular expressions. Journal of the ACM, 11(4):481–494, Oct. 1964.zbMATHCrossRefMathSciNetGoogle Scholar
  5. [5]
    P. Buneman and B. Pierce. Union types for semistructured data. In Internet Programming Languages, volume 1686 of Lecture Notes in Computer Science. Springer-Verlag, Sept. 1998. Proceedings of the International Database Programming Languages Workshop.Google Scholar
  6. [6]
    J. Clark. TREX: Tree Regular Expressions for XML., 2001.
  7. [7]
  8. [8]
    J. Clark and M. Murata. RELAX NG., 2001.
  9. [9]
    D.C. Fallside. XML Schema Part 0: Primer, W3C Recommendation., 2001.
  10. [10]
    P. Fankhauser, M. Fernández, A. Malhotra, M. Rys, J. Siméon, and P. Wadler. XQuery 1.0 Formal Semantics., 2001.
  11. [11]
    A. Frisch, G. Castagna, and V. Benzaken. Semantic subtyping. In Seventeenth Annual IEEE Symposium on Logic In Computer Science, 2002.Google Scholar
  12. [12]
    R. Harper and B. Pierce. A recrd calculus based on symmetric concatenation. In Proceedings of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, Orlando FL, pages 131–142. ACM, Jan. 1991.Google Scholar
  13. [13]
    J. E. Hopcroft and J.D. Ullman. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, 1979.Google Scholar
  14. [14]
    H. Hosoya and M. Murata. Validation and boolean operations for attribute-element constraints. In Programming Languages Technologies for XML (PLANX), pages 1–10, 2002.Google Scholar
  15. [15]
    H. Hosoya and M. Murata. Boolean operations and inclusion test for attribute-element constraints. Full version, 2003.Google Scholar
  16. [16]
    H. Hosoya and B.C. Pierce. XDuce: A typed XML processing language (preliminary report). In Proceedings of Third International Workshop on the Web and Databases (WebDB2000), volume 1997 of Lecture Notes in Computer Science, pages 226–244, May 2000.Google Scholar
  17. [17]
    H. Hosoya and B.C. Pierce. Regular expression pattern matching for XML. In The 25th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 67–80, Jan. 2001.Google Scholar
  18. [18]
    H. Hosoya, J. Vouillon, and B.C. Pierce. Regular expression types for XML. In Proceedings of the International Conference on Functional Programming (ICFP), pages 11–22, Sept. 2000. Full version under submission to TOPLAS.Google Scholar
  19. [19]
    N. Klarlund, A. Møller, and M. I. Schwartzbach. DSD: A schema language for XML., 2000.
  20. [20]
    T. Milo, D. Suciu, and V. Vianu. Typechecking for XML transformers. In Proceedings of the Nineteenth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, pages 11–22. ACM, May 2000.Google Scholar
  21. [21]
    A. Møller. Document Structure Description 2.0, December 2002. BRICS, Department of Computer Science, University of Aarhus, Notes Series NS-02-7. Available from
  22. [22]
    M. Murata. Transformation of documents and schemas by patterns and contextual conditions. In Principles of Document Processing’ 96, volume 1293 of Lecture Notes in Computer Science, pages 153–169. Springer-Verlag, 1997.Google Scholar
  23. [23]
    M. Murata. RELAX (REgular LAnguage description for XML)., 2001.
  24. [24]
    A. Tozawa. Towards static type inference for XSLT. In Proceedings of ACM Symposium on Document Engineering, 2001.Google Scholar
  25. [25]
    J. Vouillon. Interleaving types for XML. Personal communication, 2001.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Haruo Hosoya
    • 1
  • Makoto Murata
    • 2
  1. 1.Research Institute for Mathematical SciencesKyoto UniversityKyoto
  2. 2.IBM Tokyo Research LaboratoryKyoto

Personalised recommendations