|
|
||
|
|
||
|
|
||
XML is flexible and technically can have subset vocabularies built on top of standard XML syntax and structure. What this allows is for standard practices to be set for a particular industry, discipline, or application. And these different vocabularies are all based on XML syntax, which as you already know is more or less platform independent and
In general, vocabularies can be divided into two main groups:
Application-specific XML vocabularies, which are shared across multiple industries and disciplines
As you can see in Figure 14-1, there are a
Further details on vocabularies shown in Figure 14-1 can be found at www.service-architecture.com .
Figure 14-1:
XML vocabularies for applications and specific industries
Lets pick one of the vocabularies shown in Figure 14-1. The MathML (or Mathematics XML) seems like a
Figure 14-2:
The elements of MathML (Mathematics XML)
Figure 14-2 shows some of the Mathematics XML elements as listed on the W3C specification website for MathML. The elements important to your understanding in this book are as shown in Figure 14-3.
Figure 14-3:
The basic elements of MathML
The topics of this book are XML and databases, not mathematics. This why many of the items in Figure 14-2 are grayed out, and also why only a small number of all the elements in MathML are covered here. I am simply trying to
x + y
The
<math xmlns="http://www.w3.org/1998/Math/MathML">
</math>
Next, you
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
</mrow>
</math>
Now you add the first variable, x :
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi> x </mi>
</mrow>
</math>
Then you add the second variable, y :
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi> x </mi>
<mi> y </mi>
</mrow>
</math>
And finally, you add the operator between the two
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi> x </mi>
<mo> + </mo>
<mi> y </mi>
</mrow>
</math>
This makes sense. All you are seeing here is that a specialized syntax of XML is being used to interpret a specialized topic or language. In this case, you are attempting to write mathematical expressions into XML, using a specialized form of XML called MathML. The resulting MathML XML documents can be passed between many different mathematicians, and even computers, and be universally understandable by all (persons and computers). It
As already stated
ad infinitum
throughout this book, the
Figure 14-4:
A news feed XML website
I clicked the first XML link, as shown in Figure 14-4, and got the result shown in Figure 14-5. You may get an error from clicking this link, depending on which browser and operating system you are using.
Figure 14-5:
A news feed using an industry-specific XML vocabulary
Figure 14-5
Another, perhaps more fun example might be one called Astronomy Instrument Markup Language (AIML). AIML can be used to denote the way in which astronomical instruments are managed. This includes instruments such as telescopes,
Figure 14-6:
A NASA-based web page for AIML (Astronomical Instrument Markup Language)
I then clicked in the example, as shown in Figure 14-6. I got an error because the DTD file is non-existent (even with the suggested change shown in Figure 14-6). So, I downloaded the XML document indicated by the link highlighted in Figure 14-6, commented out the DTD file specification in the XML file, and executed in my Internet Explorer, as shown in Figure 14-7.
Figure 14-7:
An example AIML vocabulary document
|
|
||
|
|
||
|
|
||