I think you are missing the fact that a good document really needs three things:
1) Data (RDF, NoSQL, RDBMS, etc)
2) Structural presentation (i.e. what HTML or LaTeX provides) and
3) Presentation to the user (i.e. what CSS or macro packages in LaTeX provide)
To get from 1 to 2, you have to have some logic. You could do it with Javascript acting against RDF and HTML, I suppose. Or you could do it with XSLT. However there's no inherent guarantee that inherent data structure will in any way match your document structure and so these are really separate concerns.
This is why HTML template systems are so important for web programming.
1) Data (RDF, NoSQL, RDBMS, etc)
2) Structural presentation (i.e. what HTML or LaTeX provides) and
3) Presentation to the user (i.e. what CSS or macro packages in LaTeX provide)
To get from 1 to 2, you have to have some logic. You could do it with Javascript acting against RDF and HTML, I suppose. Or you could do it with XSLT. However there's no inherent guarantee that inherent data structure will in any way match your document structure and so these are really separate concerns.
This is why HTML template systems are so important for web programming.