Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: What's Your Mental Image of XSLT?

by Aristotle (Chancellor)
on Jul 22, 2006 at 20:30 UTC ( [id://563046]=note: print w/replies, xml ) Need Help??


in reply to Re: What's Your Mental Image of XSLT?
in thread What's Your Mental Image of XSLT?

Having now written a fair bit of XSLT, all I can say is that this is such a grandiosely melodramatic image as to be ridiculous. It’s as if someone was composing an intricately elaborate image of how writing Perl was like herding cats that chase mice running over wires in order to produce just the right line noise to get a working program – or some such absurd preconceived notion.

The problem is, I’ve never seen introductory material that manages to do proper justice to the language in its unmatched expressiveness and conciseness when manipulating XML documents. Most people get blinded by the superficial verbosity of the syntax as expressed in XML – which I hate as much as anyone –, and never realise the beauty and elegance of the semantics that the syntax expresses.

Makeshifts last the longest.

  • Comment on Re^2: What's Your Mental Image of XSLT?

Replies are listed 'Best First'.
Re^3: What's Your Mental Image of XSLT?
by BrowserUk (Patriarch) on Jul 22, 2006 at 21:13 UTC
    ... its unmatched expressiveness and conciseness when manipulating XML documents.

    You obviously haven't tried doing anything other than very simple translations and substitutions. Try doing something that expands one element into a number of element groups; or collating a large number of groups in order to produce summary statistics; and see any elegance (which I never perceived), and any pretence at conciseness disappear.

    But mostly you are missing that an XML document is never the final form required by an application. Try loading a wordprocessor document from it's native (binary) format, and the same document from an XML representation and see how much extra time/cpu is used by the later. Same thing for spreadsheet data, and rdbms data, etc.

    Try performing SQL type outer, inner or cross joins on tabular data held in XML format using XSLT. Then tell me that it is elegant and concise.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Yes, obviously, because I didn’t share your experience, I must not have tried anything non-trivial.

      I’m not sure what the extra CPU consumed by XML formats over binary data has to do with XSLT being expressive.

      FWIW, all documents in word processor formats are impossibly bloated, and casting them as XML makes them only more so; I wouldn’t want to try to get anything out of them, and that’s just the same no matter if I was processing them with XSLT or Perl. OTOH, I’ve processed some pretty complex SVG and XSL-FO documents, and it wasn’t particularly unpleasant.

      I wouldn’t do complex SQL-type joins in Perl; not sure why I should start doing them in XSLT. (Not sure why I’d be sticking purely tabular data in XML anyway; that’s not what it’s for.) For simple correlation of bits from the document, I’ve not had any particular trouble. But it’s hard to know just what kind of data and operation you’re talking about here without any examples.

      Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://563046]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-23 20:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found