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

Alternatively, they should have made it more backwards compatible and, most importantly, heavily pressured implementers not to be complete slackers about usability. The cycle I've seen most frequently was something like this:

1. User gets a simple XML file and writes XPath, XSLT, or other code which says `/foo/bar`, which fails.

2. User notices that while it's written as `<foo><bar>` in the source, it's namespaced globally so they change code to use `/ns:foo/ns:bar`, which also fails.

3. User does more reading and realizes it needs to be `/{http://pointless/repetition}foo/{http://pointless/repetition... or something like repeating the document-level namespace definitions on every call so their `ns:foo` is actually translated rather than treated as some random new declaration.

4. User does something hacky with regular expression to get the job done and at the next chance ports everything to JSON instead, seeing 1+ orders of magnitude better performance and code size reductions even though it's technically less correct.

That experience would have been much less frustrating if you could rely on tools implementing the default namespace or being smart enough to allow you to use the same abbreviations present in the document so `<myns:foo>` could be referenced everywhere you cared about it as `myns:foo` with the computer doing the lookup rather than forcing the developer to do it manually.



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

Search: