Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If only you could specify in your schema that element must be unique. But wait a minute ! Actually, you can. That's what the unique attribute does.

And here lies the main problem of XML. As a technology, it is better than its reputation. Sadly, next to no one knows how to use it properly.



XML did a number of things right.

Too bad it was initially envisioned as a text markup language, with tags sparsely strewn around the text, and not as a data representation format.

So, the syntax ended up both overly cumbersome (see closing tags) and festooned with logically unnecessary shorthands like node attributes. Then, the terror of entities.

XSLT is a brilliant language, I'd say the first pure functional language widely used outside academia (in 2000s), but, based on XML syntax, it's completely unfit for human consumption.

If only the authors of XML could get rid of the shackles of SGML compatibility, and went with a simple, uniform syntax, e.g. s-expressions, we could still be gladly using it. Now we reinvent the ecosystem instead, with JSON (sigh) and YAML.


I see no issue except from the entities. Which by and large have died anyway as those come from DTDs and not from XSDs. I do not see why closing tags are a problem: my editor will insert them and it makes parsing the XML much easier/less error prone. XSLT is brilliant indeed (and to my eye quite readable, but then again I also like regexp ;-)


You can’t specify that attributes are unique, which is why id is broken. And thus why XML DSIG, which uses id extensively, is exceedingly difficult to harden.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: