freecats-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freecats-Dev] XML basics - a simple explanation for non-hackers


From: Henri Chorand
Subject: [Freecats-Dev] XML basics - a simple explanation for non-hackers
Date: Thu, 27 Nov 2003 16:25:29 +0100

Hi all,

The last issue of the newsletter "Woody's OFFICE Watch" comes with a nice
explanation of XML for newbies. Its original context is about the XML
features in the next Office release, but this perspective does not mind
here.

I think it's worth reading in that it demystifies the whole thing a bit.
Experienced developers don't need to care, but they might also appreciate
its clarity (and possibly spot mistakes...)


Cheers,

Henri

<address@hidden>
À : <address@hidden>
Envoyé : mercredi 26 novembre 2003 23:39
Objet : WOW #8.47 - XML in Office 2003 part 3


> ____________________
> 2. SCHEMAS: VALIDATION IN XML
> If you've read this far, you're probably thinking, "This XML stuff is dirt
simple. What's so hard about elements and attributes and namespaces and
comments and processing instructions?"
>
> If that's what you're thinking, you're exactly right. XML data files are
amazingly easy to interpret. They're easy to create, too. In fact, in case
it hasn't occurred to you, you could fire up Notepad and in no time at all
type up the complete contents of the sample XML file listed above. Then you
could save the file with an xml extension and your first XML data file would
be under your belt. Ideally you'd be wearing a black belt at the time,
because you would be a master of the form.
>
> In the world of XML, though, data files are just a foundation. To
experience the real power of XML in Office and elsewhere, you need to
understand two other types of files: schemas and transforms.
>
> That's the bad news. The good news is, schemas and transforms are xml data
files, so you can read them the same way you read any other xml data file.
>
> NOTE: Because schemas and transforms contain xml data, you'll sometimes
see them stored in files with .xml extensions. More commonly, though, you'll
see schema files with an .xsd extension, which stands for Xml Schema
Definition. You'll see transforms more commonly with an .xsl extension,
which stands for eXtensible Stylesheet Language. (Don't let the terminology
scare you. Technically speaking, extensible stylesheet language isn't a
separate language from XML. Rather, it is more like a specialized XML
vocabulary.)
>
> According to Webster, a schema is a structured framework or plan or a set
of rules. That's exactly how the term is used in the world of XML, too. That
is, a schema is a file that describes the structure of an XML data file and
the rules for what kind of data can be stored there.
>
> Software programs rely on schemas to determine whether an XML data file
conforms to the structure and rules established for it. A file that conforms
to the structure and rules is considered "valid." The process of checking a
file's validity is known as "validation."
>
> Let me repeat: The structure of a body of data and the rules governing
that data can be described in a schema. Based on that schema, a software
program can detect whether your data is valid.
>
> This is a WATERSHED EVENT in the history of computing! Up until this
point, software applications had no way of knowing whether your data was
valid. The validity of your data was up to you and to you alone. Not
anymore!
> ____________________
>
>
> FastForward from Cingular
> Forward your mobile calls to any home phone and stop searching for your
mobile phone. Learn More
> http://mocda.com/1/c/23071/144264/318816/318816
>
> ____________________
> 3. TRANSFORMS: CONTROLLING APPEARANCES
> A transform is a file that tells how to transform the contents of an xml
data file for presentation to users. The process of transformation can
include filtering data to remove elements that aren't needed or aren't of
interest, sorting elements of data into a particular order, formatting
elements in a particular way, and/or adding material to help users better
understand the data.
>
> Think about what this means: Up until now, there hasn't been a method for
describing how to transform a file for presentation to users. As a result, a
file of data was always presented to all users in the same way. If you
wanted to present a body of data in two different ways to two different sets
of users, you had to clone your original file and alter the clone
independently of the original.
>
> Now there's a machine-readable method for describing how to transform a
file for presentation, which means your computer can do the transformation
for you. And since computers are fast and don't get tired, you can develop
as many transforms as you want and switch from one to another with a click
of your mouse. Best of all, you'll never again need to clone your data
files. Instead, you can keep your data in a single file and simply transform
it in different ways for presentation to different audiences.
>
> NOTE: It's no accident that the development of XML was followed almost
immediately by the development of schemas and transforms. Computer
scientists have been seeking ways to automate the validation and
transformation of data for decades. Neither of these processes could be
automated until data itself became more consistent and predictable. Thanks
to XML, now nearly any kind of data can be 100% consistent and predictable,
so the barriers to automation have fallen away and schemas and transforms
are at last a reality.
>
> One of the benefits of storing schemas in separate schema files and
transforms in separate transform files is that this arrangement makes it
possible for XML data to be managed by content experts, while validation
rules can be managed by experts in data structure and transformation rules
can be managed by experts in presentation.
>
> Office Professional Edition 2003, for example, enables you to create
complex, 100% valid XML data and to present the data powerfully and
effectively to a variety of audiences even if you have no idea what's inside
a schema file or a transform file.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]