Xopus and HTML

And the value of using XML

Most likely the structure of your information is not the structure of HTML, and therefore it is a good idea to be more specific and explicit about your information and put it in your XML.

This document explains the differences between HTML, HTML as XML, the use of HTML as a way of saving information, and XML as a better way of saving information.

HTML

HTML is the standard for information on the Internet. Using HTML as a way to save information has become popular too as HTML provides a certain standard for the structure of information. As long as your information fits into the structure of HTML you should use HTML.

For example HTML defines headings as H1, H2, ... , H6, paragraphs, lists, and more standard information structures known from Microsoft Office.

This structure is good for saving documentation, web-content, Word-like documents and more types of information that consists of title, paragraphs, lists, and perhaps a few other elements. A simple HTML document might look like this:

<html>
<head>
<title>My information</title>
</head>
<body>
<h1>HTML supports six levels of heading</h1>
<p>HTML has one type of paragraph.</p>
</body>
</html>

HTML can be saved as XML, as long as it is properly well-formed. Therefore it can also be used as way of storing information. It can be re-used and enjoys all the benefits of XML.

Information

Even though a lot of information fits into the HTML structure, most information probably is slightly different and customized for some specific purpose. So when HTML is used to store, and therefore describe information it might look like this:

...
<p>
A normal paragraph can be used everywhere.
</p>

<p class="extrainformation">
The class extrainformation is used to show that this paragraph is special, and because of its class it can be used differently in the XSL rendering of the information
</p>

<p class="footer">
This 'footer' is also really a paragraph pretending to be something else.
</p>
...

Classes are used to describe the contents of the paragraph.

However your information is most likely much more specific, and subject to far more rules. The aim of saving information in XML is the re-usability of it. Through the use of XML you can extend you information to beyond the structure of HTML. You can make your own structures.

XML

As you can see, it is easy to mis-use HTML as a form of XML. XML however, used properly would look like this:

...
<paragraph>
This is an actual paragraph of information.
</paragraph>

<extrainformation>
More specific information should be stored in specific elements.
</extrainformation>

<footer>
A footer is just a footer, and not defined through a meta-information value.
</footer>
...

XML allows information to be truly semantically structured. It uses XSD (Schema) to clearly and strictly define the structure for the XML. Thus XML information can be specifically tailored and customized to whatever the developer/user wants. The information becomes clearer to read, and there is no hassle of trying to fit it into the structure of HTML. It is the perfect representation of your information.

Having your own structure allows you to do anything with it. You can make HTML out of it for web pages, use it for print, and much more. Using HTML as your database structure can cause problems as the output is different for each browser. For example a <p/> and a <br/> element practically do the same, but when printing will create a significant difference.

The control over information is much finer and friendlier through the use of XML.

Using Xopus

If you plan on using Xopus, please think about what information you have, and how specific you can be about that. We can help you think about the structure of your XML.

Comments

There currently are no comments on this page.

Your comments will be added to the forum.

HTML will be shown as HTML code.
Linebreaks and Links starting with http:// are automatically resolved