DR 10-0026 ? OPC: dc:creator only once within a coreProperties element

MURATA Makoto eb2m-mrt at asahi-net.or.jp
Tue Dec 7 02:58:14 CET 2010


Dear colleagues,


Assuming that we create a new part in the multi-part
standard, I wrote schemas for two possible approaches.
One uses a wrapper element having child dc:* elements
with xml:lang.  The other introduces an (intended to be
ignorable) alternateScript attribute.


Possibility A:  Wrap dc:* elements using MCE


default namespace = "http://purl.org/foo"
namespace dc = "http://purl.org/dc/elements/1.1/"

RNG schema: wrappedDC.rnc

start = element wrapper (
   element dc:creator { xml_lang?, SimpleLiteral } |
   element dc:description { xml_lang?, SimpleLiteral } |
   element dc:identifier { xml_lang?, SimpleLiteral }
   element dc:subject { xml_lang?, SimpleLiteral } |
   element dc:title { xml_lang?, SimpleLiteral } )
SimpleLiteral = xml_lang?,  xsd:string


NVDL schema:

(Needs more work for allowing MCE elems and atts)

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0" startMode="top">
  <mode name="top">
    <namespace ns="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">
      <validate schema="opc-coreProperties.xsd">
        <namespace ns="http://purl.org/dc/elements/1.1/"><attach/></namespace>
        <namespace ns="http://purl.org/dc/terms/"><attach/></namespace>
        <context path="coreProperties">
          <mode>
            <namespace ns=http://purl.org/foo">
              <validate schema="wrappedDC.rnc"
schemaType="application/relax-ng-compact-syntax">
                <mode>
                   <anyNamespace><disAllow/></anyNamespace>
                </mode>
              </validate>
            </namespace>
          </mode>
        </context>
      </validate>
    </namespace>
  </mode>
</rules>


Possibility B:  Add an ignorable attribute to dc:* elements using MCE

RNG schema:

attribute alternateScript { xsd:string }

NVDL schema:

(Needs more work for allowing MCE elems and atts)

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0" startMode="top">
  <mode name="top">
    <namespace ns="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">
      <validate schema="opc-coreProperties.xsd">
        <namespace ns="http://purl.org/dc/elements/1.1/">
          <attach>
            <context path="creator | description | identifier |
subject | title">
              <mode>
                <namespace ns=http://purl.org/foo" match="attributes">
                  <validate schema="xmlatts.rnc"
schemaType="application/relax-ng-compact-syntax">
                </namespace>
              </mode>
            </context>
          </attach>
        </namespace>
        <namespace ns="http://purl.org/dc/terms/"><attach/></namespace>
      </validate>
    </namespace>
  </mode>
</rules>

Cheers,
Makoto
 <EB2M-MRT at asahi-net.or.jp>


More information about the sc34wg4 mailing list