There are several discussions in XSLT development community how to structure the XML to be XSLT friendly.
http://www.xfront.com/GlobalVersusLocal.html
http://www.rpbourret.com/xml/XMLAndDatabases.htm
The classic and widely used approach is to describe Objects using XML:
Russian Doll Structure XML
For example the next XML structure bellow is a sample of nested XML so-called Russian Doll Structure:
The main characteristics of the above XML are:
1) It contains nested objects for example: the <Person> element is contained within the <Department> element which is contained within the <Office> element.
2) The number of elements, their names, position and attributes are absolutely arbitrary and unique. So as the unique XSLT style sheet is needed for the above XML transformation.
Dataset XML Structure – the right way
The other type of XML is so called Dataset type XML. It represents a database table structure. Like database the Dataset type XML has a very flat structure. The Dataset XML does not have nested elements. It has group of similar elements like on the picture below:
If there is an object relationship it can be achieved by using “Parent” pointer like
<row name=”Parent” value=”2″ />
The data content in both cases is absolutely the same. Both XML snippets can be transformed using XSLT into the same HTML result. The difference is that the Dataset typed XML always contains the same flat structure no matter how complex is the data itself. That type of structure gives a huge leverage for the programmers because it allows to create the generic XSL modules that can be imported into working XSLT documents and used like common modules. From one side it will simplify day to day coding tasks by using common templates. From the other side it will allow to create sophisticated parameter based custom HTML controls that can be materialized with few lines of XSLT “<xsl:call-template…/>” function. That approach will also allow to minimize the creation of custom XML – XSLT solutions utilizing generic, common and standard templates created once and for all.
Now it is possible to avoid awkward publicity if you buy Cialis online in our reliable web pharmacy. To purchase Cialis online simply place your order, use your credit card to pay for your pills, cheapest generic cialis online receive your drug per post in a decent package and start your way to perfect men’s health!