Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 4180))

  • 326 Accesses

Abstract

In Chapter 1 we have briefly discussed the basics of validating XML documents by document type definitions (DTDs) and schemata. In this chapter, we will instantiate this discussion with the particulars of validating OMDoc documents.

Generally, DTDs and schemata are context-free grammars for trees, that can be used by a validating parser to reject XML documents that do not conform to the constraints expressed in the OMDoc DTD or schemata discussed here.

Note that none of these grammars can enforce all constraints that the OMDoc specification in Part III of this book imposes on documents. Therefore grammar-based validation is only a necessary condition for OMDoc-validity. Still, OMDoc documents should be validated to ensure proper function of OMDoc tools, such as the ones discussed in Chapters 25 and 26. Validation against multiple grammars gives the best results. With the current state of validation technology, there is no clear recommendation, which of the validation approaches to prefer for OMDoc. DTD validation is currently best supported by standard XML applications and supports default values for attributes. This allows the author who writes OMDoc documents by hand to elide implicit attributes and make the marked-up text more readable. XML- and RelaxNG schema validation have the advantage that they are namespace-aware and support more syntactic constraints. Neither of these support mnemonic XML entities, such as the ones used for Unicode characters in Presentation-MathML, so that these have to be encoded as Unicode code points. Finally RelaxNG schemata do not fully support default values for attributes, so that OMDoc documents have to be normalized to be RelaxNG-valid.

We will now discuss the particulars of the respective validation formats. As the RelaxNG schema is the most expressive and readable for humans we consider it as the normative grammar formalism for OMDoc, and have included it in Appendix D for reference.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Kohlhase, M. (2006). Validating OMDoc Documents. In: OMDoc – An Open Markup Format for Mathematical Documents [version 1.2]. Lecture Notes in Computer Science(), vol 4180. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11826095_28

Download citation

  • DOI: https://doi.org/10.1007/11826095_28

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-37897-6

  • Online ISBN: 978-3-540-37898-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics