I find interesting:
Incorporating XML Content
Into Your Web site (ASP)
The first thing I notice about
this article is that it is for
ASP. I assume he means
Active Server Pages, a
Microsoft technology.
The author puts ASP in
the title of his article.
The next thing I notice is that
you need a URL for your feed.
This makes sense. No URL, no
feed.
Ah! Here's another key element.
A way to format the XML.
I had not thought about this. I
had assumed that you need to parse
the XML and then turn it into
well-formated HTML.
I'm being shown another approach
here. It appears that the XML
is being left as is and another
language, XSL, is being
used to format the XML.
Here's a Wikipedia article on
XSL:
Extensible Stylesheet Language
OK. I'm starting to understand
now. A basic application of XSL
is to transform XML into
HTML.
The implications of this are huge.
This means you can load XML into
an HTML div element and
you don't have to parse it yourself.
You just simply load it and let
XSL interpret it for the browser.
I'm getting way ahead of myself
here. However, I think this is
what is being said.
Towards the end of the article,
the author says that you can
use either PHP or ASP
to parse the XML.
OK. Let me think this through.
Both PHP and ASP
are server-side languages that
are embedded in the web server
in some fashion.
So now I understand. There's
a module of some kind that does
the XML parsing for you.
However it is XSL that
sets up the rules for how the
transformation from XML
to HTML takes place.
This is making total sense.
I'm learning a new language here.
I'm learning about transformations.
Specifically, I'm learning about
XML Transformations.
In life, one thing leads to another.
Now that I know the central issue
when embedding an XML feed into your
webpage is an XML transformation,
I'm much better prepared to cope.
I now know to search on XML
Transformations if I wish to
learn more.
An assumption I made at the beginning
of this post turns out to be
incorrect. I had thought that it
was the browser that does the
XML tranformaton.
Obviously not true for many different
reasons.
One reason it is not true is that
both PHP and ASP are
server-side. Therefore, it must
be the web server that transforms
XML into HTML.
Another reason is common sense. It
would be a horrible horrible browser
compatibility issue if every browser
did its own XML transformation.
It makes much more sense to do the
XML transformation in one place
and that one place would logically be
the web server.
A final reason for doing the transformation
on the web server is adoption. If
XML transformations took place in the
browser, you would have to get everyone
who makes a browser to go along.
In other words, every web browser would
eventually have to adopt XML transformations
along the lines of some standard.
Not likely.
So, for many many different reasons, XML
transformations are a server-side
phenonema, not a client side one.
OK. I'm wrong again.
Turns out that an XML transformation can
be either client or server. Turns out
that you can also use Javascript to
accomplish an XML transformation.
However, I think that it is probably the
case that most transformations are done
on the server side.
One advantage of doing an XML transformation
on the client side is that you off-load the
processing on to the client. In other words,
the client does the heavy lifting, thus saving
your server slow-downs and wasted machine
cycles.
A severe disadvantage to client-side XML
transformations is that the client (the
web browser) has to have Javascript enabled.
As you can see, I know very little about this.
However, I'm fast learning about XML transformations.
Here's what I think I've learned so far.
I'm a newbie, so all of this is subject
to change:
- ASP can be used to do an
XML transformation on the
server-side - PHP can be used to do an
XML transformation on the
server-side - Javascript can be used to do
an XML tranformation on the
client-side
If this means nothing to you,
think of it this way. Either
the web browser or the
web server does the
tranformation which turns your
web feed into a web page.
Ed Abbott