Fog Creek Software
g
Discussion Board




Quick and Dirty XSLT Guide?

I have some good experience with classic ASP and PHP, interacting with databases to display content on a website, etc.  At work here we have a content management tool that is based mostly in XML using XSLT to define the layout.  We are in the process of migrating from this tool, but I have to support it in the meantime, and the guy who wrote it is not available to hold my hand or do it himself.

Anyone know of any good websites/tutorials that have a succinct guide to XSLT?  Specifically something like a chart that would tell me some of the quick and dirty things I need to know like how I find comparable functions or tags to what I'm used to in ASP and PHP.  Like, how do I loop through records?, how do I reformat strings?, how do I get the date and format it? etc.  The stuff I've found so far has not really been helpful to me.

Is XSLT too complicated for something like that to be out there, or is there something that will help me get ramped up quickly - using my current knowledge as a basis?

Clay Whipkey
Thursday, May 27, 2004

Some of the stuff you describe is pretty tricky to do in XSLT.  To do some of the trickier things like string and date formatting, I would recommend looking into the XSLT Standard Library: http://xsltsl.sourceforge.net/

Oren Miller
Thursday, May 27, 2004

You want the O'Reilly XSLT book by Doug Tidwell.

http://www.amazon.com/exec/obidos/tg/detail/-/0596000537

I haven't found any websites that even come close.  Reading that book over a weekend enabled me to be productive.  I still find myself hitting it on a regular basis.  A quick function reference would be really nice too (I haven't found one yet though). 

K
Thursday, May 27, 2004

The reference here: http://www.zvon.org/o_html/group_xsl.html is really good.  I would guess that the tutorials will be too, but I haven't tried them.  It sounds to me like the stuff that you want to do shouldn't be too hard as long as you can avoid thinking procedurally.  XSLT is declarative and works much better if you treat it almost like a functional language.  Like Oren said there isn't a lot of string manipulation in the standard, but if you're coding for one specific engine and don't care about portability there's typically a lot more that you can use.

r1ch
Thursday, May 27, 2004

http://www.w3schools.com/xsl/default.asp

That's the one I'm using.

Andrew Burton
Thursday, May 27, 2004


Pick up anything by Elliot Rusty Harold.

I have his "XML Bible" from 2001 that I picked up to learn it back then.

KC
Thursday, May 27, 2004

Check out Jeni Tennison's work.
http://www.jenitennison.com/xslt/index.html

Interaction Architect
Thursday, May 27, 2004

I learnt a lot of good stuff from

http://www.dpawson.co.uk/xsl/xslfaq.html

Aussie Poster #7
Thursday, May 27, 2004

Thanks for the replies, all.  I will check those out.

Clay Whipkey
Friday, May 28, 2004

*  Recent Topics

*  Fog Creek Home