RE: [xsl] OT: XML Node-normalization

Subject: RE: [xsl] OT: XML Node-normalization
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 20 Sep 2002 15:24:16 -0400
Nik,

At 01:43 PM 9/20/2002, you wrote:
There is an office controversy brewing about node normalization - where no
elements have attributes, only dependent nodes.

Unh, that again.


  Supposedly there is an
industry trend toward node normalization, and some are worried that we'll be
out of sync.

"Industry trend"? Um, I'd be hard put to identify any "industry trend" unless at the most general level (such as "XSLT is cool" :-). If anything, the amazing thing about XML is how widely and variously it's being used.


Personally I'd call this not an industry trend, but a bad idea that seems to spring up weed-like from time to time for no apparent reason.

  However, I have not found any documentation referencing this
'trend' - have you heard anything about this?

I'd suggest you ask whoever's making this claim to back it up, if you're in a position to do so.


There are definitely rules of thumb in XML design -- again interestingly, these may vary somewhat by application domain (e.g. folks who concentrate on documentary material have a somewhat different sense of what works well for them than do, say, folks doing web services). But "avoid attributes, use elements instead" is not one of them, at least not one I've ever heard from anyone who wasn't completely wet behind the ears and talking out of the side of their mouth. Or, to put it a bit more charitably, who wasn't apparently guilty of assuming the entire elephant was just like the toenail they could see.

If there's a good reason to avoid attributes in general, I'd like to hear it. "Avoid attributes so you don't have to decide when to make something an attribute" doesn't count. D'you seriously think HTML would be improved if it worked like:

<p><class>counterexample</class>Here's some markup that doesn't use any attributes. It has a <a><href>http://www.yoursite.com</href>link</a> in it!</p>

Ugh, what a nightmare. Ask for the value of any node or try to process the contents, and you have all the "attributes" in the way.

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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



Current Thread