Archived / Obsolete Documentation

Documentation in this space is no longer accurate.
Looking for official DSpace documentation? See all documentation

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

<?xml version="1.0" encoding="utf-8"?>
<html>

XML Namespaces for DSpace

Introduction

Any application that makes up its own XML elements should
have its own namespace (or namespaces) for them, especially if the
XML it emits might possibly get merged with XML from other applications.
See this http://www.w3.org/TR/xml-names11/ W3C document on XML Namespaces
for background if you are not familiar with the topic already.
Essentially, an XML namespace is identified by a unique URI. Every
name in an XML object (e.g. element name, attribute name) can optionally
have a namespace attached. If you create an XML schema for your application,
apply your namespace to all the names that have to be globally unique. Sometimes
you'll intentionally use names in other namespaces, e.g.

xml:lang

, but
applying your own namespace to yor names prevents unintentional collisions.

Why does DSpace need a Namespace?

DSpace uses several XML documents and fragments of its own specification:

  • Extensions to WebDAV (such as properties) in the LightweightNetworkInterface
  • The XML schema for DspaceIntermediateMetadata
  • bitstream
    element for wrapping image data in LightweightNetworkInterface
  • Submit forms configuration file `input-forms.xml`
  • Initializers for the bitstream-format and DC-type registries, `bitstream-formats.xml` and `dublin-core-types.xml`.
  • The XML URI uses a name space and schema to represent an abstract DSpace page before being stylized by a theme.
    To allow validation, each XML application with an http://www.w3.org/XML/Schema XML Schema needs its own namespace, so we have to allow for multiple namespaces.

Proposed Implementation

A namespace is identified by a URI. This URI does not need to be valid
or resolvable, it only has to conform to URI syntax. It does have to be
stable, that is, once documented it MUST never change since it will
get coded into many applications.
I propose this "base" URI for DSpace XML namespaces, since it is simple and builds on the domain name already associated with DSpace:

This namespace is ONLY for XML fragments and extension elements to be embedded in other
documents, such as in WebDAV extensions. These elements must not need a schema, or else they
should be in a specific application namespace.
Any DSpace XML application with a schema must take a namespace "under" the base, such as, for ''DSpace
Intermediate Metadata'':

Examples

The recommended abbreviation for the base namespace is, of course, "dspace", so
typical XML expressions would look like:

<dspace:frobnitz xmlns:dspace="http://www.dspace.org/xmlns/dspace">
..some content..
</dspace:frobnitz>

A DIM record with a schema might look like this:

<?xml version="1.0">
<dim:dim xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
schemaLocation="http://www.dspace.org/xmlns/dspace/dim
http://www.dspace.org/schema/dim.xsd">
..some content..
</dim:dim>

Note that the actual location of the schema is just a placeholder, although ideally schemas can be
posted on the `dspace.org` website.

Questions? Opinions?

<i>This page was posted to get feedback and approval for the idea of a
single DSpace XML namespace, and for the proposed URI to identify it.</i>

Are we going to publish a schema for this namespace? – ScottPhillips

XmlNamespaces/CwspaceImscp – Wiki subpage for http://cwspace.mit.edu/ CWSpace intended use of namespace in the

 imsmanifest.xml 

file for http://www.imsglobal.org/content/packaging/index.html IMS Content Packages, as used with DSpace:

 <manifest xmlns:cwsp="http://www.dspace.org/xmlns/cwspace_imscp" 

WilliamReilly March 3, 2006

</html>

  • No labels