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 One thought...
...is that one should anywhere and everywhere avoid putting strings which need to be escaped out within an attribute. Get's to be too much of a pain in that you are already within a quoted string. Along similar lines, don't put long text fields that might wrap into multiple lines in an attribute.
New Something else I noticed...
Or at least, this is my supposition:

I have a list of <SOMETAG attr="" attr="" /> tags, and the DOM parser is putting blank TEXT elements in between each SOMETAG element. I would guess that this doesn't happen with elements, but I haven't tested it.

The point about escaping things is well-taken, though. Thanks.

I've seen a number of places where attributes are used to modify the data in an element, such as:

<TEMPERATURE units="Celsius">40.3</TEMPERATURE>
Regards,

-scott anderson
New Attributes implies (to me) an inherent property
As in your example, temperature must have units. It describes something about the nature of the object. Elements are an arbitrary number of items that happen to belong to the particular instance of the object. That's how I see it, anyway.
We have to fight the terrorists as if there were no rules and preserve our open society as if there were no terrorists. -- [link|http://www.nytimes.com/2001/04/05/opinion/BIO-FRIEDMAN.html|Thomas Friedman]
New Re: Attributes implies (to me) an inherent property
<ATOM>
<NAME>Somethinium, I don't have a periodic table in front of me</NAME>
<ATOMICWEIGHT>23</ATOMICWEIGHT>
<BOILINGPOINT units="Celcius">125</BOILINGPOINT>
</ATOM>

Which should be an attribute...?
Regards,

-scott anderson
New Sodium. Glad to help. :-)
New Attribute
I think the name should be an attribute. The element values are particular to the thing that is named. The relationship in my mind is "if I were to put this into a table, which column(s) would comprise the primary key". Those become attributes to the tag. The rest become elements within it (data about the primary key). 3rd normal XML anyone?
Have fun,
Carl Forde
New I'll agree with Carl here
The idea that the XML analogue to a primary key would become an attribute and everything else is elements. Hmm, wait. I guess it sort of depends.

Okay, here's what I really think. No, wait, that isn't it either. (Damn.) What I was thinking was that anything there can be only one of -- an atom can only have one atomic weight, one name -- is an attribute. Then the elements would be however many protons, neutrons and electrons. Each of those would have as elements their size, charge, etc., and would have as elements the number of quarks, gluons, yadda yadda. But that seems to sacrifice flexibility and usability for theoretical "correctness."

So, umm, like I said ... it depends. HTH.
We have to fight the terrorists as if there were no rules and preserve our open society as if there were no terrorists. -- [link|http://www.nytimes.com/2001/04/05/opinion/BIO-FRIEDMAN.html|Thomas Friedman]
New Implies to Me - Design Idiocy
OOP is (or should be) about objects and messages, and message passing semantics - not about all this ridiculous falderal. It reminds me more of philosophy than programming. "Is it a thing in itself? Does it have innate thingiosity? Is it transcendant or immanent?" Are those keywords yet?
New Once again, don't pontificate...
... where you have little clue.

Objects have attributes (yes, even in Smalltalk). They can also have contained objects (elements). Neither of these things has anything to do with message passing.

If you want message passing only, without attributes, then go use a functional programming language.
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)

Batches? BATCHES?? We don't need no steenkin' batches!
142 ms