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 :)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.