{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,8,21]],"date-time":"2026-08-21T18:40:41Z","timestamp":1787337641512,"version":"build-2736575974"},"reference-count":40,"publisher":"Society for Industrial & Applied Mathematics (SIAM)","issue":"3","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["SIAM J. Comput."],"published-print":{"date-parts":[[2008,1]]},"abstract":"<jats:p>XML specifications often consist of a type definition (typically, a document type definition (DTD)) and a set of integrity constraints. It has been shown previously that such specifications can be inconsistent, and thus it is often desirable to check consistency at compile time. It is known [W. Fan and L. Libkin, J. ACM, 49 (2002), pp. 368\u2013406] that for general keys, foreign keys, and DTDs the consistency problem is undecidable; however, it becomes NP-complete when all keys are one-attribute (unary) and tractable, if no foreign keys are used. In this paper, we consider a variety of previously studied constraints for XML data and investigate the complexity of the consistency problem. Our main conclusion is that, in the presence of foreign key constraints, compile-time verification of consistency is infeasible. We look at absolute constraints that hold in the entire document and relative constraints that hold only in a part of the document. For absolute constraints, we prove decidability and establish complexity bounds for primary multiattribute keys and unary foreign keys and study unary constraints that involve regular expressions. For relative constraints, we prove that even for unary constraints the consistency problem is undecidable. We also show that results continue to hold for extended DTDs, a more expressive typing mechanism for XML.<\/jats:p>","DOI":"10.1137\/050646895","type":"journal-article","created":{"date-parts":[[2008,6,6]],"date-time":"2008-06-06T18:05:16Z","timestamp":1212775516000},"page":"841-880","source":"Crossref","is-referenced-by-count":37,"title":["On the Complexity of Verifying Consistency of XML Specifications"],"prefix":"10.1137","volume":"38","author":[{"given":"Marcelo","family":"Arenas","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Wenfei","family":"Fan","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Leonid","family":"Libkin","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"351","published-online":{"date-parts":[[2008,6,6]]},"reference":[{"key":"R1","doi-asserted-by":"publisher","DOI":"10.1006\/jcss.1999.1627"},{"key":"R2","doi-asserted-by":"crossref","unstructured":"C. K. Baru, A. Gupta, B. Lud\u00e4scher, R. Marciano, Y. Papakonstantinou, P. Velikhov, and V. Chu,\n                      XML-based information mediation with MIX\n                      , in Proceedings of the 1999 ACM SIGMOD International Conference on Management of Data, Philadelphia, PA, 1999, pp. 597\u2013599.","DOI":"10.1145\/304182.304590"},{"key":"R3","doi-asserted-by":"crossref","unstructured":"C. Beeri and T. Milo,\n                      Schemas for integration and translation of structured and semi-structured data\n                      , in Proceedings of the 7th International Conference on Database Theory, Lecture Notes in Comput. Sci. 1540, Springer, New York, 1999, pp. 296\u2013313.","DOI":"10.1007\/3-540-49257-7_19"},{"key":"R4","doi-asserted-by":"crossref","unstructured":"M. Benedikt, C. Y. Chan, W. Fan, J. Freire, and R. Rastogi,\n                      Capturing both types and constraints in data integration\n                      , in Proceedings of the 2003 ACM SIGMOD International Conference on Management of Data, San Diego, CA, 2003, pp. 277\u2013288.","DOI":"10.1145\/872757.872792"},{"key":"R5","doi-asserted-by":"publisher","DOI":"10.1016\/S1389-1286(02)00223-2"},{"key":"R6","doi-asserted-by":"publisher","DOI":"10.1006\/jcss.2000.1710"},{"key":"R7","doi-asserted-by":"publisher","DOI":"10.1093\/logcom\/9.3.295"},{"key":"R8","doi-asserted-by":"crossref","unstructured":"D. Calvanese and M. Lenzerini,\n                      Making object-oriented schemas more expressive\n                      , in Proceedings of the 13th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, Minneapolis, MN, 1994, pp. 243\u2013254.","DOI":"10.1145\/182591.182620"},{"key":"R9","doi-asserted-by":"crossref","unstructured":"D. Calvanese and M. Lenzerini,\n                      On the interaction between ISA and cardinality constraints\n                      , in Proceedings of the 10th International Conference on Data Engineering, IEEE, Piscataway, NJ, 1994, pp. 204\u2013213.","DOI":"10.1109\/ICDE.1994.283032"},{"key":"R10","unstructured":"M. J. Carey, D. Florescu, Z. G. Ives, Y. Lu, J. Shanmugasundaram, E. J. Shekita, and S. N. Subramanian,\n                      XPERANTO: Publishing object-relational data as XML\n                      , in International Workshop on the Web and Databases (Informal Proceedings), Lecture Notes in Comput. Sci. 1997, Springer, New York, 2000, pp. 105\u2013110."},{"key":"R11","doi-asserted-by":"publisher","DOI":"10.1145\/78935.78937"},{"key":"R12","doi-asserted-by":"publisher","DOI":"10.1016\/j.jcss.2006.10.022"},{"key":"R13","unstructured":"A. Deutsch, L. Popa, and V. Tannen,\n                      Physical data independence, constraints, and optimization with universal plans\n                      , in Proceedings of the 25th International Conference on Very Large Data Bases, Morgan Kaufmann, San Francisco, 1999, pp. 459\u2013470."},{"key":"R14","doi-asserted-by":"crossref","unstructured":"A. Deutsch and V. Tannen,\n                      Reformulation of XML queries and constraints\n                      , in Proceedings of the 9th International Conference on Database Theory, Lecture Notes in Comput. Sci. 2572, Springer, New York, 2003, pp. 225\u2013241.","DOI":"10.1007\/3-540-36285-1_15"},{"key":"R15","doi-asserted-by":"publisher","DOI":"10.1007\/s007780100045"},{"key":"R16","doi-asserted-by":"publisher","DOI":"10.1145\/567112.567117"},{"key":"R17","unstructured":"M. F. Fernandez, D. Florescu, A. Y. Levy, and D. Suciu,\n                      Verifying integrity constraints on web sites\n                      , in Proceedings of the 16th International Joint Conference on Artificial Intelligence, Morgan Kaufmann, San Francisco, 1999, pp. 614\u2013619."},{"key":"R18","first-page":"12","volume":"24","author":"Fernandez M. F.","year":"2001","journal-title":"IEEE Data Engineering Bulletin"},{"key":"R19","first-page":"27","volume":"22","author":"Florescu D.","year":"1999","journal-title":"IEEE Data Engineering Bulletin"},{"key":"R20","unstructured":"M. Garey and D. Johnson,\n                      Computers and Intractability: A Guide to the Theory of NP-Completeness\n                      , W. H. Freeman, San Francisco, 1979."},{"key":"R21","doi-asserted-by":"publisher","DOI":"10.1006\/inco.2001.2973"},{"key":"R22","doi-asserted-by":"publisher","DOI":"10.1016\/0020-0190(80)90013-7"},{"key":"R23","doi-asserted-by":"crossref","unstructured":"D. Lee and W. W. Chu,\n                      Constraints-preserving transformation from XML document type definition to relational schema\n                      , in Proceedings of the 19th International Conference on Conceptual Modeling, Lecture Notes in Comput. Sci. 1920, Springer, New York, 2000, pp. 323\u2013338.","DOI":"10.1007\/3-540-45393-8_24"},{"key":"R24","unstructured":"Y. Matiyasevich,\n                      Hilbert's $10$th Problem\n                      , MIT Press, Cambridge, MA, 1993."},{"key":"R25","doi-asserted-by":"crossref","unstructured":"F. Neven,\n                      Extensions of attribute grammars for structured document queries\n                      , in Proceedings of the 7th International Workshop on Database Programming Languages, Lecture Notes in Comput. Sci. 1949, Springer, New York, 1999, pp. 99\u2013116.","DOI":"10.1007\/3-540-44543-9_7"},{"key":"R26","doi-asserted-by":"publisher","DOI":"10.1016\/S0304-3975(01)00301-2"},{"key":"R27","doi-asserted-by":"publisher","DOI":"10.1145\/322276.322287"},{"key":"R28","unstructured":"C. Papadimitriou,\n                      Computational Complexity\n                      , Addison\u2013Wesley, Reading, MA, 1994."},{"key":"R29","doi-asserted-by":"crossref","unstructured":"Y. Papakonstantinou and V. Vianu,\n                      DTD inference for views of XML data\n                      , in Proceedings of the 19th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, Dallas, TX, 2000, pp. 35\u201346.","DOI":"10.1145\/335168.335173"},{"key":"R30","doi-asserted-by":"publisher","DOI":"10.1007\/s007780100052"},{"key":"R31","unstructured":"J. Shanmugasundaram, K. Tufte, C. Zhang, G. He, D. DeWitt, and J. Naughton,\n                      Relational databases for querying XML documents: Limitations and opportunities\n                      , in Proceedings of the 25th International Conference on Very Large Data Bases, Morgan Kaufmann, San Francisco, 1999, pp. 302\u2013314."},{"key":"R32","doi-asserted-by":"publisher","DOI":"10.1016\/S0022-0000(67)80022-9"},{"key":"R33","unstructured":"J. Ullman,\n                      Principles of Database and Knowledge-Base Systems, Volume\n                      I, Computer Science Press, Rockville, MD, 1988."},{"key":"R34","unstructured":"W3C,\n                      Document Object Model (DOM) Level 1 Specification\n                      , W3C Recommendation, October 1998, http:\/\/www.w3.org\/TR\/REC-DOM-Level-1\/."},{"key":"R35","unstructured":"W3C,\n                      Extensible Markup Language (XML) $1.0$\n                      (third edition), W3C Recommendation, February 2004, http:\/\/www.w3.org\/TR\/2004\/REC-xml-20040204\/."},{"key":"R36","unstructured":"W3C,\n                      XML-Data\n                      , W3C Note, January 1998, http:\/\/www.w3.org\/TR\/1998\/NOTE-XML-data-0105\/."},{"key":"R37","unstructured":"W3C,\n                      XML Path Language (XPath) Version\n                      1.0, W3C Recommendation, November 1999, http:\/\/www.w3.org\/TR\/xpath."},{"key":"R38","unstructured":"W3C,\n                      XML Schema\n                      , W3C Recommendation, October 2004, http:\/\/www.w3.org\/ XML\/Schema."},{"key":"R39","unstructured":"W3C,\n                      XQuery $1.0:$ An XML Query Language\n                      , W3C Working Draft 29, October 2004, http:\/\/ www.w3.org\/TR\/2004\/WD-xquery-20041029\/."},{"key":"R40","unstructured":"W3C,\n                      XSL Transformations (XSLT) Version\n                      1.0, W3C recommendation, November 1999, http:\/\/ www.w3.org\/TR\/xslt."}],"container-title":["SIAM Journal on Computing"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/epubs.siam.org\/doi\/pdf\/10.1137\/050646895","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,8,21]],"date-time":"2026-08-21T18:22:38Z","timestamp":1787336558000},"score":1,"resource":{"primary":{"URL":"https:\/\/epubs.siam.org\/doi\/10.1137\/050646895"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2008,1]]},"references-count":40,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2008,1]]}},"alternative-id":["10.1137\/050646895"],"URL":"https:\/\/doi.org\/10.1137\/050646895","relation":{},"ISSN":["0097-5397","1095-7111"],"issn-type":[{"value":"0097-5397","type":"print"},{"value":"1095-7111","type":"electronic"}],"subject":[],"published":{"date-parts":[[2008,1]]}}}