mcepp

Abstract

An MCE PreProcessor.

Ussage

mcepp [--understands NAMESPACE] [--out FILENAME] [--indent] [--raw] [FILENAME | - ]

Sample 1

> mcepp test_docs/mce/circles-alternatecontent.xml

will output
<?xml version="1.0"?>
<Circles xmlns="http://schemas.openxmlformats.org/Circles/v1" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:v2="http://schemas.openxmlformats.org/Circles/v2" xmlns:v3="http://schemas.openxmlformats.org/Circles/v3">
    <LuminanceFilter Luminance="13">
       <Circle Center="0,0" Radius="20" Color="Blue"/>
       <Circle Center="25,0" Radius="20" Color="Black"/>
       <Circle Center="50,0" Radius="20" Color="Red"/>
       <Circle Center="13,0" Radius="20" Color="Yellow"/>
        <Circle Center="38,0" Radius="20" Color="Green"/>
     </LuminanceFilter>
</Circles>

Sample 2

> mcepp --understands "http://schemas.openxmlformats.org/Circles/v2" test_docs/mce/circles-alternatecontent.xml

will output
<?xml version="1.0"?>
<Circles xmlns="http://schemas.openxmlformats.org/Circles/v1" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:v2="http://schemas.openxmlformats.org/Circles/v2" xmlns:v3="http://schemas.openxmlformats.org/Circles/v3">
   <LuminanceFilter Luminance="13">
      <Circle Center="0,0" Radius="20" Color="Blue" v2:Opacity="0.5"/>
      <Circle Center="25,0" Radius="20" Color="Black" v2:Opacity="0.5"/>
      <Circle Center="50,0" Radius="20" Color="Red" v2:Opacity="0.5"/>
      <Circle Center="13,0" Radius="20" Color="Yellow" v2:Opacity="0.5"/>
      <Circle Center="38,0" Radius="20" Color="Green" v2:Opacity="0.5"/>
   </LuminanceFilter>
</Circles>

Sample 3

> mcepp --understands "http://schemas.openxmlformats.org/Circles/v2" --understands "http://schemas.openxmlformats.org/Circles/v3"  test_docs/mce/circles-alternatecontent.xml

will output
<?xml version="1.0"?>
<Circles xmlns="http://schemas.openxmlformats.org/Circles/v1" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:v2="http://schemas.openxmlformats.org/Circles/v2" xmlns:v3="http://schemas.openxmlformats.org/Circles/v3">
   <v3:Circle Center="0,0" Radius="20" Color="Blue" Opacity="0.5" Luminance="13"/>
   <v3:Circle Center="25,0" Radius="20" Color="Black" Opacity="0.5" Luminance="13"/>
   <v3:Circle Center="50,0" Radius="20" Color="Red" Opacity="0.5" Luminance="13"/>
   <v3:Circle Center="13,0" Radius="20" Color="Yellow" Opacity="0.5" Luminance="13"/>
   <v3:Circle Center="38,0" Radius="20" Color="Green" Opacity="0.5" Luminance="13"/>
</Circles>

Sample 4

> mcepp --raw test_docs/mce/circles-alternatecontent.xml

will output
<?xml version="1.0"?>
<Circles xmlns="http://schemas.openxmlformats.org/Circles/v1" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:v2="http://schemas.openxmlformats.org/Circles/v2" xmlns:v3="http://schemas.openxmlformats.org/Circles/v3" mc:Ignorable="v2 v3">
  <mc:AlternateContent>
    <mc:Choice Requires="v3">
       <v3:Circle Center="0,0" Radius="20" Color="Blue" Opacity="0.5" Luminance="13"/>
       <v3:Circle Center="25,0" Radius="20" Color="Black" Opacity="0.5" Luminance="13"/>
       <v3:Circle Center="50,0" Radius="20" Color="Red" Opacity="0.5" Luminance="13"/>
       <v3:Circle Center="13,0" Radius="20" Color="Yellow" Opacity="0.5" Luminance="13"/>
       <v3:Circle Center="38,0" Radius="20" Color="Green" Opacity="0.5" Luminance="13"/>
    </mc:Choice>
    <mc:Fallback>
       <LuminanceFilter Luminance="13">
          <Circle Center="0,0" Radius="20" Color="Blue" v2:Opacity="0.5"/>
          <Circle Center="25,0" Radius="20" Color="Black" v2:Opacity="0.5"/>
          <Circle Center="50,0" Radius="20" Color="Red" v2:Opacity="0.5"/>
          <Circle Center="13,0" Radius="20" Color="Yellow" v2:Opacity="0.5"/>
          <Circle Center="38,0" Radius="20" Color="Green" v2:Opacity="0.5"/>
       </LuminanceFilter>
    </mc:Fallback>
  </mc:AlternateContent>
</Circles>


Last edited Jun 16, 2011 at 5:08 PM by flr, version 3

Comments

No comments yet.