xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clark.ev...@clarkevans.com
Subject Re: Attribute and Element
Date Thu, 18 May 2000 22:50:34 GMT
I forgot two other points. If you make it an attribute; then
you have both elements and attributes in your document.  If you 
stick with just elements, you avoid one form of syntax.  IMHO,
when explaining the data to a manager, it's alot easier to avoid
the whole element/attribute question by leaving the attributes
out to begin with.  ;)

In general, for B2B markup... attributes aren't really 
needed.  However, they *are* very valueable if you have
mixed content; like HTML.  Think "adverb".

  <body> this is mixed <font color="red">content </font></body>
   
Arguably (and long arguments indeed), color is on a 
different 'plane' than font thus it requires a different
syntax so that it's value, "red" is not considered part
of the body's content.   This is easily made concrete by
looking at the XSLT string-value operator;  which 
is loosely defined for an element as the concatination 
of all text children.  Thus, the string-value of the <body> 
above does not contain "red", but it does contain "content".

Once again, for B2B stuff... I don't think this makes
a ton of difference; but the differences (and resulting
confusion?) are strong enough to make me steer clear
of attributes when I can do so.

Best, 

Clark 





Mime
View raw message