producing XML to present data: design pattern?

G

Gabriel_k

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top