An instruction file for MCE initialization

Alex Brown alexb at griffinbrown.co.uk
Thu Jul 7 19:05:55 CEST 2011


Yes, this kind of thing.

I think it should be an informal part of the MCE Standard.

- Alex.

-----Original Message-----
From: MURATA Makoto (FAMILY Given) [mailto:eb2m-mrt at asahi-net.or.jp] 
Sent: 07 July 2011 01:26
To: SC34
Subject: An instruction file for MCE initialization

Dear colleagues,

In Berlin, Florian proposed to introduce an initialization step in the MCE processing model.  It creates a set of understood namespaces and a set of (namespace, local name) pairs for suppressing MCE processing.
Alex then proposed that an XML language for describing these two sets should be introduced as part of the MCE revision.

There were no agreements in WG4 yet.  However, to facilitate productive discussions,  I would like to present such a language.

First, here is an example document in my prototypical language.  It is meant to capture what MCE does for OOXML implementations.

<?xml version="1.0" encoding="UTF-8"?>
<MCEInstruction xmlns="http://purl.oclc.org/MCE/1.0">
    <understand>
        <namespace ns="http://purl.oclc.org/ooxml/drawingml/chart"/>
        <namespace ns="http://purl.oclc.org/ooxml/drawingml/chartDrawing"/>
        <namespace ns="http://purl.oclc.org/ooxml/drawingml/diagram"/>
        <namespace ns="http://purl.oclc.org/ooxml/drawingml/lockedCanvas"/>
        <namespace ns="http://purl.oclc.org/ooxml/drawingml/main"/>
        <namespace ns="http://purl.oclc.org/ooxml/drawingml/picture"/>
        <namespace ns="http://purl.oclc.org/ooxml/officeDocument/math"/>
        <namespace ns="http://purl.oclc.org/ooxml/officeDocument/relationships"/>
        <namespace ns="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"/>
        <namespace ns="http://purl.oclc.org/ooxml/presentationml/main"/>
        <namespace ns="http://purl.oclc.org/ooxml/schemaLibrary/main"/>
        <namespace ns="http://purl.oclc.org/ooxml/spreadsheetml/main"/>
        <namespace ns="http://purl.oclc.org/ooxml/wordprocessingml/main"/>
    </understand>
    <skip>
        <pair ns="http://purl.oclc.org/ooxml/drawingml/chart" localName="extLst"/>
        <pair ns="http://purl.oclc.org/ooxml/presentationml/main" localName="extLst"/>
        <pair ns="http://purl.oclc.org/ooxml/spreadsheetml/main" localName="extLst"/>
    </skip>
</MCEInstruction>

Second, here are two schemas for this language: RNC and XSD.  The attribute wildCard is meant to allow the use of a wild card character for describing understood namespaces.  By default, "*" is assumed to be a wildcard character.

Comments are very welcome.  I plan to store these files in the SVN repository soon.

1) RNC

default namespace = "http://purl.oclc.org/MCE/1.0"

start = element MCEInstruction { understand, skip } understand = element understand { understoodNamespace* } understoodNamespace =
    element namespace {
        attribute ns { xsd:string },
        attribute wildCard {
            xsd:string { maxLength = "1" }
        }?
    }
skip = element skip { pair* }
pair =
    element pair {
        attribute ns { xsd:string },
        attribute localName { xsd:NCName }
    }

2) XSD

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://purl.oclc.org/MCE/1.0" xmlns:mce="http://purl.oclc.org/MCE/1.0">
  <xs:element name="MCEInstruction">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="mce:understand"/>
        <xs:element ref="mce:skip"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="understand">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="mce:namespace"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="namespace">
    <xs:complexType>
      <xs:attribute name="ns" use="required" type="xs:string"/>
      <xs:attribute name="wildCard">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="1"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="skip">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="mce:pair"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="pair">
    <xs:complexType>
      <xs:attribute name="ns" use="required" type="xs:string"/>
      <xs:attribute name="localName" use="required" type="xs:NCName"/>
    </xs:complexType>
  </xs:element>
</xs:schema>


Cheers,
Makoto

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


More information about the sc34wg4 mailing list