IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: XML: Attributes vs. elements
On mailing lists and newsgroups, an immense amount of bandwidth is wasted on when you should use attributes and when you should use elements. However, there's no real semantic difference between the two.

This means that your choice really comes down to aesthetics and pragmatics. First, no matter how fancy your tools, to debug it a human being will have to grovel through formatted text, so write your DTD or schema so that the XML documents you generate read well to a human. Second, remember to keep your tools in mind: when you have a choice pick whichever of elements or attributes will make it easiest to write document-munging programs with whichever API -- DOM, SAX, XSL, regexps, whatever -- that you use.

The goal is to minimize bugs, and to make it easy to debug the ones that get through. Keep your mind on that, and you won't go wrong. Abstract style rules will simply screw you up, because there is no underlying principle at work here, only pragmatics.
New Keeping tools in mind...
Second, remember to keep your tools in mind: when you have a choice pick whichever of elements or attributes will make it easiest to write document-munging programs with whichever API -- DOM, SAX, XSL, regexps, whatever -- that you use.


This is the sort of discussion I'm looking for. What are the advantages between the two methods when taking the tool into consideration? We're already using or are contemplating using most of these that you mentioned: SAX, DOM, and XSL.
Regards,

-scott anderson
     XML: Attributes vs. elements - (admin) - (17)
         Re: XML: Attributes vs. elements - (neelk) - (1)
             Keeping tools in mind... - (admin)
         One thought... - (ChrisR) - (8)
             Something else I noticed... - (admin) - (7)
                 Attributes implies (to me) an inherent property - (drewk) - (6)
                     Re: Attributes implies (to me) an inherent property - (admin) - (3)
                         Sodium. Glad to help. :-) -NT - (Another Scott)
                         Attribute - (cforde) - (1)
                             I'll agree with Carl here - (drewk)
                     Implies to Me - Design Idiocy - (deSitter) - (1)
                         Once again, don't pontificate... - (admin)
         Prefer elements over attributes - (dpeterson) - (2)
             OK, so starting to form a distinction here... - (admin) - (1)
                 Yeah, back to what he said again - (drewk)
         My rule of thumb - (tuberculosis) - (2)
             Ah, nicely succinct. Thanks. -NT - (admin)
             Snort - (deSitter)

Shock the monkey!
129 ms