DTD_Notes_-_updatesp1 (1)

DTD_Notes_-_updatesp1 (1) - Introduction to XML Is a...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction to XML Is a Well-formed XML Document Valid? Is a Well-formed Document Valid? An XML document is said to be well-formed if it follows all of the "rules" of XML, such as proper nesting and attribute use, so by definition all XML documents are well-formed. A valid document, on the other hand, is one that is not only well-formed, but also follows the restrictions set out in a specific grammar, typically specified in a Document Type Definition (DTD) or some form of XML Schema. Is a Wellformed Document Valid? An example of a document that is well-formed but not valid based upon the XHTML grammar. <body> <p> Example of Well-formed HTML </p> <head> <title> Example </title> </head> <zorko> What is this? </zorko> </body> Why? HTML vs. XML In the case of HTML, browsers have been taught how to ignore invalid HTML such as the <zorko> element and generally do their best when dealing with badly placed HTML elements. The XML processor, on the other hand, can not tell us which elements and attributes are valid. As a result we need to define the XML markup we are using. To do this, we need to define the markup languages grammar. Introduction to XML Tools Used to Create XML Languages Tools of the Trade There are numerous tools that can be used to build an XML language some relatively simple, some much more complex. They include: DTD (Document Type Definition) RELAX TREX RELAX NG XML Schema Schmatron DTD The Document Type Definition, a direct descendant of SGML. DTDs are what are used to describe HTML and XHTML in addition to other markup languages. DTDs possess their own special notation which is were we will start. RELAX Written by Dr. Murata Makoto . RELAX stands for Regular Language description for XML It is a simpler notation for describing markup grammar than XML Schema. Like XML-Schema, it is also XML-based. Resources : http://www.xml.gr.jp/relax/ http://www.xml.gr.jp/relax/html4/howToRELAX_full_en.html TREX Designed by James Clark . TREX stands for Tree Regular Expressions for XML TREX is a simple, concise notation. Resources : http://www.thaiopensource.com/trex/ http://www.thaiopensource.com/trex/tutorial.html RELAX NG Created by James Clark and Dr. Murata Makoto . RELAX NG stands for RELAX Next Generation . RELAX NG is a convergence of the RELAX and TREX grammars. Resources : http://www.oasis-open.org/committees/relax-ng/spec-20011203.ht http://www.oasis-open.org/committees/relax-ng/tutorial.html XML Schema Developed by the W3C initiative. It is an XML-based markup language used to describe grammar....
View Full Document

Page1 / 116

DTD_Notes_-_updatesp1 (1) - Introduction to XML Is a...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online