{"id":193,"date":"2010-01-15T15:00:00","date_gmt":"2010-01-15T15:00:00","guid":{"rendered":"http:\/\/www.sgmlguru.org\/wp\/?p=193"},"modified":"2015-01-14T18:35:25","modified_gmt":"2015-01-14T18:35:25","slug":"elementnames-and-attributenames","status":"publish","type":"post","link":"https:\/\/www.sgmlguru.org\/wp\/?p=193","title":{"rendered":"elementNames and attributeNames"},"content":{"rendered":"<p>I keep getting annoyed by the (Java-inspired) naming of elements and attributes in some people&#8217;s XML, where the names contain capital letters to help keep the names clear. I&#8217;m sure you&#8217;ve seen how it works: <b>elementName<\/b>, <b>attributeName<\/b>, <b>myNewAndExcitingElement<\/b>, <b>ohLookICanCreateReallyLongQNamesForNoApparentReason<\/b>, ad nauseam.<\/p>\n<div><\/div>\n<div>Why do they do this? I know there is some kind of rationalisation for it in the world of programming languages, but in XML? XML is not a programming language and I still think it should be understandable and usable by humans (I know; SGML was supposed to be human-readable but XML doesn&#8217;t have that requirement). If you find yourself writing XML in a text editor (still happens to me), not only are these names enough to drive anyone nuts but they also make the XML more error-prone because you&#8217;re bound to spl something wrong. And if you write your XML in an XML editor, the element names filling the start and end tag symbols take up a lot of space that should be left to the actual content. (And no, I don&#8217;t believe in the minimal tag symbols that some editors provide; I want to actually see the tag names and I want to see the attribute names. They help me structure my document; in fact, they are there for that purpose!)<\/div>\n<div><\/div>\n<div>I ask again: why? If you are writing a schema and need to name an ordinary paragraph element, surely you don&#8217;t need to name it <b>ordinaryParagraph<\/b> or even <b>paragraph<\/b>? In my schemas, <b>p<\/b> is more than enough.<\/div>\n<div><\/div>\n<div>SoPleaseUseShorterNamesWithoutResortingToSillyConventionsBorrowedFromElsewhere.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I keep getting annoyed by the (Java-inspired) naming of elements and attributes in some people&#8217;s XML, where the names contain capital letters to help keep the names clear. I&#8217;m sure you&#8217;ve seen how it works: elementName, attributeName, myNewAndExcitingElement, ohLookICanCreateReallyLongQNamesForNoApparentReason, ad nauseam. Why do they do this? I know there is some kind of rationalisation for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[142,96,78],"tags":[],"_links":{"self":[{"href":"https:\/\/www.sgmlguru.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/193"}],"collection":[{"href":"https:\/\/www.sgmlguru.org\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sgmlguru.org\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sgmlguru.org\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sgmlguru.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=193"}],"version-history":[{"count":0,"href":"https:\/\/www.sgmlguru.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/193\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sgmlguru.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sgmlguru.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sgmlguru.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}