|Lesson 3|| Define Metalanguages |
|Objective||Describe what a metalanguage is. |
Define XML Metalanguages
Defining a markup language
Using XML, you can define a set of elements that may be used to describe a customer, a purchase order, a mathematical formula, a chemical compound, or any other physical or logical entity of interest.
The set of elements you define may then be used to describe many specific instances of that entity.
For example, you can describe a purchase order using the following set of XML elements:
Notice that XML does not use a fixed, predefined set of elements as HTML did.
Each purchase order defined in the XML document is an XML document instance and is described using this set of elements. In this example, the same set of elements may also be used to describe purchase orders
1006, 1007, and so on. For each purchase order described with these XML elements, the values included in the elements may change.
Since XML is used to define markup languages, once you have defined a markup language, you may use a markup language to define rules for creating XML documents.
These rules are specified using a Document Type Definition, or DTD.
The DTD is used to validate XML document instances that use the markup language you have defined.
DTDs will be discussed in detail later in the course.
In the next lesson, you will examine some of the limitations of HTML.