want to ask what is common practice on an issue.
We have an xml-server that presents data from a database upon certain requests. Now, when programming the xml-server, it is a lot easier if the structure can be made to suit the database structure (which is very flat). However, this will not group related elements together, they will be on the same level as unrelated data, like this:
<model/>
<price/>
<ownerCurrent/>
<ownerLast/>
<ownerSellTo>/
This is just a made up examle to illustrate. The owner elements are related, and should be related I think, under en element called <owners> or something.
This is why I ask this question:
At work my boss is making the xml-server, and he wanted the simple structure. This means that I must make several XSLs to format the XMLs that present different objects, although they look quite similiar. If the data was structured, I could make one general xsl to format all of them, making maintenance a lot easier.
I argue that it is the PURPOSE of the xml-server to hand the data in a semantic structured way, suitable for the request. Not to be easy to program. So either the xml-server is easy to program, or the xsl programming is not as general and harder to change.
What is common practice on this issue?
/Gabriel
We have an xml-server that presents data from a database upon certain requests. Now, when programming the xml-server, it is a lot easier if the structure can be made to suit the database structure (which is very flat). However, this will not group related elements together, they will be on the same level as unrelated data, like this:
<model/>
<price/>
<ownerCurrent/>
<ownerLast/>
<ownerSellTo>/
This is just a made up examle to illustrate. The owner elements are related, and should be related I think, under en element called <owners> or something.
This is why I ask this question:
At work my boss is making the xml-server, and he wanted the simple structure. This means that I must make several XSLs to format the XMLs that present different objects, although they look quite similiar. If the data was structured, I could make one general xsl to format all of them, making maintenance a lot easier.
I argue that it is the PURPOSE of the xml-server to hand the data in a semantic structured way, suitable for the request. Not to be easy to program. So either the xml-server is easy to program, or the xsl programming is not as general and harder to change.
What is common practice on this issue?
/Gabriel