XSLT... is it worth it?

M

Marious Barrier

I use to use my own parser, which uses a tag-like language to put
content retrieved from PHP. it has print tags, foreach tags, if tags,
etc... It’t only function is to take strings from php and place them in
the HTML I am going to deliver.

....now, is it worth it to learn XSLT? any comments about this
technology? advantages, cons, etc... in which cases should I prefer it
over other alternatives? is it better than others? all those things. Thanks.
 
J

Joe Kesselman

...now, is it worth it to learn XSLT? any comments about this
technology? advantages, cons, etc... in which cases should I prefer it
over other alternatives? is it better than others? all those things.
Thanks.

Depends on what you want to do. XSLT is a query and reporting language
-- unlike CSS, it can gather data from all over the document, reorder
it, completely change its structure, and so on.

If your goal is just to do value insertion into boilerplate HTML which
has specific insertion points (which won't be changing, or which will
always be tagged), XSLT is arguably overkill. If your goal is to do
formatting of the document and data based on what those values are, XSLT
lets you write the logic for that at a declarative level rather than a
procedural level.

I believe there are some good intro-to-XSLT articles on the
DeveloperWorks website (http://www.ibm.com/xml). Looking at those will
give you a better sense of what XSLT looks like and what it can do --
after which you can decide whether what it does is useful to you.

--
Joe Kesselman,
http://www.love-song-productions.com/people/keshlam/index.html

{} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
/\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."
 
J

John Redmond

I agree with Joe. Remember that 'T' stands for transformation, meaning
that the structure, and perhaps content, of the new document will be
quite different. But XSLT means that you will have to come to terms with
a declarative style, which can be a new way of thinking.

My view is that the best excuse for using XML in the first place is that
you can process it with XSLT!

John Redmond
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top