Re: attribute vs value

Subject: Re: attribute vs value
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Fri, 21 May 1999 17:17:26 -0400
At 01:49 PM 05/21/1999 -0700, Cote, Stephane wrote:
>I was wondering if any one knows when to use an attribute
>versus a value in a XML document.

This verges on being the highest-scoring XML FAQ. :)

My rule of thumb is that true content belongs in elements (what you call "values"), and that attributes are for somehow shading the "meaning" of the content in ways that probably aren't useful to be displayed. If you know HTML, you know that attribute values are almost never displayed (except for fringe things like the <img> tag's alt attribute); they're effectively "invisible."

Check Robin Cover's SGML/XML site for good coverage of the question, at:
-- in particular, Eliot Kimber's discussion at:

John E. Simpson | The secret of eternal youth
simpson@xxxxxxxxxxx | is arrested development. | -- Alice Roosevelt Longworth

XSL-List info and archive:

Current Thread