[OAI-implementers] re: ListMetadataFormats problem

Thomas G. Habing thabing@uiuc.edu
Fri, 09 Feb 2001 16:10:09 -0600


Herbert:

While the current OAI spec is clearly workable for the time being using
techniques such as what you and Carl suggest, we do think that it would be
desirable in a future revision to allow for references to multiple
namespaces and XSDs per metadataPrefix in a response ListMetadataFormats.  

For instance, the response to XML Schemas Last Call item 12
(http://www.w3.org/2000/05/12-xmlschema-lcissues.html#exporting-attributes)
talks about the desirability of writing schemas to allow later extensions
unknown to the original schema using other techniques than import statements
within an XSD. (See specifically Dan Connolly's comment: "I think it's
clearly preferable to have one schema for XHTML, one for SMIL, one for SVG,
and one for MathML that can be used together in compound documents; rather
than one for XHTML+MathML, one for XHTML+MathML+SVG, etc. for a total of N!
schemas.") 

In the meantime we can build for use with OAI brief XSDs that import and
merge other canonical metadata XSDs as necessary.

Tom Habing
Tim Cole
University of Illinois

herbert van de sompel wrote:
> 
> I am completely on the same line of thinking with Carl, here.  There
> needs to be a one-to-one relationship between a metadataPrefix and the
> location of a schema describing the metadataformat represented by that
> metadataPrefix.  If that metadataformats wants to draw from multiple
> namespaces, that is fine, but that should be declared in the schema for
> the metadataformat as Carl indicates.  Building on Carl's example, a
> repo working with the CARL metadataformat would reply to the
> ListMetadataFormat verb as:
> 
> <?xml version="1.0" encoding="UTF-8"?>
>   <ListMetadataFormats
> 
> xmlns="http://www.openarchives.org/OAI/1.0/OAI_ListMetadataFormats"
>       xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
> 
> xsi:schemaLocation="http://www.openarchives.org/OAI/1.0/OAI_ListMetadataFormats
> 
> http://www.openarchives.org/OAI/1.0/OAI_ListMetadataFormats.xsd">
>     <responseDate>2000-10-01T19:20:30-04:00</responseDate>
>     <requestURL>http://an.oa.org/OAI-script?verb=ListMetadataFormats
> 
> &amp;identifier=oai%3AarXiv%3Ahep-th%2F9901001</requestURL>
>     <metadataFormat>
>       <metadataPrefix>oai_CARL</metadataPrefix>
>       <schema>http://foo.org/carlmeta.xsd</schema>
>       <metadataNamespace>http://foo.org/carlmeta</metadataNamespace>
>     </metadataFormat>
>     <metadataFormat>
>       <metadataPrefix>oai_dc</metadataPrefix>
>       <schema>http://www.openarchives.org/OAI/dc.xsd</schema>
> 
> <metadataNamespace>http://purl.org/dc/elements/1.1/</metadataNamespace>
>     </metadataFormat>
> </ListMetadataFormats>
> 
> That is, the repo undertands oai_CARL as a metadataPrefix, and it points
> at http://foo.org/carlmeta.xsd as the location of the corresponding
> schema.  That carlmetadata.xsd schema will declare the import of
> whichever other metadataformats it wants to build upon.  See XML Primer
> section "5. Advanced Concepts III: The Quarterly Report"
> (http://www.w3.org/TR/xmlschema-0/#quartelyReport) for an example
> (report.xsd) that shows how this can be done.
> 
> If, in our example, the CARL formats want to use DC elements, I think
> that the top part of the carlmetadata.xsd schema would look like:
> 
> <schema targetNamespace="http://foo.org/carlmeta"
>                       xmlns="http://www.w3.org/2000/08/XMLSchema"
>                       xmlns:carl="http://foo.org/carlmeta"
>                       xmlns:dc="http://purl.org/dc/elements/1.1/"
>                       elementFormDefault="qualified">
> 
> <!-- import DC -->
> <import namespace="http://purl.org/dc/elements/1.1/"/>
> 
> <element name="oai_carl" type=carl:carlType>
> 
> <complexType name="carlType">
>  <sequence>
>    <element name="element1" type="string"/>
>    <element name="element2" type="carl:element2Type"/>
>    <element name="element3" type="dc:creator"/>
>  </sequence>
> </complexType>
> 
> ....
> 
> greetings
> 
> herbert
> 
> lagoze@CS.Cornell.EDU wrote:
> >
> > 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.
> >
> > Carl
> >
> > > -----Original Message-----
> > > From: Young,Jeff [mailto:jyoung@oclc.org]
> > > Sent: Tuesday, January 30, 2001 4:58 PM
> > > To: 'lagoze@cs.cornell.edu'
> > > 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?
> > >
> > > Jeff
> > >
> > > > -----Original Message-----
> > > > From: Young,Jeff [mailto:jyoung@oclc.org]
> > > > 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:      jyoung@oclc.org
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > OAI-implementers mailing list
> > > > OAI-implementers@oaisrv.nsdl.cornell.edu
> > > > http://oaisrv.nsdl.cornell.edu/mailman/listinfo/oai-implementers
> > > >
> > >
> > _______________________________________________
> > OAI-implementers mailing list
> > OAI-implementers@oaisrv.nsdl.cornell.edu
> > http://oaisrv.nsdl.cornell.edu/mailman/listinfo/oai-implementers
> 
> --
> Herbert Van de Sompel
> Visiting Assistant Professor
> Cornell University -- Computer Science
> tel + 1 - 607 - 255 - 3085
> fax + 1 - 607 - 255 - 4428
> http://www.cs.cornell.edu/people/herbertv/
> digital life in libraries used to be primitive
> --
> Herbert Van de Sompel
> Visiting Assistant Professor
> Cornell University -- Computer Science
> tel + 1 - 607 - 255 - 3085
> fax + 1 - 607 - 255 - 4428
> http://www.cs.cornell.edu/people/herbertv/
> digital life in libraries used to be primitive
> _______________________________________________
> OAI-implementers mailing list
> OAI-implementers@oaisrv.nsdl.cornell.edu
> http://oaisrv.nsdl.cornell.edu/mailman/listinfo/oai-implementers

-- 
Thomas G. Habing
Research Programmer, Digital Library Initiative
University of Illinois at Urbana-Champaign
052 Grainger Engineering Library, MC-274
thabing@uiuc.edu, (217) 244-7809