Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Reserved extensions in DS-COMPOSITE

Schema Extension

Now that there is a system in place for extensions to DS-COMPOSITE, looking at extensions become worthwhile. It can be said that there are three kinds of datastreams in a Fedora object:

1. xml embedded in the object (inline content)
2. bytes embedded in the object (managed content)
3. external file referenced by URL. (External and Redirect content)

We have reserved two extention names.

  • "Schema" - used to specify that the datastream content must adhere to a schema
  • "Ontology" - used to specify constraints on the relations from this datastream as defined in RELS-INT

That leaves the question on where to place the content (schema/ontology). The schema extension will only concern itself with the first option, namely the xml embedded in the datastream. For XML, there already exist a commonly accepted system for specifying the content, i.e. XML Schema. But where to place the schema, then? Embedding it directly in DS-COMPOSITE makes for a very unreadable datastream. Alternatively, you could just specify an URL to the schema, but this approach have problems too. Having the Content Model depend on schemas defined elsewhere, perhaps on remote servers, mean that the content models could break by actions totally unrelated to the repository. The best way, we have found, is to embed the schema in a datastream in the content model. To do this, we make use of the <reference> element, which we added the the schema above.

Code Block
<dsCompositeModel
        xmlns="info:fedora/fedora-system:def/dsCompositeModel#"
        xmlns:schema="http://ecm.sourceforge.net/types/dscompositeschema/0/1/#">

    <!-- The DC datastream is declared. It's mime type must be text/xml. It must adhere to the xml schema residing in the DC_SCHEMA datastream in this content model. -->
    <dsTypeModel ID="DC">
        <form MIME="text/xml"/>
        <extension name="SCHEMA">
            <reference type="xsd" datastream="DC_SCHEMA"/>
        </extensions>
    </dsTypeModel>

    <!-- The ORIGIN datastream is declared. It's mime type must be text/xml. It must adhere to the xml schema residing in the ORIGIN_SCHEMA datastream in this content model-->
    <dsTypeModel ID="ORIGIN">
        <form MIME="text/xml"/>
        <extension name="SCHEMA">
            <reference type="xsd" datastream="ORIGIN_SCHEMA"/>
        </extensions>
    </dsTypeModel>

</dsCompositeModel>

Schema Extension

There are three kinds of datastreams in a Fedora object:

1. xml embedded in the object (inline content)
2. bytes embedded in the object (managed content)
3. external file referenced by URL. (External and Redirect content)

The schema extension will only concern itself with the first option, namely the xml embedded in the datastream. For XML, there already exist a commonly accepted system for specifying the content, i.e. XML Schema.

MORE ON THIS LATER