- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
OK, I used to despise XSLT. Now I only hate it. That's some pretty neat stuff. Oh, and somebody has slightly too much time to figure this out :-D
Admin
Nice. Reminds me of the days we let our 286 PC run all night just to zoom in on some Mandelbrot detail. :)
Admin
"Even if it's variables are write-once and cannot vary."
It's pretty much a norm for a purely-functional language, which XSLT is.
Article authors' misunderstanding of this puts not XSLT into shame, but himself
Admin
Stupidly Awesome !
Admin
The irony here is that the source XML file contains the colour information.
Admin
Or, if you are not in the habit of letting total strangers take full control of your browser, it looks like this:
100 -120 120 3.9 -203 100 1.4 28 #500 ░#115 ░#228 ░#22B ░#33D ░#44F ▒#55C ▒#55D ▒#55E ▓#55F ▓#66F ▓#77F ▓#88F █#88F ▓#99F █#99F ▓#AAF █#AAF ▓#BBF █#BBF ▓#CCF █#CCF ▓#DDF █#DDF ▓#EEF █#EEF ▓#FFF █#FFF ░#000
Charming, either way, I'm sure.
Admin
Thats the most retarded looking fish I've ever seen.
Admin
Dear lord! Someone else who understands what XSL is!
The number of times that I've tried to explain this to someone, only to be met by a blank stare and a questioning "fun-shu-null . . . ?"
Admin
Yeah, XML tales "full control" of your browser. How's that foil hat doing, protecting your brainwaves from them, I hope.
Admin
It gives different colors in Firefox than in IE8. But it certainly is a stupid tric.
Admin
I'll let other work out the issues of purely functional languages. But as for the English language...
wrong: "Even if it is variables are write-once and cannot vary."
right: "Even if its variables are write-once and cannot vary."
Admin
Yep, just what I was thinking. Presentation info should go in the stylesheet.
Admin
XSLT is a functional (monadic, I'd say) programming language that takes a XML of some structure and produces another XML.
XSLT functions are called 'templates', and they are either called directly by name, or indirectly by using pattern-matching (feature available in a lot of more high-end functional languages).
XSLT uses award-winning XPath as its expression language, which permits math, string operations (rudimendary, I have to admit) and DOM querying in a very easy and powerful way.
Thus each template operates on one element of input XML, directly, and all of the input DOM tree, via XPath queries.
Each template can output any number of XML subtrees and also call other templates, making the language turing compatible. There are variables, for-loops, condition statements. Any questions?
Admin
Admin
Funny how, of all the stupid things people could draw with functional programming languages, they all end up drawing the Mandelbrot set. Am I the only one who long ago stopped being impressed by a computer's ability to plot f(z)-->z^2+c?
Admin
XML or not, with scripting turned off, that's how it looks. What, you think I made that up?
Admin
I'm using XSLT right now to translate a source document into... <sigh>... fucking WordML. Kill me now.
Admin
Admin
Yes, two:
Why are the default rules contradictory? I.e. why doesn't an empty XSLT program either copy the entire source or throw it all out, rather than copying elements and throwing out attributes?
Would it have been possible to come up with a more painful syntax than this, or is this in fact the worst imaginable?
Admin
Admin
On the first question, duh, don't use an empty stylesheet, there's no much reason for it anyway.
On the second question, what part of XSLT's syntax you dislike? xsl:value-of is too verbose, I have to admit (and I think they're treating it in XSLT2); other than that, any other real problems? Do you prefer languages that look like XML, but actually aren't, thus getting all cons with no pros, btw?
P.S. Well, I don't understand how people who dislike XSLT for its 'ugliness' can ever touch something so ugly as PHP or C++.
Admin
How about:
<html> <body> <script> document.write("send me some money") </script> </body> <html>Admin
Admin
If you want to hire me to penetration test your web site, we can talk. Of course you'll have to prove it is really your site. And, you probably can't afford me.
Admin
since you're such a security genius who found a vulnerability that nobody else on the planet has ever found or written about how about to do the responsible thing and tell us what it is.
Admin
So...that's what nightmares are made of...now I know.
Admin
LOLWUT?
Just because something is XML doesn't mean it's not presentational. What's SVG?
Admin
I disclosed it responsibly at the time. It is very well known by most everyone in the business, except perhaps you.
Admin
That is freaking amazing. I remember running an Apple2e for 3 days to get the equivalent of that. And using XSLT - which (although I love it) is the most inefficient 'programming language' I've ever encountered.
My current machine now renders the page without a blink. How far we've come.
But the real astounding bit is that the XSL code itself is one of the shortest working XSL files I've seen. All real-world XSL I've touched is much much longer. o_O
Admin
The default template for something basically xsl:apply-templates/ So, you start at the root and go down the chain basically just applying templates to everything. At the bottom (a node with no children), you basically just get the value of those node (not a copy of the node)
So, an XSLT with no rules in it, SHOULD just spit out all the text nodes of the document, not a copy of any XML.
XSLT is wordy and hard to write. I've seen other attempts at XML-based templating languages and they're all equally ugly. I'd vote for using XSLT for templating or don't use XML for it at all.
Admin
This thing crashed IE8 D:
Admin
It's been 14 years, genius. It's entirely possible it got lost in the shuffle. Couldn't hurt you to disclose it again, could it?
Either put up or shut up, sez I.
Admin
It's called "cross site scripting", and is a well-known problem.
Stealing real money probably involves some sort of driving someone else's browser to use their bank, paypal, ebay, etc. pages.
Admin
Look, buddy, if you wanted to be taken seriously you wouldn't have started with a comment about how XSLT is going to "take over your computer" and then followed it up by talking about javascript.
Admin
Ah yes, the good old "Emperor's new clothes" style argument. If you can't clearly see the truth of my argument, then you must not be cool enough.
If you don't know the secret handshake we use to represent the Vulnerability That Must Not Be Named, then we simply can't discuss it. I'm not really sure how you render a handshake to ASCII anyway. Maybe with XSLT?
Admin
Admin
Nuff said indeed. Now we're all concerned for our well being. Good job proving your point to everyone...
Captcha: nulla I'm gonna nulla your bank account, mother, and dog!
Admin
if he is indeed running his mouth about XSS then his "nuke all JS" solution is overkill in the extreme.
Admin
thank you for proving our point for us you ignoramous.
$5 says that if he does indeed have a vulnerability it's ActiveX and only works on IE3 :P
Addendum (2009-04-29 13:59): s/ignoramous/ignoramus
Admin
Wow.... This is the farthest I've seen a troll get in a long time on TDWTF.
Admin
OMG!!1!!one!! yer scaree!
plz send me teh codez plz??!?
Admin
I'm afraid you've all been had. Could be TopCod3r, although it's not really his style. However, the way I read the original post, he as good as winked at the reader knowingly with:
Admin
Finally!!! Something useful on the internet after all this time. plz snd m3 teh c0d3z 2.
Admin
all XML chatter aside, it's actually the ability to analyze if the iteration on z with, in the first iteration, z=0 is bounded for some c (which is the starting position on the complex plane). It is not a trivial problem to analyze this efficiently.
Admin
I rather like XSLT... I just don't like actually writing it. :|
Admin
TRWTF is Andy Gottit
Admin
OK I admit it, I thought mandlebrot was a pie, and XSL was going to steal my pie, so I made up lies about XSL to discredit it. Swiftly moving on to talk about javascript just covered my tracks.
I am sorry for my deception, but even more sorry that I never got my mandlebrot pie.
Admin
Trolls 1 - rest of posters 0
Admin
Actually XSL is based on DSSSL, an ISO standard for SGML (ancestor of XML). I was involved in ISO that time and remeber the criticism that DSSSL was uncomfortable to work with sice it was based on Scheme.
The joke is that when XSL came along, they simply replaced "(fun ...)" with "<fun>....</fun>" and everybody thought it was great...
So it goes.
Admin
It didn't crash IE8 for me. It chugged though, but that should be expected.