[OAI-implementers] metadataPrefix and the returned XML records

Alan Kent ajk@mds.rmit.edu.au
Wed, 24 Jul 2002 17:19:06 +1000


Hi all,

This may be a stupid question, but its one that I never really worried
about before - it sort of does not matter, but am curious to know the
"why" etc.

When doing a ListRecords etc, you specify the metadataPrefix. All servers
must support "oai_dc", but you can have other ones.

The returned records are of course XML encoded. Possible XML is

    <oai_dc:dc 
	    xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" 
	    xmlns:DC="http://purl.org/dc/elements/1.1/"
	    xmlns:dcxml="http://purl.org/dc/xml/"
	    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	    xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ 
		http://www.openarchives.org/OAI/2.0/oai_dc.xsd">

	<DC:title>...</DC:title>
	...

    </oai_dc:dc>

Is there any requirement that the XML prefix name in the returned XML
be the same as the metadataPrefix requested? For example, could I have
said

    <XYZZY:dc 
	    xmlns:XYZZY="http://www.openarchives.org/OAI/2.0/oai_dc/" 
	    xmlns:DC="http://purl.org/dc/elements/1.1/"
	    xmlns:dcxml="http://purl.org/dc/xml/"
	    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	    xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ 
		http://www.openarchives.org/OAI/2.0/oai_dc.xsd">

	<DC:title>...</DC:title>
	...

    </XYZZY:dc>

The URI of XYZZY still identifiers the OAI DC format, but the root element
name is no longer oai_dc. When dealing in XML with namespaces, the
prefix name should not be significant - its the URI associated with
the prefix that is important.

I could read the spec, but I am actually more curious about what is
in people's minds. I can understand it possibily being a historical
issue. Or a "its good to use the same name" etc. I have no objections
using the same name, just more curious about the history of it in
case there is some subtle aspect that had not registered before.

I also some people wanting to define a new XML structure to use for
records, and I was wanting to make sure I did not make a bad suggestion
for the metadataPrefix name, or go against convention etc. Maybe the
implementors notes has a section on how to select "good" metadataPrefix
names.

Ok, maybe I should go and read the spec first. But I have typed
up all this mail now so I am going to send it anyway! :-)

Thanks!
Alan