MCE questions

Chris Rae Chris.Rae at microsoft.com
Tue Aug 2 23:23:02 CEST 2011


Hi Murata-san - as we discussed on the call, my thoughts on this echo Florian's. I think the answer to each of your questions from my point of view is yes (and yes to all the sub-questions) - I am in favour of performing short-circuit style evaluation here and just ignoring the entire content of the element, regardless of whether it contains further MCE instructions (valid or invalid).

I'd be interested to hear what others in WG4 felt.

Chris

-----Original Message-----
From: MURATA Makoto (FAMILY Given) [mailto:eb2m-mrt at asahi-net.or.jp] 
Sent: 23 July 2011 03:14
To: SC34
Subject: MCE questions

Dear colleagues,

The more I think about the processing model of MCE, the more questions 
I have.   Here goes.

Q1. Suppose that an element is ignored.  Is anything in this element allowed by MCE?  In particular, are (1), (2), and (3) (shown below) allowed?

  (1) @mustUnderstand specifying a non-understsood namespace
  (2) non-understood and non-ignorable elements/attributes
  (3) Incorrect use of MCE elements and attributes

For example:

<U:foo xmlns:mce="http://schemas.openxmlformats.org/markup-compatibility/2006" 
     xmlns:U="http://understood.com/"
     xmlns:NU1="http://non-understood.com/one"
     xmlns:NU2="http://non-understood.com/two"
     mce:ignorable="NU1">
  <NU1:bar mce:mustUnderstand="NU2"/>  <!-- Example of (1) -->
  <NU1:bar>
      <NU2:hoge/>                                        <!-- Example of (2) -->
  </NU1:bar>
  <NU1:bar mce:Ignorable="1"/>                  <!-- Example of (3) -->
</U:foo>

where "http://understood.com/" is understood while neither "http://non-understood.com/one" nor "http://non-understood.com/two" is understood.

Q2: Also suppose that a Choice or Fallback is not chosen by the MCE processor.  Is anything in this element allowed by MCE?  In particular, are (1), (2), and (3) (shown in Q1) allowed?

For example:

<?xml version="1.0" encoding="UTF-8"?>
<U1:foo xmlns:mce="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:U1="http://understood.com/one"
    xmlns:U2="http://understood.com/two"
    xmlns:NU1="http://non-understood.com/one"
    xmlns:NU2="http://non-understood.com/two"
    mce:ignorable="NU1">
    <mce:AlternateContent>
        <mce:Choice Requires="U2">
            <U2:bar/>
        </mce:Choice>
        <mce:Fallback>
            <U1:hoge1 mce:mustUnderstand="NU2"> <!-- Example of (1) -->
                <NU2:hoge/>                                      <!-- Example of (2) -->
                <U1:hoge2 mce:Ignorable="1"/>          <!-- Example of (3) -->
            </U1:hoge1>
        </mce:Fallback>
    </mce:AlternateContent>
</U1:foo>


Q3: Is anything in an application-defined extension element allowed by the MCE preprocessor?  In particular, is syntactically-incorrect use of MCE elements and attributes allowed?

<extLst  xmlns:mce="http://schemas.openxmlformats.org/markup-compatibility/2006">
  <ext uri='http://purl.oclc.org/ooxml/spreadsheetml/versionTwoExtension'> 
    <v2:newContent 
        xmln:v2='http://purl.oclc.org/ooxml/spreadsheetml/versionTwoExtension'
        mce:mustUnderstand="1">                  <!-- Example of incorrect @mustUnderstand-->
        <mce:Choice Requires="3">                <!-- Example of incorrect Choice-->
              <mce:Fallback>                            <!-- Example of incorrect Fallback-->
                    <mce:AlternateContent/>       <!-- Example of incorrect AlternateContent -->
              </mce:Fallback>
        </mce:Choice>
    </v2:newContent>
  </ext>
  <ext uri='http://www.extension.com/versionOneExtension'> 
    <v2:moreContent xmlsn:v2='http://www.extension.com/versionOneExtension'> 
      ... 
    </v2:moreContent>
  </ext>
</extLst>

Cheers,
Makoto



More information about the sc34wg4 mailing list