Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I'm getting to grips with XSLT at the moment, and not loving the O'Reilly book, I'd have to say.

But I realised this morning that one problem is that I don't really have a little picture in my head of what XSLT does.

XSL Transformations, as everyone is careful to tell you, are very much not procedural, but they're not really like OO programming as far as I can see, although it's all about objects. You aren't even guaranteed that your elements come out in document order, right?

So, I have a mental picture of what happens when perl does

while(<FH>)
which is like the file being fed through a machine, say a grinder, and I have a mental picture of how regexes work, which involves a team of ants crawling along strings (some of them stay behind to mark the places when alternation is involved) and so on.

Objects, I've decided, get fed their methods, bulge a little, then spit something out. All you get to see is the mouth.

But I don't have a mental model of an XSLT transformation.

Has anyone else? It's all about Trees, so do you see a monkey climbing the tree and picking the elements off as fruit?

I know I can't be the only one who needs a visual, no matter how strange, in order to think through these kinds of things

... can I?

<crickets heard in distance>



($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print

In reply to What's Your Mental Image of XSLT? by Cody Pendant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-03-28 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found