I am interested in creating web applications that are as simple as possible, and not simpler. I mean, it seems to me that I could (*should be able to*) create an XML document that represents the objects of my application, use CSS as the "presentation layer", and Javascript to manipulate the objects.
Part of what I am saying is that it seems to me that HTML obfuscates the application by mixing objects with presentation formatting, isn't this the point of CSS? -- HTML/XML: what data, CSS: how to present the data, (JS: how to manipulate the data)
I *could* use XLST to transform the XML into XHTML, but then the JS has to be coded for the XHTML (presentation elements) and not the XML (data objects), which adds unnecessary complexity.
I'm coming from the perspective of a programmer, with the desire to use design principles such as separating the presentation from the data (HTML/XML vs CSS) and object-oriented programming. Would it not not make sense to say that presently HTML and CSS are necessary to "define" the presentation layer?
Comments I'm looking for are about the proper way to code, not "fixes" with current standards.
Here is an example. I could write this:
HTML/XHTML:
<ul class="folderTree">
<li class="fTreeItem"><img /><span class="fTreeItemName">Directory</span>
<ul class="fTreeItemContents">
...
</ul>
</li>
...
</ul>
...but the design principles could be better satisfied if I could do this:
<folderTree>
<item><img /><name>Directory</name>
<folderTree>
...
</folderTree>
</item>
</folderTree>
and include the following CSS:
folderTree { display: block; }
folderTree item { display: list-item; }
folderTree name { display: inline; }
This seems to me to be the proper way to present the data. Do you not agree? Please explain...
Edit: The foundation of my question rests on the facts that a) user-defined tags can't be used in HTML/XHTML, and b) javascript isn't meant to be used with XML.
Edit 2: Also, I'm not completely familiar with how multiple namespaces are handled in a document. So if someone could shed light on if I could achieve my goal by using an XHTML document and including my XML code/tags using another namespace...