I am planning to use XML to store some meta-data, which will be used at runtime (using XSLT) to render HTML to the end user. This is a web-based application, for which a separate set of admin screens will be built. The admin screens (administration pages) will read/write this XML meta-data. The XSLT will then be used to render the user-facing pages.
This meta-data will resemble a custom markup language, specific to the problem domain that this application belongs to.
Admittedly, there are many ways a custom parser could be written to parse this XML and spit out HTML. But for several reasons, XSLT seems to be the best option for building a rendering engine, right now.
Has anyone used XSLT in this capacity before (convert XML to HTML for a large scale production application)? If yes, can you please elaborate on any limitations of XSLT that became apparent to you while doing so.
I need some tips/advise as to whether or not to go with XSLT. If you have an opinion please reply back with strong reasoning (in favor or against). I will really appreciate any feedback and guidance.
Here is some sample XML meta-data, to get you started:
<step title='PRE SCREENING QUESTIONS'>
Are you currently covered by Medicare?<br/>
Any other valid xhtml <font color='red'>here</font>
<display-information>If you are already receiving medicare benefits, you may not be eligible for this coverage.
<step title='TELL US ABOUT YOURSELF'>
<street-address label='Street Address' mandatory='true' />
<city label='City' mandatory='true' />
<state label='State' mandatory='true' />
<zip label='Zip Code' mandatory='true' />
I know this ain't much, but I remember seing an extract from a book that described this and recommended it on the basis of the Model-View-Controller pattern.
But he (the author) had two XML files and two XSLT processings: one XML for pure data and semantics, which was turned into a "screen" XML file which contained data and in an abstract way, dictated the general layout of the end page. Lastly, this screen file was transformed into the final HTML.
I guess it makes sence if your website must be very 'skinable' and have different layouts and apperiances on a per user basis, like a blogging system or highly flexible CMS..
Note that I haven't used this method myself in pracsis, though.
I am also interested in knowing the same.
Has anyone use XML, XSLT for creating HTML pages in web application.
Please share you experience and let me know if you have any links on the same...