role of xsl in dynamically generating HTML pages from relational database
can anybody explain the role that XSL can play whe开发者_JAVA百科n dynamically generating HTML pages from a relational database?
Generally speaking, XSL can act as a presentation layer to adapt/customize the naked data retrieved by a data access layer from a database. This layering can be good because:
- data issues (checks on values, performances, resource pooling...) are quite different from presentation issues (HTML layout, browser compatibilities, ...)
- presentation requirements are volatile, and you don't want to mess with data
- you may want to support several output formats (e.g. HTML, LaTeX, WML if it still exists, CSV values...), or simply want to keep that possibility open
XSL is particularly well-suited for dealing with structured data like those retrieved from a database, and adding an output format may just mean copying and pasting an existing XSL into another one with minor tweaks. On the other side, XSL can rapidly become a nightmare if you have to consider lots of odd cases.
Without further information (are you talking of server-side apps or desktop apps? Which programming language/platform?) I can't give more specific advice.
精彩评论