Databases Reference
In-Depth Information
For example, a database of online articles may contain elements that reference an
external library classification standard called the Dublin Core (elements like title,
author, and subject from traditional topic cataloguing), tags for RSS feeds (Atom),
and additional presentation elements ( HTML ). By noting they're in the Dublin Core
namespace, all cataloguing tools can be set up to automatically recognize these ele-
ments. Reusing external standards instead of inventing new tag names and constantly
remapping them to external standards makes it easier for external tools to understand
these documents.
Though useful, namespaces also have a cost. Tools that use multiple namespaces
need to be aware of multiple namespaces, and developers need training to use these
tools correctly. Namespaces are controversial in that they add an additional layer of
complexity that's frequently not necessary in simple domain documents. Since single-
domain documents are used in training development staff, namespaces may seem
unnecessary and difficult to understand when first introduced. Without proper tools
and training, developers can become frustrated with documents that contain multiple
namespaces.
If you're familiar with the format of a web page that uses HTML , you'll quickly
understand how XML works. Figure 5.2 shows a sales order with XML markup.
Figure 5.2 A sales order in XML markup format. The file begins with a processor
instruction that indicates what version of XML the file uses, as well as what character
encoding system is used (UTF-8). Each element has matching begin and end tags. The
begin tags start with < and the end tags start with </. The sales order includes all of
the items within the document, so no primary for foreign keys are needed. To generate
a full report that includes item names or descriptions, a product lookup function can be
used to convert the item ID into a full product description. This product lookup function
would replace a join statement. The product lookup function extracts product
information from another XML file.
Search WWH ::




Custom Search