Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I tend to think of XSLT as tree walking but with a twist. I find that model keeps me sane for the simpler templates.
Each template is really made of smaller templates, which in turn can be made of smaller (etc). In my mental model I match my tree walking to my templates, so for large general sections of the tree I have larger, general templates (if you see what I mean). So I guess I map fragments to fragments like two bits of velcro or two bits of a sandwich (or something). I find that where it begins to get hard is when you start to do node processing using XPath. Really XSLT and XPath go hand in hand and its hard to get anything complicated out of XSLT without having a good grounding in XPath. However, this is where I think XSLT can fall down, I have had to write some very complex XPath queries that I know most of the content developers wouldn't have a hope of producing - hence, at work, I'm one of the only people to use it. I got the O'Reilly stuff too and I don't think they are much good (but thats my PERSONAL opinion ;) ). I'd search the web for XPath tutorials and play with a self generated XML document for an afternoon. Just my 2p :) In reply to Re: What's Your Mental Image of XSLT?
by simon.proctor
|
|