[OAI-implementers] ListMetadataFormats problem
Wed, 31 Jan 2001 07:15:15 -0500
Jeff, I think you've got the wrong approach here. Having spent the last
hour or so staring at the xml schema primer at
http://www.w3.org/TR/xmlschema-0 I found the explanation on importing
types at http://www.w3.org/TR/xmlschema-0/#import. Using this mechanism
you can pull in types (elements) from another namespace. E.g., you
could define a schema carlmeta.xsd with a target namespace
http://foo.org/carlmeta with an import of
http://purl.org/dc/elements/1.1. I quote the primer:
When schema components are imported from multiple namespaces, each
namespace must be identified with a separate import element. The import
elements themselves must appear as the first children of the schema
element. Furthermore, each namespace must be associated with a prefix,
using a standard namespace declaration, and that prefix is used to
qualify references to any schema components belonging to that namespace.
Finally, import elements optionally contain a schemaLocation attribute
to help locate resources associated with the namespaces.
Don't have time now to experiment with this but coming up with an
example shouldn't be too hard.
> -----Original Message-----
> From: Young,Jeff [mailto:email@example.com]
> Sent: Tuesday, January 30, 2001 4:58 PM
> To: 'firstname.lastname@example.org'
> Subject: FW: [OAI-implementers] ListMetadataFormats problem
> Hi Carl,
> I don't think things are as simple as I'd hoped. I want to
> check with you
> first, though, before I stir up more confusion in the
> listserv. Apparently,
> the xsi:schemaLocation element expects namespaces to be
> paired with schema
> locations. If this is true, then a single schema won't work for the
> application I described below. Is there any reason that
> schemas can't be
> repeatable as well as namespaces in relation to metadata formats?
> > -----Original Message-----
> > From: Young,Jeff [mailto:email@example.com]
> > Sent: Tuesday, January 30, 2001 4:01 PM
> > To: 'OAI-implementers'
> > Subject: [OAI-implementers] ListMetadataFormats problem
> > I'm working on an OAI repository for a group that wants to
> > define it's own
> > metadata format. The trick is, this format will be a
> > combination of Dublin
> > Core elements and some new elements yet to be defined. The
> > examples in the
> > OAI specs, however, all assume that the metadata will consist
> > of elements
> > from a single namespace. I believe, for the most part, that
> > the OAI spec
> > doesn't preclude the use of multiple namespaces. For example,
> > I imagine that
> > the following XML fragment is likely to be acceptable:
> > <combined xmlns:dc="http://purl.org/dc/elements/1.1/"
> > xmlns:myelems="http://www.myelems.com/"
> > xmlns:xsi="..."
> > xsi:schemaLocation="http://purl.org/dc/elements/1.1/
> > http://www.myelems.com/
> > http://www.myelems.com/combined.xsd">
> > <dc:title>This is the title</dc:title>
> > <myelems:shoesize>12</myelems:shoesize>
> > </combined>
> > (As far as I can tell, specifying multiple namespaces in the
> > xsi:schemaLocation attribute is perfectly valid.)
> > Assuming no one sees any problems with this, I do think I see
> > a problem with
> > ListMetadataFormats.xsd. Now that multiple namespaces are
> > involved, I expect
> > that ListMetadataFormats will need to accommodate them with multiple
> > metadataNamespace elements. The XML schema for
> > ListMetadataFormats, however,
> > sets the maxOccurs for metadataNamespace to one. I suspect
> > this is easily
> > changed to unbounded.
> > Hopefully, the problem is no more involved than this, but
> > someone may want
> > to check my assumptions.
> > Thanks,
> > Jeff
> > ---
> > Jeffrey A. Young
> > Senior Consulting Systems Analyst
> > Office of Research, Mail Code 710
> > OCLC Online Computer Library Center, Inc.
> > 6565 Frantz Road
> > Dublin, OH 43017-3395
> > www.oclc.org
> > Voice: 614-764-4342
> > Fax: 614-764-2344
> > Email: firstname.lastname@example.org
> > _______________________________________________
> > OAI-implementers mailing list
> > OAIemail@example.com
> > http://oaisrv.nsdl.cornell.edu/mailman/listinfo/oai-implementers