Here is an example of an XSQL page where three attributes are used: <connec- tion>, <xmlns:xsql>, and <tag-case>. <?xml version=”1.0”?> <page connection=”demo” xmlns:xsql=”urn:oracle-xsql”> <xsql:query tag-case=”lower”> select * from emp </xsql:query> </page> Syntax Nitty-Gritty You know almost everything that you need to know to create well-formed XML docu- ments. There are a couple of rules that you haven’t seen yet, though. This section acts as a review of the rest of the syntax rules. The most common restrictions that you will encounter involve the names of elements and attributes. This is covered first. XML, like most languages, has reserved characters. Sometimes, you’ll want to use these, so you’ll learn how. One option you’ll learn about is the CDATA entity, which allows you to define special sections of character data. The final section here covers XML comments. There is one instruction that isn’t discussed here: <!DOCTYPE>. It is used to specify a Document Type Definition (DTD), a type of schema. Before covering the rest of the syntax rules of XML, let’s review the syntax rules that have already been covered: nn You must have an XML processing instruction at the top of the document. nn There can be only one root element. nn Start tags must have matching end tags, and vice versa. nn Tags must be nested correctly. nn A particular attribute can appear only once per element. nn Attribute values must be enclosed in single or double quotes. Element Name and Attribute Restrictions Element  names  and  attributes  share  the  same  restrictions.  Both  must  be  composed entirely of the same set of characters. This set consists of all alphanumeric characters, the  underscore,  and  the  period.  The  colon  is  also  valid,  but  has  special  meaning— you’ll learn more about that when XML namespaces are discussed. A name or attribute can only start with an underscore or a letter. The last restriction is that no name or attribute may begin with the string xml. Case-insensitive Table 1.2 gives examples of legal and illegal strings. 18 Chapter 1 271209 Ch01.F  12/9/02  2:00 PM  Page 18