As I told Ray off-list, the new version works for me. Great; thanks
Ray!
However, I would like to return to basic structural questions though,
because now that I have a working pre-release, it confirms my belief
that the current design is simply wrong.
If you'll recall, I posted a simple example -- written in RELAX NG and
cleanly converted to XML Schema -- that resulted in instances like
this:
<mads xmlns="http://www.loc.gov/mads">
<person>
<name>
<authority>
<givenname>John</givenname>
<familyname>Doe</familyname>
</authority>
<variant type="alternate">
<givenname>Jonathan</givenname>
<familyname>Doe</familyname>
</variant>
</name>
</person>
</mads>
The key points are that all content are children of the main elements
(person, work, topic, etc.), that authority and variant are siblings.
Not only does this make logical sense, it also allows one to much more
finely-control validation. A person element thus cannot have an
authorized name that is a corporate name, and an authorized name that
is a person cannot have a variant that is a corporate name, or -- much
worse -- a title.
The below are both valid against the new pre-release, but neither of
them makes any sense.
<madsCollection xmlns="http://www.loc.gov/mads/">
<mads>
<authority>
<title>Some Title</title>
</authority>
<variant type="abbreviation">
<name type="personal">
<namePart type="given">J</namePart>
<namePart type="family">Doe</namePart>
</name>
</variant>
</mads>
<mads>
<authority>
<name type="corporate">
<namePart type="given">John</namePart>
<namePart type="family">Doe</namePart>
</name>
</authority>
</mads>
</madsCollection>
I know I'm a bit of a gadfly on this stuff, but I think it's in
everyone's interest that these schemas be as good as they can be. I
get really nervous when I see this sort of stuff (a schema so loose I
almost wonder why bother to validate at all), and a deepening
dependence on XML Schema (a language that is far too complex for far
too little payoff).
The structure I am suggesting, by contrast, will result in more
reliable and easier to work with data, make editing easier, etc. RELAX
NG, meanwhile, is easier to use (and more powerful) and gives users and
developers who would like to work with MODS greater flexibility (e.g.
I'm not forced to use a schema language I have no interest in).
Finally, I still think an attribute to indicate initialization on
nameParts could be valuable.
Bruce
|