Abstract
In this paper we propose a type-based framework for using logic programming for XML processing. We transform XML documents into terms and DTDs into regular types. We implemented a standard type inference algorithm for logic programs and use the types corresponding to the DTDs as additional type declarations for logic programs for XML processing. Due to the correctness of the type inference this makes it possible to use logic programs as an implicitly typed processing language for XML with static type (in this case DTDs) validation. As far as we know this is the first work adding type validation at compile time to the use of logic programming for XML processing.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Noga Alon, Tova Milo, Frank Neven, Dan Suciu, and Victor Vianu. XML with data values: Typechecking revisited. In PODS, 2001.
H. Boley. Relationships between logic programming and XML. In Proc. 14th Workshop Logische Programmierung, 2000.
Fran ois Bry and Norbert Eisinger. Data modeling with markup languages: A logic programming perspective. In 15th Workshop on Logic Programming and Constraint Systems, WLP 2000, Berlin, 2000.
Fran ois Bry and Sebastian Schaffert. Towards a declarative query and transformation language for XML and semistructured data: simulation unification. In Proc. of the 2002 International Conference on Logic Programming, 2002.
D. Cabeza and M. Hermenegildo. Distributed WWW Programming using Ciao-Prolog and the PiLLoW Library. Theory and Practice of Logic Programming, 1(3):251–282, May 2001.
P. Dart and J. Zobel. A regular type language for logic programs. In Frank Pfenning, editor, Types in Logic Programming. The MIT Press, 1992.
M. Florido and L. Damas. Types as theories. In Proc. of post-conference workshop on Proofs and Types, Joint International Conference and Symposium on Logic Programming, 1992.
J.P. Gallagher and D.A. de Waal. Fast and precise regular approximation of logic programs. In Proceedings of the Eleventh International Conference on Logic Programming, 1993.
Haruo Hosoya and Benjamin Pierce. Xduce: A typed XML processing language. In Third International Workshop on the Web and Databases (WebDB2000), volume 1997 of Lecture Notes in Computer Science, 2000.
J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, {esecond edition}, 1987.
Lunjin Lu. On Dart-Zobel algorithm for testing regular type inclusion. In SIGPLAN Notices Volume 36, 2001.
T. Milo, D. Suciu, and V. Vianu. Typechecking for XML transformers. In ACM Symposium on Principles of Database Systems, 2000.
P. Mishra. Towards a theory of types in Prolog. In Proc. of the 1984 International Symposium on Logic Programming, 1984.
Leon Sterling and Ehud Shapiro. The Art of Prolog, 2nd edition. The MIT Press, 1994.
Dan Suciu. Typechecking for semistructured data. In International Workshop on Database Programming, 2001.
J.W. Thatcher. Tree automata: An informal survey. Prentice-Hall, 1973.
Malcom Wallace and Colin Runciman. Haskell and XML: Generic combinators or type-based translation? In International Conference on Functional Programming, 1999.
E. Yardeni and E. Shapiro. A type system for logic programs. In The Journal of Logic Programming, 1990.
Justin Zobel. Derivation of polymorphic types for prolog programs. In Proc. of the 1987 International Conference on Logic Programming, pages 817–838, 1987.
Justin Zobel. Analysis of Logic Programs. PhD thesis, Department of Computer Science, University of Melbourne, 1990.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Coelho, J., Florido, M. (2003). Type-Based XML Processing in Logic Programming. In: Dahl, V., Wadler, P. (eds) Practical Aspects of Declarative Languages. PADL 2003. Lecture Notes in Computer Science, vol 2562. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36388-2_19
Download citation
DOI: https://doi.org/10.1007/3-540-36388-2_19
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00389-2
Online ISBN: 978-3-540-36388-0
eBook Packages: Springer Book Archive