Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Learning HTML versus learning XSLT (rant)

 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been having a play with XSL and it makes me a little frustrated.
When you start out using HTML, if you write some HTML that is 'not quite right', the standard behaviour in 'most browsers' appears to be "make your best guess and return the results".
The default behaviour in XSLT appears to be "I don't know exactly what you mean, so you can't have anything".
This might be related to the way each are specified. The HTML spec wasn't enforced very strongly through version 3 and hence browsers had to cope with all sorts of rubbish. XML has better management and can therefore enforce tighter support. (is there a difference in the way MS manages XML and XSL? I think I heard something a while back but haven't followed the story)
Not really a question, but I wanted to throw it out to anyone else using XSL to see if there are related stories. My experiences may be a little different since I've been 'doing XSL' rather than 'learning XSL', I've never sat down to learn anything, I've just been messing around and altering (read 'maintenance of') existing implementations.
Dave.
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

How about this quote:
"As a programmer with more than 20 years experience with over a dozen languages, XSLT templates and default rules were not obvious to me. Over the past year or two I had looked at numerous examples trying to discern how they worked. While I could understand the general gist of what was occurring, there was too much implied behavior that I did not pick up. It was not until going through formal XSLT training that I fully understood how XSLT worked. Clearly if the barrier to entry is that high for a heavily experienced programmer, the average web developer is not going to find this technology very useful."
From: Rescuing XSLT from Niche Status
A Gentle Introduction to XSLT through HTML Templates
http://www.xfront.com/rescuing-xslt.html
Now back to your post.
When you start out using HTML, if you write some HTML that is 'not quite right', the standard behaviour in 'most browsers' appears to be "make your best guess and return the results".
In my understanding, big part of XML's benefits is explained not by it's smart design features and not by its inherent inner beauty, but by mere fact that it is standard. You have to follow standard rigorously to be understood by everybody. If "make your best guess" interpretation strategy was allowed, we would have big parser incompatibility problem, just like we have browser incompatibility problem. Do you really want to write your XML and keep in mind how few "major parsers" could interpret it? :roll:
The default behaviur in XSLT appears to be "I don't know exactly what you mean, so you can't have anything".
XSLT unlike HTML is a kind of programming language, not just mere template. You are not surprised that Java(TM) doesn't make it's best guess?
This might be related to the way each are specified. The HTML spec wasn't enforced very strongly through version 3 and hence browsers had to cope with all sorts of rubbish. XML has better management and can therefore enforce tighter support.
Aren't they both defined by W3C? "Browsers had to cope with all sorts of rubbish" - my idea is that they chose to cope with all sorts of rubbish. If I am wrong, somebody will correct me.
is there a difference in the way MS manages XML and XSL?
M$ wouldn't be M$ if there wasn't. It introduced its own proprietary XSLT elements which would only work for their MSXML processor. But it was long ago Now they said they are fully XSLT specification compliant.
My experiences may be a little different since I've been 'doing XSL' rather than 'learning XSL', I've never sat down to learn anything, I've just been messing around and altering (read 'maintenance of') existing implementations.
He-he. Then you only got what you deserved
XSLT is difficult, because it belongs to different programming paradigm - functional programming. It needs a mental shift to be able to think in a different way. In my experience, it isn't too difficult to grasp, much easier than OOP, but you need to realize that your habitual way of thinking will not work.
If you have some free time to spend, I would highly recommend learning XSLT, as an alternative way of thinking about programming. Here is an article about it, by Michael Kay, one of the best experts on XSLT, if not the best.
[ January 18, 2002: Message edited by: Mapraputa Is ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah-ha, thanks for the links! These look like the things I should have been reading when I got started.
I'm actually a big fan of 'the idea of' XSLT, but remain unconvinced of the implementation. :roll: I'm largely to blame since all I've done up to this point is dabble (the only way to learn programming is to write programs)
If this ends out to be something I have to often, I reserve the right to blame you.
 
I do some of my very best work in water. Like this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic