The issue of elements vs. attributes is something we discussed at length
over the period while we were developing MODS. Whether or not we made the
right choices is obviously a matter of debate. We are investigating
options for expressing MODS in different ways.
What seems to be forgotten in most of these discussions of what
theoretically might be better XML constructs is that there do happen to be
real implementors who have lots of MODS instances for whom it is working
very well. We would surely have to balance the gain we might get from
making these changes against the impact on implementors.
On Mon, 25 Jul 2005, Bruce D'Arcus wrote:
> On 7/25/05, Ray Denenberg, Library of Congress <[log in to unmask]> wrote:
> > > No
> > Nor is there any reason TO use elements only and not to use attributes.
> elements are ordered, attributes are not
> elements are extensible, attributes are not
> XSD and DTD validation are reasonably smart about element content, but
> not about attributes
> Isn't that enough?
> more below ...
> > (And as an aside, it would seem rather arrogant of rdf to insist that we
> > build xml without attributes -- if indeed that's what rdf is insisting, and
> > I'm not convinced -- when rdf itself couldn't exist without them, as
> > illustrated for example by: <mads:otherRelation
> > rdf:resource="Systems_Analysis"/>; so rdf must think that attributes are
> > pretty useful.)
> It's fair to point that out: that in and of themselves attributes are
> not the problem. In that sense I suppose you could reasonably argue
> it's a red herring of sorts with respect to RDF. This is valid
> RDF/XML document AFAIK:
> <Person name"Jane Doe" rff:about="doej"/>
> The problem is stuff like:
> <relatedItem type="host">
> <name type="personal">
> That particular use of attributes (as I and others have repeatedly
> pointed out) is problematic from both an XML standpoint and an RDF
> standpoint. In the first case, it makes adding validation constraints
> more difficult, and in the second, it breaks the model.
> Basically, everywhere in MODS and MADS where things get a little
> tricky from a data modeling standpoint, the choice has been to use
> generic elements and have optional attributes; to leave the structure
> loose. That has consequences, including precluding RDF compliance.
> It also makes the resulting instances more difficult to process as XML
> I'd argue, because it's perfectly legal to abuse it in all kinds of
> I went so far as to write my own MODS schema in RLEAX NG to try to get
> a handle on some of this, but even RNG only goes so far (for example,
> the interleave feature to allow unordered element content doesn't yet
> cover cases where one wants to interleave structures with the same
> element names and different attribute values).