- 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
Sir Robin, with your sarcasm detector malfunctioning, perhaps you should change your title to "Robin the Oblivious" for the time being?
Admin
Yep, and we'll even call it WinFS.
Admin
In my personal experiance (your mileage may differ), XSLT is a pain in the ass to deal with. Not being able to redefine variables once they've been declared ends up makeing every problem a recursive problem. While recursion isn't necicarialy a bad thing, sometimes you just want a simple loop or to keep a running total without haveing to write a recursive method.
Admin
it's pretty funny that a site which supposedly exists for smarter people to gather here and laugh smugly at others for being so dense, is populated by people so dense.
Admin
XML really is a great tool to offer a public interface or when you have non-trivial data structures that you'd otherwise have to develop your own parser for. Unfortunately, because it is so useful, it sometimes get used for its own sake when a better alternative is already available. And of course it's always possible to negate all the advantages of XML by coming up with a cryptic, inefficient and convoluted schema.
Admin
In my opinion the problem here is that a Software Developer that is not able to design anything isn't very useful. I think that someone not capable of designing software can't be called a Good Developer, Good Programmer, Good Systems Analyst, or Good Engineer. Maybe a Good Technician, but I am in doubt even about this one.
Admin
If CS majors can start calling themselves engineers, then maybe paralegals can start calling themselves lawyers. Or maybe LPNs can refer to themselves as doctors.
I mean, when was the last time you saw an actual doctor draw blood? Or an actual lawyer read a legal brief? The LPNs and paralegals do all that - the doctors and lawyers are obviously incapable of doing their own jobs! So I suppose engineers are worthless too, since they're so far removed from code monkeying...
I'm a legitimate engineer and I'm proud of it, because I earned it. Just like a doctor or a lawyer. Yes, I can write code. Very capably, in fact. No, I don't always have to, because I have people to do it for me.
Admin
Admin
CS majors are the ones that make it possible for you to do your job. CS is to software engineering as biochemistry is to medicine.
Admin
Admin
you can "forget something".
or you can "leave something at home".
But "forgetting something at home" - that's a linguistic WTF.* At least to English English speakers - perhaps it has evolved as a common/acceptable idiom in American English, I don't know.
Admin
God, what ever happened to the term "code monkey"?
Admin
<sarcasm>Orange text is for people who don't know how to use XML</sarcasm>
Admin
Admin
XML and XSTL are descriptive data, and do not define the programs low-level execution details. The parsers/interpreters act-out the description.
XSLT has the same drawbacks as the "functional" or "Logic" languages such as LISP (or Scheme) or Prolog. They describe repetition as recursion. They can build arbitrarily large (search) subtrees.
The parsers/interpreters for these languages often have a pre-compile step, like Java bytecodes. That step can rewrite tail recursion as a loop, or ignore obviouly dead subtree branches.
The XML schema provides some boundary rules for XSLT. That helps a great deal as well.
Admin
Hahahaha. XPath sucks.
NINJAS
Admin
Admin
Oh, what did he forget about his sarcasm detector in his home?
Admin
Admin
Texas has passed this law. Only people who pass the PE (Professional Engineer) exam [and early on, some folks who were grandfathered in] can call themselves Software Engineers. Works just like Civil Engineer, Mechanical Engineer, etc. Other states don't have this requirement.
Admin
Jonathan Coulton made a song out of it.
Admin
none of those say the same thing.
Admin
"Track", "Yard", "Car"? I wonder what business Jean's Fortune 500 company is in?
Could it be that a manager was "railroading" the architect into using XML and they decided to "switch" away from "XPath" at this "station"?
Admin
My guess is he was being sarcastic. BUT XML IS Bloat. Thats pretty much what the M in XML stands for.
I recently read an article prasing the new event log in Vista because its now in XML and therefore is searchable. They claimed that straight text wasn't searchable unless it was index.
XML is JUST a file format. Albiet a much larger and more verbose file format, but still a file format.
Admin
I am rigth now working on a project where I have to generate XML messages to a "High-End Document Management System". The XML messages have an awkward structure with strange and inconsistent element names. Whenever there is an error in the xml, the High-End Document Management System gives a random error message which most commonly is not related to the actual problem. To solve a problem I have to find a working xml sample and try to remove and change it gradually towards my own xml until I get the same error message. That's nice, huh? I managed to decompile their java-based import tool, and I found out that the XML is parsed by using SAX and almost exactly same way as in this article. So there is practically a HUGE function with If's and returns and breaks, and if some piece of data is wrong, the process is halted.
I asked the developers of the High-End Document Management System if they have a XSD schema for their XML format so I could validate my XML before sending it to the application. To my surprise, they had an official document describing the xml format and it contained the XSD. Wohoo! Now I could do the validation by myself and get less errors.
Unfortunately their XSD schema itself did not pass XSD validation (!), so it could not be used to validate anything, which explains why even they don't use it in their application. I tried to fix the syntax errors in their XSD but it contained so many errors that I could not decipher it.
I guess that SAX is some kind of advanced and super-fast high-end tool to parse xml, and this behaviour is just a drawback caused by using state-of-the-art technology. As I am not super-intelligent genius I have to use DOM, XPath, XSD, XSD and other slow performance-ruining tools.
Admin
Admin
Of course, if you want real complexity, you go for XQuery. Check your soul and sanity at the door if you do though.
Admin
I'm definitely no XML expert. I took a 4 month course on it last semester and after the first week I realized I should stop paying attention for my own good.
I prefer the standard syntax that has been made so popular in Unix-like systems' configuration files:
#Comment name=value until newline
I'm way against XML documents. Explain to me what you can do with an XML document that you can't do with the traditional configuration syntax..
Admin
Web pages for starters?
Not knowing a technology - no problem Stating a technology is bullshit despite having no clue of it - questionable Stating a technology is bullshit and being proud of having no clue - please leave.
Admin
Okay, you struggle with how to parse XML, how to check if a string contains a substring or if it doesn't, work out how to remove any hanging AND statements out of a SQL WHERE clause, how to strip common occuring characters out of a password.
I'll worry about the more complex things that actually cause projects to fail ;-)
Admin
Admin
Been there, done that. These days I make people rank them in order of importance. Ultimately the lower ranked two are going to get sacrificed for the highest priority one.
Admin
My suggestion for XML-ng would be to allow "generic" closing tags (like: </>). The only value in repeating the element-name in the closing tag is for human readers, and making this optional would reduce a lot of bloat.
Admin
There is no such 'standard syntax' and 'unix-like' is a meaningless term.
Second, you end up having to solve the same problems in your 'unix-like' non-standard syntax - ruby, unicode, extending a single valued property into a structured one as requirements change etc. Or even just wasting development time working out what happens when you want a newline in your value, and how to encode that in a custom syntax.
Assuming you have a parser for your syntax, whether you've created one, adopted someone else's or wasted a few days learning how to use yacc, you then also have to map your name/value pairs to the object model of your application. In code I've seen, this often as not ends up being exactly like the code above, with a long list of 'if (name.equals("foo")) SetFoo(Integer.parseInt(value))' (modulo factoring out the getEventType comparisons, which could be done in one test in the example). A random example from the apache filters module:
There do exist reasonably decent binding tools that will map xpath fragments or schemata or SAX state machine states to your object model for technologies with support schemata - XML, ASN.1, probably others I'm not aware of. AFAIK they don't exist for 'unix-like' config files, since there isn't a rigorous enough definition there, and even systems with quite advanced, modular config files systems such as apache httpd fall back on elseif chains of string matching.
http://cafe.elharo.com/xml/plain-text-config-files-are-confusing/
TME
Admin
Great for you. We're all happy for you. Pretentious jerk.
Admin
Hierarchial configs are way easier to deal with. You can also do xpath like references within the config hierarchy and create adhoc structure, which helps a lot: define a section up front that says where everything is or allow properties to exist at multiple levels and cascade down, thus letting you simply define things based on stuff like geography. Much better than config files.
Admin
you must be just a developer.
Admin
<suggestion>XML is bloat</suggestion>
See, that wasn't hard at all.
Admin
<suggestion>XML is bloat</suggestion>
See, that wasn't hard at all.
Admin
XSLT is a great language for its purpose. Too bad its syntax is XML :(
Really, readability suffers a big penalty. Add some html into the mix, if that's what you're generating from the xml and you get the perfect mess.
I'm not aware of any other representations for XSLT that might exist, though, because I used it only once.
Admin
[quote user="Bob"]XML is generally horrible for machines to read or for humans to read.[quote]
Uhm, horrible for machines to read? I can agree that XML encoded in any text format is bad for machines to read, but I've heard of binary encodings just around the corner (I might be wrong, though).
Admin
It's been a fascinating discussion on the relative merits of XML as a general technology, utterly irrelevant as always but still a few good laughs.
Now back to the article; has anybody noticed that the code doesn't actually parse XML? (heh, could be that this whole XML discussion is pointless since the article isn't about XML at all, but I digress)...
XML is case-sensitive and they are doing case-insensitive compares. So, while they can verify that the XML is "well formed" they cannot ever determine that what it contains is valid. In order to schemify what they are doing, one would have to write over 100 million rules for the first element alone... and require millions of yottabytes of storage for the whole schema.
(NB. I didn't work this out precisely, I just saw the permutations would easily require over a yottabyte and thought "at this point it really doesn't matter what happens next").
Admin
Admin
davidh
Admin
I havnt used it myself, but I've heard (along the blogvine) that its very slow, overly complex, and very painful to use. My company uses PHP to process XML data (because PHP can easily connect to DBs, launch system commands, generate HTML reports, etc...), I don't want to volunteer to try and reimplement it in XSLT.
Admin
Admin
In case of LISP, this is rubbish. C code can be mechanically translated to LISP (bad and hackish code, but still functionally equivalent). It will look just as good/bad as the original. In LISP, you can code in an imperative or functional style, or in a mix of both which is pretty typical. LISP is definitely not a purely functional language, and it definitely doesn't require the programmer to describe repetition as recursion. In fact, LISP's loop constructs are way more powerful than C's and C++'s, and they are widely used.
Admin
And its amazing how many times Cheap comes on top of the others.
captcha: no quack
Admin
You forgot FILE_NOT_FOUND.
Admin
The blogvine is wrong. Depending on the library and how much of the standard it implements, XSLT is usually very quick and very painless. I use it all the time for all kinds of things.