Print

Print


From an XSL processing standpoint, it doesn't matter if the root is "mods" or "modsCollection".
 
I use <apply-templates select="descendant-or-self::mods:mods"/>,and it processes as many mods records as there are, skipping modsCollection if need be.
 
 
 
_______________________________________
Nate Trail
Digital Project Coordinator
Network Development & MARC Standards Office
Library of Congress
202-707-2193
[log in to unmask]

>>> [log in to unmask] 1/27/2005 1:08:37 PM >>>
From: "Bruce D'Arcus" <[log in to unmask]>
> It's just that both of these are valid:
>
> <modsCollection xmlns="http://www.loc.gov/mods/v3">
>    <mods>
>       ...
>    </mods>
> </modsCollection>
>
> <mods xmlns="http://www.loc.gov/mods/v3">
>       ...
> </mods>

Ok, I see.

Mods defines both the "mods record" and "mods collection"  where the latter
is a collection of records.

(So <mods> or <modsCollection> can be the root, for a mods record or mods
collection respectively.)

A solution (to the apparent complexity and confusion that this causes) is to
define a separate schema for modsCollection.

We did discuss this long ago and decided it wasn't necessary, but I wouldn't
object to revisiting this.  You could propose it for version 4.

Another suggestion has been to dissalow <mods> as a root, so that
<modsCollection> would wrap even a single mods record. I would  oppose this
approach but would not oppose a  separate schema.

--Ray