commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas W <4...@log1.net>
Subject Betwixt 0.8 and XML namespace definitions
Date Tue, 06 Oct 2009 14:29:19 GMT
I have the following definition for one of my classes:

saved in a file OaDC.betwixt

<?xml version="1.0"?>
<info primitiveTypes="element">
  <element name="dc" uri="http://www.openarchives.org/OAI/2.0/oai_dc/">
    <element name="title" property="title" uri="
http://purl.org/dc/elements/1.1/"/>
    <element name="creator" property="creator" uri="
http://purl.org/dc/elements/1.1/"/>
    <element name="publisher" property="publisher" uri="
http://purl.org/dc/elements/1.1/"/>
    <element name="description" property="description" uri="
http://purl.org/dc/elements/1.1/"/>
    <element name="identifier" property="identifier" uri="
http://purl.org/dc/elements/1.1/"/>
    <element name="subject" property="subject" uri="
http://purl.org/dc/elements/1.1/"/>
  </element>
</info>

The beanwriter has  extra configuration of the NamespacePrefixMapper like
this:

prefixMapper.setPrefix("http://purl.org/dc/elements/1.1/", "dc");
prefixMapper.setPrefix("http://www.openarchives.org/OAI/2.0/oai_dc/",
"oai_dc");

However the XML generated is like this:

<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/">
    <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Sample
Title</dc:title>
    <dc:creator>Sample Creator</dc:creator>
    <dc:publisher>Sample Publisher</dc:publisher>
    <dc:description>Sample Description</dc:description>
    <dc:identifier>Sample Identifier</dc:identifier>
    <dc:subject>Sample Subject</dc:subject>
  </oai_dc:dc>

This seems to be causing a problem in that the xmlns:dc definition either
should be repeated for every dc element, or should be in the parent element.
Could anyone please let me know If I am doing anything wrong, or if I should
file a bug in buzilla!

Thanks in advance,
Nicholas W.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message