Why Reference Is Important

Establishing standards have been an important part of our interactions as humans for a very long time. The necessity of standard weights and measures comes from the need to standardize trade; and the need to standardize XML is really no different.

The idea behind XML, after all, is to be able to exchange information independent of applications and systems. If you have an XML-based application and a document with a DTD, you can exchange that document with any other system capable of handling XML. You can do that because of the XML v.1.0 Recommendation from the W3C. If we didn't have that recommendation to base our XML documents on, we would quickly encounter incompatibilities.

For example, let's take a quick look at end tags. If we are basing our tag structure on something we are familiar with, such as HTML, our tag pairs will always look something like this:

<TAG></TAG> 

So, we have a beginning tag, and then use the slash (/) to denote an ending tag. But HTML also includes some tags that do not have ending tags:

<BR> 
<P>

Because HTML (and SGML) allows for the omission of end tags, in certain circumstances, there is an opportunity for confusion. In XML, only empty elements do not require end tags, and even those tags use a special syntax:

<empty/> 

In the XML format, a tag that is empty has the slash appended, which denotes that it is empty. Specifying this type of information is exactly what a standard is for; to eliminate confusion and to ensure that everyone uses the same conventions in their documents.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.16.23