RE: [xsl] Help: Reasons to use XML/XSL ?

Subject: RE: [xsl] Help: Reasons to use XML/XSL ?
From: "Karl J. Stubsjoen" <karl@xxxxxxxxxxxxx>
Date: Wed, 19 May 2004 08:11:34 -0700
XML and XSLT have completely changed the way I approach internet
applications.  In fact, to the degree that I have avoided much of the .NET
development only because my intrigue with these two technologies was
overwhelming!

Server-side processing language gives you much flexibility in terms of
applying logic upfront.  XSLT takes this to a whole nother level.  Before
XSLT (for me) HTML was a dead horse, and if I wanted to get crafty with it,
I had to intertwine the HTML code with my server-side code.  This gets messy
messy messy, and further complicates the server-side code.  XSLT allows for
full separation of presentation and server-side processing.  Not just that,
but XSLT allows you to *program* (I call it that) at the presentation level.
Some scenarios:

 - If value "A" is greater than value "B" -- make the cell background red

 - If time "B" is earlier than time "A" -- reverse the output of my row set,
show time "B" data first

 - Use XSLT/XPATH as a means of looking up header data for any given field
or value in database
    Like all the state in US... values stored in DB might be "AZ","CA",
etc... an XML source could contain the long values of these state
abbreviations and XSLT could look them up as your are writing the
presentation.

 - 3 columns, 4 columns, 5 columns, xx columns?  XSLT easily handles the
logic behind such dynamic display of tables.

I'm only beginning to scratch the surface of what XSLT / XML can do for your
web applications.  And these are all of a simple nature... I can't imagine
what others are doing with this technology.

Simply, IT ROCKS!!!!


Karl



-----Original Message-----
From: Jarrell Dunson [mailto:Jarrell_Dunson@xxxxxxxxxxxxxxxxxx]
Sent: Wednesday, May 19, 2004 6:16 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Help: Reasons to use XML/XSL ?


Hey,

Thanks ahead of time to each of you for reading this.

I'm an XSD, XML, XSLT Newbie....and am trying to learn the process.
However, I really need some input - not from a programming perspective,
but from a philosophy and usage perspective.


For instance, I'm a current user and programmer of Perl...using SQL, CGI,
and Perl DBI for pulling information from an Informix Relational Database.
 I'm able to pull data out of a database quite easily...via Perl
DBI/SQL...and format it with Perl into quality HTML pages. ..and the
process is rather efficient.

For HTML, I can build the pages via wriing the code myself, or using Perl
script, etc,  I can also, at times, use a text editor (or text editor
assistant / html formatter) to build basic html and modify it as needed.
[Instead of coding a table by hand, for example, I'll use an editor
assistant (such as Dreamweaver, or Notetab) to create all the code for a
3x4 table...and then modify and/or populate the HTML as needed].

So for this process, I'm going from database ...via Perl script...to HTML.


In learning XSD, XML, XSLT, however, I just don't see the advantage of it?
 What more does XSD, XML, XSLT give me as a programmer?


For me to do the same steps....to go from a database to web page, it seems
to me that I have to take three [or four] more major steps...each
involving a more complicated process. From my beginner perspective, I have
to build a XSD...and then a matching XML - based upon the XSD (validating,
etc.).  For output, I have build the output leg, XSLT (transforming the
XML, etc)....to get the same results.  I just don't see the advantage.

In my current programming, I'm using one scripting process

	DATABASE -->  [1] Perl/DBI (using SQL) --> To HTML/Web Page


In using XML, I need  three (or four) processes:

	[1] Build XSD first.  Then:  DATABASE --> [2] Perl/DBI (using SQL) --> To
XML.  Then,
	[3] Build an XSLT --> [4] Transform the XML via XSLT --> HTML/Web page


Isn't this far more complicated?

Granted, I could see advantages if I were outputting my data in different
ways...say, one of my outputs was for the Internet, another for a PDA,
another for an RSS feed....etc.

OR, I could possibly see  advantages [per the claims I've heard from big
corporations] if I were a great business enterprise...and all my data
needed to be standard...and I needed to use my own mark-up language -
though I'm not fully convinced of this.

But for simple processes....from database to web, I just don't get it  It
seems far more complicated, and [other than buiiding my resume skills]
raises the question if it's worth...

So, for an uneducated newbie, can you help?  I've learned XSD...and
XML...and am working on the XSLT, but I haven't seen enough to "buy into
it".  What's the real benefit of learning and using XSD, XML, AND XSLT?  -
especially over a simple process like Perl/DBI....and why ?




THANK YOU ahead of time,

Jarrell



Jarrell R. Dunson, III
Asbury Theological Seminary
Administrative Computing Coordinator
Jarrell_Dunson@xxxxxxxxxxxxxxxxxx
(859) 858-2379 (direct)
(859) 858-2330 (fax)

Current Thread