|
Home
: XML
Learning Guide Revision Notes I
will be adding sections on XSL, Schemas, DOM and more soon. [June
25, 2001]
Getting Started With XML
The purpose of this document
is to get you well on your way to becoming an expert in XML. XML is
rapidly being included in more and more technologies and applications. The first thing I
want you to do is complete the Introduction
to XML tutorial at IBM's developerWorks web site. This should
take 5-10 minutes to complete. By the way, you might want to
bookmark IBM's
developerWorks/xml now, it is a very good resource for XML training
and tutorials.
"The Extensible Markup Language (XML)
is the universal format for structured
documents and data on the Web."
OK, that
was simple. Now let's start digging into XML a little
deeper. Your next assignment is to read the interview
with the author of "Learning
XML", Erik Ray. When you are done read "Chapter
2: Markup and Core Concepts" from his book. If you
like that book maybe you should buy it. If you want a bigger
selection of books to choose from here is a link listing all
of the XML books in print. It is maintained by the Charles
F. Goldfarb who along with Ed Mosher, Ray Lorie invented the
first modern markup language.
Ready for Some Review?If you have come this far you are already beginning to
understand a lot of things about XML. Firstly, XML is not
just an improvement on HTML. XML is a toolkit for creating
markup languages. XML is very flexible and allows you to
define your own sets of tags. XML is also "well
formed". We will learn more about what that means
soon enough. XML can be formatted to comply to certain
rules using DTD's or XML Schemas. XML can be transformed
into a variety of other formats using XSLT and XSL_FO.
O'Reilly Publishing has made use of a well know SGML standard called
DocBook to managed all of the content created by it's
authors. You should also have no trouble identifying the
individual parts that comprise an XML document such as elements,
attributes, prolog, entity declarations and the root
element. The structure of the elements in an XML
document can be likened to a tree branch structure. Be
familiar with the syntax of the XML
declaration and know what the different properties are;
version, encoding, standalone. Also be familiar with the
document type declaration syntax. The important thing here
is not to remember every little detail regarding the syntax. More
importantly, you should be aware of the various sections that
you will need to add to your XML documents when they require
it. As you practice you will become more familiar with the actual
syntax of XML.
Some Really Easy Questions (True of
False)
- The end tag must always come after the start tag?
- Start and end tags can span multiple parents?
- The following element is invalid?
<cost> < 5
</cost>
- XML gets rid of extra spaces just like HTML?
- XML always requires a closing tag?
- The following element is invalid?
<foobar
color="blue"
color="red">Blah<size/></foobar>
- DTD's can be used to restrict the range of values allowed
in an attribute?
- XML contains some reserved attributes names that you may
not use. Some begin with "xml:"?
- The keyword to declare a namespace is "xmlns"?
- DTD's are easy to use in conjunction with namespaces?
- The purpose of entities is to act as a placeholder to make
XML easier to write, maintain and read?
- There are three major entity types; parameter, general and
reference?
- The following is a valid comment?
<!-- Oh what a --
feeling -->
- A CDATA section can tell the parser that the following
section is not markup?
- You can use processing instructions to target commands to
a specific XML processer?
- For a document to be considered well formed it must have
start and end tags for all elements?
At this point if you have any questions regarding the difference between
a well formed document and a valid XML document go through the tutorial at
Generally
Markup on XML. The next tutorial I want you to go through is the
XML
tutorial at W3Schools.com's web site. This tutorial will cover
some old ground but you won't be bored. Finish the entire
tutorial. It will take around one hour if you move at a moderate
pace. The tutorials also include some cool tools that will allow you
test your XML in a browser and see the results.
Introduction to XSL
After you have a decent grasp on XML you need to start learning how to
actually do something with it. XSL, as you will learn, allows you
define styles and transform XML into other formats. The most common
of these is to take the information and transform it into an HTML
page. The process of transforming (parsing) the document can occur
on either the client or server side. The server side is of course
the most robust method. To begin learning about XSL go through the XSL
tutorial at W3Schools.com. Next read Chapter
14 of the XML Bible, "XSL Transformations".
Additional Links
DevGuru's
XMLDOM Index
W3Schools
DOM School
Mulberry
Technologies Quick References for XML and XSLT
XSLT
Reference at Zvon.org XQL
Faq
|