![]() | |||||||||||||||||||||
![]() |
|
|
by Derrald Farnsworth-Livingston
Introduction
XML (eXtensible Markup Language) and XSL (Extensible Stylesheet Language) have been created from the necessity of having a structured, defined method of exchanging data. By utilizing XML information that can be pulled from other sources is changing the way we exchange data. Let's say that information is available from another source, and we want access to that data but, do not necessarily want the visitors that are currently on our website to leave our site. Basically, all we want is to integrate some of the information available from the other source with our website. A couple good examples are libraries of free available information or listings of some sort. Information that is formatted so it is in structured XML form makes it easy for us to access the data and then to format this data. XML Data is normally formatted into HTML form using what is known as XSL. XML and XSL are brothers from the same family. XML and XSL are both case sensitive and very structured and unlike HTML require that opening tags be closed in order.
For example this is allowed in HTML:
This of course is unacceptable in XSL for several reasons.
1. There is no ending font tag.
The correct form for XSL:
With a little bit of structure an HTML programmer can easily program XSL. We have not yet seen the true power of XSL, however. XSL was created with the purpose of displaying XML data. This data can be retrieved from a static file, a database, or another website. With this dynamically generated websites can be easily formed and manipulated.
We All Need structure
First, we will look at actual XML data. The following is a snippet from an actual XML document that is implemented on this website, this file is named example.xml. If you have Internet Explorer 5.0 and above you can look at the actual XML file by clicking the link.
This exemplifies how each element is carefully structured. Elements can reside within other elements to create a nesting of information. For instance, the total element "tutorial" contains several children elements such as "title" and "sections" and even "sections" contain sub-elements. This gives the data a very hierarchical type feel. The important thing with this data though is that it is structured. Each beginning element name is encased within <> and each ending within </>. The elements are opened and closed in the correct order and the names are all in the correct cases.
|
Section 2: XSL Power! Section 3: Same Difference Section 4: XSL+XML+ASP=HTML
| ||||||||||||||||||||||