Empty element that carries only attributes is common and allowed in XML. You
could use the language element to supply/specify the langtype and/or lang
attribute (code or name) in Language element, and then use the lang
attribute (code or name) for other elements when needed.
Am I correct on this?
Systems Department (650) 725-7924
Green Library East, 2nd Fl.(650) 723-3038 (fax)
Stanford University [log in to unmask]
Stanford, CA 94305-6069 library.stanford.edu
From: Metadata Object Description Schema List [mailto:[log in to unmask]]On Behalf
Of Ray Denenberg
Sent: 2002?12?17?(???) 8:02
To: [log in to unmask]
Subject: Re: [MODS] language: comments please
Rick Beaubien wrote:
> Given that the MODS language element supports both ISO 639-2 and RFC3066,
> feel that any provision for language attributes should as well, just for
> the sake of consistency. However, to make the authority explicit and to
> avoid having two parallel language attributes to contain the language
> value, you might want to consider defining a language attribute group that
> included both a LANG and LANGTYPE attributes along the lines of the
> <xsd:attributeGroup name="LANGUAGE">
> <xsd:attribute name="LANG" type="xsd:string"
> <xsd:attribute name="LANGTYPE" use="optional">
> <xsd:restriction base="xsd:string">
> Such handling would, I think, be most consistent with the current language
Rick -- Thanks for the suggestion. We've had quite a bit of discussion here
we agree with this approach. But we have a couple concerns (and would like
know if other people see these as problems).
First, to really be consistent we would need to represent language
an attribute as opposed to an element (in fact we'd have to do that to use
above approach). An attribute on an element is the appropriate way to
the language of the element. However, language is itself currently an
an attribute), as it represents the language of the item. So we propose to
represent the language element as an element where the element content is
signficant (may be empty), where language and language type are both
as attributes. That way it can use the attribute group as suggested. This
seem a bit of a cludge but I think the benefits of this approach (the
that's gained) outweigh the slight clumsiness.
Secondly, this approach represents language type as an attribute qualifying
language, itself an attribute. (It seems like a cludge to allow an attribute
attribute.) If nobody else is bothered by this then I suppose we aren't.