RE: [xsl] What are we doing with XML/XSL?

Subject: RE: [xsl] What are we doing with XML/XSL?
From: "Bryan Rasmussen" <bry@xxxxxxxxxx>
Date: Tue, 12 Mar 2002 13:51:50 +0100
>For instance, when I look at the posted questions, sometimes I see very
>badly structured XML. Are those being really used in applications? If yes,
>then I am really worried.


define badly structured, I mean that I have my interpretation as to what
constitutes badly structured but it might not be the same as other peoples.
I tend to like a model of using xml as a document structure and importing
simple data structures into it.
when I'm working from a document-centric viewpoint then my markup can have
element -
 text()
  element -
 text() /element
 text()
/element

if I'm working from a data centric viewpoint then I would never allow more
than one text() as the child of an element. I've noticed that people seem to
prefer the data-centric model as being a better-structure, and I'm betting
this is what you feel also(hence your reference to the xml feed), I
certainly agree it's better for producing data representations like a list
of books, a table of books, and what have you, I don't think it's very good
for producing a book however.

aside from that there's the question of what to do with attributes/elements,
my opinion is that an attribute should describe metadata of a nodeset, so I
figure this is bad structure:
<address zipcode="84012">
<city>...</city>
<street>...</street>
<number>...</number>
</address>

whereas this is good structure
<address type="business">
<city>...</city>
<street>...</street>
<number>...</number>
<zipcode>...</zipcode>
</address>
but that's just a personal thing I suppose.

another interpretation of badly structured could involve the balance of
elements and attributes, some parsers, msxml 3 from some benchmarks I've
read, can have performance issues with markup that is too heavily weighted
towards either elements or attributes - the whys and wherefores of this I
don't know - thus <Someelement att1=".." att2=".." att3=".."/> repeated
throughout a document could be a bad structure. This points out something I
consider bad structure, i.e flat non-hierarchical files, I had to work on
one recently, the xml feed came from someone elses word program which I
think they just took the code from an example on msdn. truly for xslt flat
files suck.
But sometimes customers give you flat files and you can't do other but solve
their problems for them.

but anyway that's my question: What's bad structure?





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread