[OAI-implementers] Namespaces in elements

Hussein Suleman hussein@cs.uct.ac.za
Tue, 29 Apr 2003 16:12:03 +0200


hi

(disclaimer: i use xsltproc and not MSXML so this 'may' not work)

after looking at Jeff's comments, i wonder if maybe you did not declare 
both the "oai_dc" (from OAI) and "dc" (from DC) namespaces. for example, 
when i write stylesheets to transform into dc, i usually start with:

<xsl:stylesheet version='1.0'
  xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
  xmlns:oaidc='http://www.openarchives.org/OAI/2.0/oai_dc/'
  xmlns:dc='http://purl.org/dc/elements/1.1/'
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  xmlns:source="whatever"
 >

then the actual transform starts as follows:

<xsl:template match="source:root">
    <oaidc:dc 
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ 
http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
       <dc:title><xsl:value-of select="source:title"/></dc:title>
    ...

hope this is useful. if you want to see some similar stylesheets, there 
are a few like this included as examples in the XMLFile package (linked 
off the OAI tools page).

ttfn,
----hussein


Jozef Kruger wrote:
> Hi everybody,
> 
> I just implemented the output of my oai server by transforming our own
> xml format to for example dublin core (each supported output format
> having it's own .xsl stylesheet), however, in the transformed xml MSXML
> has replicated the dublin core namespace for each dc element:
> <dc:title
> xmlns:dc="http://purl.org/dc/elements/1.1/">Walangara</dc:title> 
> Where it was:
> <dc:title>Walangara</dc:title> 
> 
> My question is, is this a problem?
> Hussein's repository explorer does NOT complain about this, so that made
> me feel a little confident.
> 
> Cheers,
> Jozef Kruger (Adlib Information Systems B.V. the Netherlands)
> _______________________________________________
> OAI-implementers mailing list
> List information, archives, preferences and to unsubscribe:
> http://oaisrv.nsdl.cornell.edu/mailman/listinfo/oai-implementers
> 


-- 
=====================================================================
hussein suleman ~ hussein@cs.uct.ac.za ~ http://www.husseinsspace.com
=====================================================================