vendor: amis 6.13.0 base (fork root)

This commit is contained in:
2026-06-16 22:14:57 +08:00
commit 8c8e4247a9
3840 changed files with 2467374 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:a="http://purl.oclc.org/ooxml/drawingml/main"
xmlns="http://purl.oclc.org/ooxml/drawingml/chartDrawing"
targetNamespace="http://purl.oclc.org/ooxml/drawingml/chartDrawing" elementFormDefault="qualified">
<xsd:import namespace="http://purl.oclc.org/ooxml/drawingml/main" schemaLocation="dml-main.xsd"/>
<xsd:complexType name="CT_ShapeNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvSpPr" type="a:CT_NonVisualDrawingShapeProps" minOccurs="1" maxOccurs="1"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Shape">
<xsd:sequence>
<xsd:element name="nvSpPr" type="CT_ShapeNonVisual" minOccurs="1" maxOccurs="1"/>
<xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="style" type="a:CT_ShapeStyle" minOccurs="0" maxOccurs="1"/>
<xsd:element name="txBody" type="a:CT_TextBody" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="macro" type="xsd:string" use="optional"/>
<xsd:attribute name="textlink" type="xsd:string" use="optional"/>
<xsd:attribute name="fLocksText" type="xsd:boolean" use="optional" default="true"/>
<xsd:attribute name="fPublished" type="xsd:boolean" use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="CT_ConnectorNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvCxnSpPr" type="a:CT_NonVisualConnectorProperties" minOccurs="1"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Connector">
<xsd:sequence>
<xsd:element name="nvCxnSpPr" type="CT_ConnectorNonVisual" minOccurs="1" maxOccurs="1"/>
<xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="style" type="a:CT_ShapeStyle" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="macro" type="xsd:string" use="optional"/>
<xsd:attribute name="fPublished" type="xsd:boolean" use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="CT_PictureNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvPicPr" type="a:CT_NonVisualPictureProperties" minOccurs="1"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Picture">
<xsd:sequence>
<xsd:element name="nvPicPr" type="CT_PictureNonVisual" minOccurs="1" maxOccurs="1"/>
<xsd:element name="blipFill" type="a:CT_BlipFillProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="style" type="a:CT_ShapeStyle" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="macro" type="xsd:string" use="optional" default=""/>
<xsd:attribute name="fPublished" type="xsd:boolean" use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="CT_GraphicFrameNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvGraphicFramePr" type="a:CT_NonVisualGraphicFrameProperties"
minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_GraphicFrame">
<xsd:sequence>
<xsd:element name="nvGraphicFramePr" type="CT_GraphicFrameNonVisual" minOccurs="1"
maxOccurs="1"/>
<xsd:element name="xfrm" type="a:CT_Transform2D" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="a:graphic" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="macro" type="xsd:string" use="optional"/>
<xsd:attribute name="fPublished" type="xsd:boolean" use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="CT_GroupShapeNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvGrpSpPr" type="a:CT_NonVisualGroupDrawingShapeProps" minOccurs="1"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_GroupShape">
<xsd:sequence>
<xsd:element name="nvGrpSpPr" type="CT_GroupShapeNonVisual" minOccurs="1" maxOccurs="1"/>
<xsd:element name="grpSpPr" type="a:CT_GroupShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="sp" type="CT_Shape"/>
<xsd:element name="grpSp" type="CT_GroupShape"/>
<xsd:element name="graphicFrame" type="CT_GraphicFrame"/>
<xsd:element name="cxnSp" type="CT_Connector"/>
<xsd:element name="pic" type="CT_Picture"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="EG_ObjectChoices">
<xsd:sequence>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element name="sp" type="CT_Shape"/>
<xsd:element name="grpSp" type="CT_GroupShape"/>
<xsd:element name="graphicFrame" type="CT_GraphicFrame"/>
<xsd:element name="cxnSp" type="CT_Connector"/>
<xsd:element name="pic" type="CT_Picture"/>
</xsd:choice>
</xsd:sequence>
</xsd:group>
<xsd:simpleType name="ST_MarkerCoordinate">
<xsd:restriction base="xsd:double">
<xsd:minInclusive value="0.0"/>
<xsd:maxInclusive value="1.0"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Marker">
<xsd:sequence>
<xsd:element name="x" type="ST_MarkerCoordinate" minOccurs="1" maxOccurs="1"/>
<xsd:element name="y" type="ST_MarkerCoordinate" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_RelSizeAnchor">
<xsd:sequence>
<xsd:element name="from" type="CT_Marker"/>
<xsd:element name="to" type="CT_Marker"/>
<xsd:group ref="EG_ObjectChoices"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_AbsSizeAnchor">
<xsd:sequence>
<xsd:element name="from" type="CT_Marker"/>
<xsd:element name="ext" type="a:CT_PositiveSize2D"/>
<xsd:group ref="EG_ObjectChoices"/>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="EG_Anchor">
<xsd:choice>
<xsd:element name="relSizeAnchor" type="CT_RelSizeAnchor"/>
<xsd:element name="absSizeAnchor" type="CT_AbsSizeAnchor"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="CT_Drawing">
<xsd:sequence>
<xsd:group ref="EG_Anchor" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/drawingml/lockedCanvas"
xmlns:a="http://purl.oclc.org/ooxml/drawingml/main"
xmlns:r="http://purl.oclc.org/ooxml/officeDocument/relationships" elementFormDefault="qualified"
targetNamespace="http://purl.oclc.org/ooxml/drawingml/lockedCanvas">
<xsd:import namespace="http://purl.oclc.org/ooxml/drawingml/main" schemaLocation="dml-main.xsd"/>
<xsd:element name="lockedCanvas" type="a:CT_GvmlGroupShape"/>
</xsd:schema>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/drawingml/picture"
xmlns:a="http://purl.oclc.org/ooxml/drawingml/main" elementFormDefault="qualified"
targetNamespace="http://purl.oclc.org/ooxml/drawingml/picture">
<xsd:import namespace="http://purl.oclc.org/ooxml/drawingml/main" schemaLocation="dml-main.xsd"/>
<xsd:complexType name="CT_PictureNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvPicPr" type="a:CT_NonVisualPictureProperties" minOccurs="1"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Picture">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element name="nvPicPr" type="CT_PictureNonVisual" minOccurs="1" maxOccurs="1"/>
<xsd:element name="blipFill" type="a:CT_BlipFillProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="pic" type="CT_Picture"/>
</xsd:schema>

View File

@@ -0,0 +1,184 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:a="http://purl.oclc.org/ooxml/drawingml/main"
xmlns="http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing"
xmlns:r="http://purl.oclc.org/ooxml/officeDocument/relationships"
targetNamespace="http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing"
elementFormDefault="qualified">
<xsd:import namespace="http://purl.oclc.org/ooxml/drawingml/main" schemaLocation="dml-main.xsd"/>
<xsd:import schemaLocation="shared-relationshipReference.xsd"
namespace="http://purl.oclc.org/ooxml/officeDocument/relationships"/>
<xsd:element name="from" type="CT_Marker"/>
<xsd:element name="to" type="CT_Marker"/>
<xsd:complexType name="CT_AnchorClientData">
<xsd:attribute name="fLocksWithSheet" type="xsd:boolean" use="optional" default="true"/>
<xsd:attribute name="fPrintsWithSheet" type="xsd:boolean" use="optional" default="true"/>
</xsd:complexType>
<xsd:complexType name="CT_ShapeNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvSpPr" type="a:CT_NonVisualDrawingShapeProps" minOccurs="1" maxOccurs="1"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Shape">
<xsd:sequence>
<xsd:element name="nvSpPr" type="CT_ShapeNonVisual" minOccurs="1" maxOccurs="1"/>
<xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="style" type="a:CT_ShapeStyle" minOccurs="0" maxOccurs="1"/>
<xsd:element name="txBody" type="a:CT_TextBody" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="macro" type="xsd:string" use="optional"/>
<xsd:attribute name="textlink" type="xsd:string" use="optional"/>
<xsd:attribute name="fLocksText" type="xsd:boolean" use="optional" default="true"/>
<xsd:attribute name="fPublished" type="xsd:boolean" use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="CT_ConnectorNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvCxnSpPr" type="a:CT_NonVisualConnectorProperties" minOccurs="1"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Connector">
<xsd:sequence>
<xsd:element name="nvCxnSpPr" type="CT_ConnectorNonVisual" minOccurs="1" maxOccurs="1"/>
<xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="style" type="a:CT_ShapeStyle" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="macro" type="xsd:string" use="optional"/>
<xsd:attribute name="fPublished" type="xsd:boolean" use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="CT_PictureNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvPicPr" type="a:CT_NonVisualPictureProperties" minOccurs="1"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Picture">
<xsd:sequence>
<xsd:element name="nvPicPr" type="CT_PictureNonVisual" minOccurs="1" maxOccurs="1"/>
<xsd:element name="blipFill" type="a:CT_BlipFillProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="style" type="a:CT_ShapeStyle" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="macro" type="xsd:string" use="optional" default=""/>
<xsd:attribute name="fPublished" type="xsd:boolean" use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="CT_GraphicalObjectFrameNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvGraphicFramePr" type="a:CT_NonVisualGraphicFrameProperties"
minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_GraphicalObjectFrame">
<xsd:sequence>
<xsd:element name="nvGraphicFramePr" type="CT_GraphicalObjectFrameNonVisual" minOccurs="1"
maxOccurs="1"/>
<xsd:element name="xfrm" type="a:CT_Transform2D" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="a:graphic" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="macro" type="xsd:string" use="optional"/>
<xsd:attribute name="fPublished" type="xsd:boolean" use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="CT_GroupShapeNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvGrpSpPr" type="a:CT_NonVisualGroupDrawingShapeProps" minOccurs="1"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_GroupShape">
<xsd:sequence>
<xsd:element name="nvGrpSpPr" type="CT_GroupShapeNonVisual" minOccurs="1" maxOccurs="1"/>
<xsd:element name="grpSpPr" type="a:CT_GroupShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="sp" type="CT_Shape"/>
<xsd:element name="grpSp" type="CT_GroupShape"/>
<xsd:element name="graphicFrame" type="CT_GraphicalObjectFrame"/>
<xsd:element name="cxnSp" type="CT_Connector"/>
<xsd:element name="pic" type="CT_Picture"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="EG_ObjectChoices">
<xsd:sequence>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element name="sp" type="CT_Shape"/>
<xsd:element name="grpSp" type="CT_GroupShape"/>
<xsd:element name="graphicFrame" type="CT_GraphicalObjectFrame"/>
<xsd:element name="cxnSp" type="CT_Connector"/>
<xsd:element name="pic" type="CT_Picture"/>
<xsd:element name="contentPart" type="CT_Rel"/>
</xsd:choice>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="CT_Rel">
<xsd:attribute ref="r:id" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_ColID">
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_RowID">
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Marker">
<xsd:sequence>
<xsd:element name="col" type="ST_ColID"/>
<xsd:element name="colOff" type="a:ST_Coordinate"/>
<xsd:element name="row" type="ST_RowID"/>
<xsd:element name="rowOff" type="a:ST_Coordinate"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="ST_EditAs">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="twoCell"/>
<xsd:enumeration value="oneCell"/>
<xsd:enumeration value="absolute"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_TwoCellAnchor">
<xsd:sequence>
<xsd:element name="from" type="CT_Marker"/>
<xsd:element name="to" type="CT_Marker"/>
<xsd:group ref="EG_ObjectChoices"/>
<xsd:element name="clientData" type="CT_AnchorClientData" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="editAs" type="ST_EditAs" use="optional" default="twoCell"/>
</xsd:complexType>
<xsd:complexType name="CT_OneCellAnchor">
<xsd:sequence>
<xsd:element name="from" type="CT_Marker"/>
<xsd:element name="ext" type="a:CT_PositiveSize2D"/>
<xsd:group ref="EG_ObjectChoices"/>
<xsd:element name="clientData" type="CT_AnchorClientData" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_AbsoluteAnchor">
<xsd:sequence>
<xsd:element name="pos" type="a:CT_Point2D"/>
<xsd:element name="ext" type="a:CT_PositiveSize2D"/>
<xsd:group ref="EG_ObjectChoices"/>
<xsd:element name="clientData" type="CT_AnchorClientData" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="EG_Anchor">
<xsd:choice>
<xsd:element name="twoCellAnchor" type="CT_TwoCellAnchor"/>
<xsd:element name="oneCellAnchor" type="CT_OneCellAnchor"/>
<xsd:element name="absoluteAnchor" type="CT_AbsoluteAnchor"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="CT_Drawing">
<xsd:sequence>
<xsd:group ref="EG_Anchor" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="wsDr" type="CT_Drawing"/>
</xsd:schema>

View File

@@ -0,0 +1,283 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:a="http://purl.oclc.org/ooxml/drawingml/main"
xmlns:w="http://purl.oclc.org/ooxml/wordprocessingml/main"
xmlns:dpct="http://purl.oclc.org/ooxml/drawingml/picture"
xmlns:r="http://purl.oclc.org/ooxml/officeDocument/relationships"
xmlns="http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing"
targetNamespace="http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing"
elementFormDefault="qualified">
<xsd:import namespace="http://purl.oclc.org/ooxml/drawingml/main" schemaLocation="dml-main.xsd"/>
<xsd:import schemaLocation="wml.xsd" namespace="http://purl.oclc.org/ooxml/wordprocessingml/main"/>
<xsd:import namespace="http://purl.oclc.org/ooxml/drawingml/picture" schemaLocation="dml-picture.xsd"/>
<xsd:import namespace="http://purl.oclc.org/ooxml/officeDocument/relationships" schemaLocation="shared-relationshipReference.xsd"/>
<xsd:complexType name="CT_EffectExtent">
<xsd:attribute name="l" type="a:ST_Coordinate" use="required"/>
<xsd:attribute name="t" type="a:ST_Coordinate" use="required"/>
<xsd:attribute name="r" type="a:ST_Coordinate" use="required"/>
<xsd:attribute name="b" type="a:ST_Coordinate" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_WrapDistance">
<xsd:restriction base="xsd:unsignedInt"/>
</xsd:simpleType>
<xsd:complexType name="CT_Inline">
<xsd:sequence>
<xsd:element name="extent" type="a:CT_PositiveSize2D"/>
<xsd:element name="effectExtent" type="CT_EffectExtent" minOccurs="0"/>
<xsd:element name="docPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvGraphicFramePr" type="a:CT_NonVisualGraphicFrameProperties"
minOccurs="0" maxOccurs="1"/>
<xsd:element ref="a:graphic" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="distT" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distB" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distL" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distR" type="ST_WrapDistance" use="optional"/>
</xsd:complexType>
<xsd:simpleType name="ST_WrapText">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="bothSides"/>
<xsd:enumeration value="left"/>
<xsd:enumeration value="right"/>
<xsd:enumeration value="largest"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_WrapPath">
<xsd:sequence>
<xsd:element name="start" type="a:CT_Point2D" minOccurs="1" maxOccurs="1"/>
<xsd:element name="lineTo" type="a:CT_Point2D" minOccurs="2" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="edited" type="xsd:boolean" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CT_WrapNone"/>
<xsd:complexType name="CT_WrapSquare">
<xsd:sequence>
<xsd:element name="effectExtent" type="CT_EffectExtent" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="wrapText" type="ST_WrapText" use="required"/>
<xsd:attribute name="distT" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distB" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distL" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distR" type="ST_WrapDistance" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CT_WrapTight">
<xsd:sequence>
<xsd:element name="wrapPolygon" type="CT_WrapPath" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="wrapText" type="ST_WrapText" use="required"/>
<xsd:attribute name="distL" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distR" type="ST_WrapDistance" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CT_WrapThrough">
<xsd:sequence>
<xsd:element name="wrapPolygon" type="CT_WrapPath" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="wrapText" type="ST_WrapText" use="required"/>
<xsd:attribute name="distL" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distR" type="ST_WrapDistance" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CT_WrapTopBottom">
<xsd:sequence>
<xsd:element name="effectExtent" type="CT_EffectExtent" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="distT" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distB" type="ST_WrapDistance" use="optional"/>
</xsd:complexType>
<xsd:group name="EG_WrapType">
<xsd:sequence>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element name="wrapNone" type="CT_WrapNone" minOccurs="1" maxOccurs="1"/>
<xsd:element name="wrapSquare" type="CT_WrapSquare" minOccurs="1" maxOccurs="1"/>
<xsd:element name="wrapTight" type="CT_WrapTight" minOccurs="1" maxOccurs="1"/>
<xsd:element name="wrapThrough" type="CT_WrapThrough" minOccurs="1" maxOccurs="1"/>
<xsd:element name="wrapTopAndBottom" type="CT_WrapTopBottom" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:sequence>
</xsd:group>
<xsd:simpleType name="ST_PositionOffset">
<xsd:restriction base="xsd:int"/>
</xsd:simpleType>
<xsd:simpleType name="ST_AlignH">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="left"/>
<xsd:enumeration value="right"/>
<xsd:enumeration value="center"/>
<xsd:enumeration value="inside"/>
<xsd:enumeration value="outside"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_RelFromH">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="margin"/>
<xsd:enumeration value="page"/>
<xsd:enumeration value="column"/>
<xsd:enumeration value="character"/>
<xsd:enumeration value="leftMargin"/>
<xsd:enumeration value="rightMargin"/>
<xsd:enumeration value="insideMargin"/>
<xsd:enumeration value="outsideMargin"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_PosH">
<xsd:sequence>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element name="align" type="ST_AlignH" minOccurs="1" maxOccurs="1"/>
<xsd:element name="posOffset" type="ST_PositionOffset" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="relativeFrom" type="ST_RelFromH" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_AlignV">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="top"/>
<xsd:enumeration value="bottom"/>
<xsd:enumeration value="center"/>
<xsd:enumeration value="inside"/>
<xsd:enumeration value="outside"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_RelFromV">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="margin"/>
<xsd:enumeration value="page"/>
<xsd:enumeration value="paragraph"/>
<xsd:enumeration value="line"/>
<xsd:enumeration value="topMargin"/>
<xsd:enumeration value="bottomMargin"/>
<xsd:enumeration value="insideMargin"/>
<xsd:enumeration value="outsideMargin"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_PosV">
<xsd:sequence>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element name="align" type="ST_AlignV" minOccurs="1" maxOccurs="1"/>
<xsd:element name="posOffset" type="ST_PositionOffset" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="relativeFrom" type="ST_RelFromV" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_Anchor">
<xsd:sequence>
<xsd:element name="simplePos" type="a:CT_Point2D"/>
<xsd:element name="positionH" type="CT_PosH"/>
<xsd:element name="positionV" type="CT_PosV"/>
<xsd:element name="extent" type="a:CT_PositiveSize2D"/>
<xsd:element name="effectExtent" type="CT_EffectExtent" minOccurs="0"/>
<xsd:group ref="EG_WrapType"/>
<xsd:element name="docPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvGraphicFramePr" type="a:CT_NonVisualGraphicFrameProperties"
minOccurs="0" maxOccurs="1"/>
<xsd:element ref="a:graphic" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="distT" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distB" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distL" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="distR" type="ST_WrapDistance" use="optional"/>
<xsd:attribute name="simplePos" type="xsd:boolean"/>
<xsd:attribute name="relativeHeight" type="xsd:unsignedInt" use="required"/>
<xsd:attribute name="behindDoc" type="xsd:boolean" use="required"/>
<xsd:attribute name="locked" type="xsd:boolean" use="required"/>
<xsd:attribute name="layoutInCell" type="xsd:boolean" use="required"/>
<xsd:attribute name="hidden" type="xsd:boolean" use="optional"/>
<xsd:attribute name="allowOverlap" type="xsd:boolean" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_TxbxContent">
<xsd:group ref="w:EG_BlockLevelElts" minOccurs="1" maxOccurs="unbounded"/>
</xsd:complexType>
<xsd:complexType name="CT_TextboxInfo">
<xsd:sequence>
<xsd:element name="txbxContent" type="CT_TxbxContent" minOccurs="1" maxOccurs="1"/>
<xsd:element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:unsignedShort" use="optional" default="0"/>
</xsd:complexType>
<xsd:complexType name="CT_LinkedTextboxInformation">
<xsd:sequence>
<xsd:element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:unsignedShort" use="required"/>
<xsd:attribute name="seq" type="xsd:unsignedShort" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_WordprocessingShape">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="0" maxOccurs="1"/>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element name="cNvSpPr" type="a:CT_NonVisualDrawingShapeProps" minOccurs="1"
maxOccurs="1"/>
<xsd:element name="cNvCnPr" type="a:CT_NonVisualConnectorProperties" minOccurs="1"
maxOccurs="1"/>
</xsd:choice>
<xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="style" type="a:CT_ShapeStyle" minOccurs="0" maxOccurs="1"/>
<xsd:element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="txbx" type="CT_TextboxInfo" minOccurs="1" maxOccurs="1"/>
<xsd:element name="linkedTxbx" type="CT_LinkedTextboxInformation" minOccurs="1"
maxOccurs="1"/>
</xsd:choice>
<xsd:element name="bodyPr" type="a:CT_TextBodyProperties" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="normalEastAsianFlow" type="xsd:boolean" use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="CT_GraphicFrame">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>
<xsd:element name="cNvFrPr" type="a:CT_NonVisualGraphicFrameProperties" minOccurs="1"
maxOccurs="1"/>
<xsd:element name="xfrm" type="a:CT_Transform2D" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="a:graphic" minOccurs="1" maxOccurs="1"/>
<xsd:element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_WordprocessingContentPartNonVisual">
<xsd:sequence>
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="0" maxOccurs="1"/>
<xsd:element name="cNvContentPartPr" type="a:CT_NonVisualContentPartProperties" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_WordprocessingContentPart">
<xsd:sequence>
<xsd:element name="nvContentPartPr" type="CT_WordprocessingContentPartNonVisual" minOccurs="0" maxOccurs="1"/>
<xsd:element name="xfrm" type="a:CT_Transform2D" minOccurs="0" maxOccurs="1"/>
<xsd:element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="bwMode" type="a:ST_BlackWhiteMode" use="optional"/>
<xsd:attribute ref="r:id" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_WordprocessingGroup">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element name="cNvPr" type="a:CT_NonVisualDrawingProps" minOccurs="0" maxOccurs="1"/>
<xsd:element name="cNvGrpSpPr" type="a:CT_NonVisualGroupDrawingShapeProps" minOccurs="1"
maxOccurs="1"/>
<xsd:element name="grpSpPr" type="a:CT_GroupShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="wsp"/>
<xsd:element name="grpSp" type="CT_WordprocessingGroup"/>
<xsd:element name="graphicFrame" type="CT_GraphicFrame"/>
<xsd:element ref="dpct:pic"/>
<xsd:element name="contentPart" type="CT_WordprocessingContentPart"/>
</xsd:choice>
<xsd:element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_WordprocessingCanvas">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element name="bg" type="a:CT_BackgroundFormatting" minOccurs="0" maxOccurs="1"/>
<xsd:element name="whole" type="a:CT_WholeE2oFormatting" minOccurs="0" maxOccurs="1"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="wsp"/>
<xsd:element ref="dpct:pic"/>
<xsd:element name="contentPart" type="CT_WordprocessingContentPart"/>
<xsd:element ref="wgp"/>
<xsd:element name="graphicFrame" type="CT_GraphicFrame"/>
</xsd:choice>
<xsd:element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="wpc" type="CT_WordprocessingCanvas"/>
<xsd:element name="wgp" type="CT_WordprocessingGroup"/>
<xsd:element name="wsp" type="CT_WordprocessingShape"/>
<xsd:element name="inline" type="CT_Inline"/>
<xsd:element name="anchor" type="CT_Anchor"/>
</xsd:schema>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/officeDocument/characteristics"
targetNamespace="http://purl.oclc.org/ooxml/officeDocument/characteristics"
elementFormDefault="qualified">
<xsd:complexType name="CT_AdditionalCharacteristics">
<xsd:sequence>
<xsd:element name="characteristic" type="CT_Characteristic" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Characteristic">
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="relation" type="ST_Relation" use="required"/>
<xsd:attribute name="val" type="xsd:string" use="required"/>
<xsd:attribute name="vocabulary" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:simpleType name="ST_Relation">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ge"/>
<xsd:enumeration value="le"/>
<xsd:enumeration value="gt"/>
<xsd:enumeration value="lt"/>
<xsd:enumeration value="eq"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="additionalCharacteristics" type="CT_AdditionalCharacteristics"/>
</xsd:schema>

View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/officeDocument/bibliography"
xmlns:s="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
targetNamespace="http://purl.oclc.org/ooxml/officeDocument/bibliography"
elementFormDefault="qualified">
<xsd:import namespace="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
schemaLocation="shared-commonSimpleTypes.xsd"/>
<xsd:simpleType name="ST_SourceType">
<xsd:restriction base="s:ST_String">
<xsd:enumeration value="ArticleInAPeriodical"/>
<xsd:enumeration value="Book"/>
<xsd:enumeration value="BookSection"/>
<xsd:enumeration value="JournalArticle"/>
<xsd:enumeration value="ConferenceProceedings"/>
<xsd:enumeration value="Report"/>
<xsd:enumeration value="SoundRecording"/>
<xsd:enumeration value="Performance"/>
<xsd:enumeration value="Art"/>
<xsd:enumeration value="DocumentFromInternetSite"/>
<xsd:enumeration value="InternetSite"/>
<xsd:enumeration value="Film"/>
<xsd:enumeration value="Interview"/>
<xsd:enumeration value="Patent"/>
<xsd:enumeration value="ElectronicSource"/>
<xsd:enumeration value="Case"/>
<xsd:enumeration value="Misc"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_NameListType">
<xsd:sequence>
<xsd:element name="Person" type="CT_PersonType" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_PersonType">
<xsd:sequence>
<xsd:element name="Last" type="s:ST_String" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="First" type="s:ST_String" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="Middle" type="s:ST_String" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_NameType">
<xsd:sequence>
<xsd:element name="NameList" type="CT_NameListType" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_NameOrCorporateType">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="NameList" type="CT_NameListType" minOccurs="1" maxOccurs="1"/>
<xsd:element name="Corporate" minOccurs="1" maxOccurs="1" type="s:ST_String"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_AuthorType">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Artist" type="CT_NameType"/>
<xsd:element name="Author" type="CT_NameOrCorporateType"/>
<xsd:element name="BookAuthor" type="CT_NameType"/>
<xsd:element name="Compiler" type="CT_NameType"/>
<xsd:element name="Composer" type="CT_NameType"/>
<xsd:element name="Conductor" type="CT_NameType"/>
<xsd:element name="Counsel" type="CT_NameType"/>
<xsd:element name="Director" type="CT_NameType"/>
<xsd:element name="Editor" type="CT_NameType"/>
<xsd:element name="Interviewee" type="CT_NameType"/>
<xsd:element name="Interviewer" type="CT_NameType"/>
<xsd:element name="Inventor" type="CT_NameType"/>
<xsd:element name="Performer" type="CT_NameOrCorporateType"/>
<xsd:element name="ProducerName" type="CT_NameType"/>
<xsd:element name="Translator" type="CT_NameType"/>
<xsd:element name="Writer" type="CT_NameType"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SourceType">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="AbbreviatedCaseNumber" type="s:ST_String"/>
<xsd:element name="AlbumTitle" type="s:ST_String"/>
<xsd:element name="Author" type="CT_AuthorType"/>
<xsd:element name="BookTitle" type="s:ST_String"/>
<xsd:element name="Broadcaster" type="s:ST_String"/>
<xsd:element name="BroadcastTitle" type="s:ST_String"/>
<xsd:element name="CaseNumber" type="s:ST_String"/>
<xsd:element name="ChapterNumber" type="s:ST_String"/>
<xsd:element name="City" type="s:ST_String"/>
<xsd:element name="Comments" type="s:ST_String"/>
<xsd:element name="ConferenceName" type="s:ST_String"/>
<xsd:element name="CountryRegion" type="s:ST_String"/>
<xsd:element name="Court" type="s:ST_String"/>
<xsd:element name="Day" type="s:ST_String"/>
<xsd:element name="DayAccessed" type="s:ST_String"/>
<xsd:element name="Department" type="s:ST_String"/>
<xsd:element name="Distributor" type="s:ST_String"/>
<xsd:element name="Edition" type="s:ST_String"/>
<xsd:element name="Guid" type="s:ST_String"/>
<xsd:element name="Institution" type="s:ST_String"/>
<xsd:element name="InternetSiteTitle" type="s:ST_String"/>
<xsd:element name="Issue" type="s:ST_String"/>
<xsd:element name="JournalName" type="s:ST_String"/>
<xsd:element name="LCID" type="s:ST_Lang"/>
<xsd:element name="Medium" type="s:ST_String"/>
<xsd:element name="Month" type="s:ST_String"/>
<xsd:element name="MonthAccessed" type="s:ST_String"/>
<xsd:element name="NumberVolumes" type="s:ST_String"/>
<xsd:element name="Pages" type="s:ST_String"/>
<xsd:element name="PatentNumber" type="s:ST_String"/>
<xsd:element name="PeriodicalTitle" type="s:ST_String"/>
<xsd:element name="ProductionCompany" type="s:ST_String"/>
<xsd:element name="PublicationTitle" type="s:ST_String"/>
<xsd:element name="Publisher" type="s:ST_String"/>
<xsd:element name="RecordingNumber" type="s:ST_String"/>
<xsd:element name="RefOrder" type="s:ST_String"/>
<xsd:element name="Reporter" type="s:ST_String"/>
<xsd:element name="SourceType" type="ST_SourceType"/>
<xsd:element name="ShortTitle" type="s:ST_String"/>
<xsd:element name="StandardNumber" type="s:ST_String"/>
<xsd:element name="StateProvince" type="s:ST_String"/>
<xsd:element name="Station" type="s:ST_String"/>
<xsd:element name="Tag" type="s:ST_String"/>
<xsd:element name="Theater" type="s:ST_String"/>
<xsd:element name="ThesisType" type="s:ST_String"/>
<xsd:element name="Title" type="s:ST_String"/>
<xsd:element name="Type" type="s:ST_String"/>
<xsd:element name="URL" type="s:ST_String"/>
<xsd:element name="Version" type="s:ST_String"/>
<xsd:element name="Volume" type="s:ST_String"/>
<xsd:element name="Year" type="s:ST_String"/>
<xsd:element name="YearAccessed" type="s:ST_String"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Sources" type="CT_Sources"/>
<xsd:complexType name="CT_Sources">
<xsd:sequence>
<xsd:element name="Source" type="CT_SourceType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="SelectedStyle" type="s:ST_String"/>
<xsd:attribute name="StyleName" type="s:ST_String"/>
<xsd:attribute name="URI" type="s:ST_String"/>
</xsd:complexType>
</xsd:schema>

View File

@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
targetNamespace="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
elementFormDefault="qualified">
<xsd:simpleType name="ST_Lang">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="ST_HexColorRGB">
<xsd:restriction base="xsd:hexBinary">
<xsd:length value="3" fixed="true"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_Panose">
<xsd:restriction base="xsd:hexBinary">
<xsd:length value="10"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_CalendarType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="gregorian"/>
<xsd:enumeration value="gregorianUs"/>
<xsd:enumeration value="gregorianMeFrench"/>
<xsd:enumeration value="gregorianArabic"/>
<xsd:enumeration value="hijri"/>
<xsd:enumeration value="hebrew"/>
<xsd:enumeration value="taiwan"/>
<xsd:enumeration value="japan"/>
<xsd:enumeration value="thai"/>
<xsd:enumeration value="korea"/>
<xsd:enumeration value="saka"/>
<xsd:enumeration value="gregorianXlitEnglish"/>
<xsd:enumeration value="gregorianXlitFrench"/>
<xsd:enumeration value="none"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_Guid">
<xsd:restriction base="xsd:token">
<xsd:pattern value="\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_OnOff">
<xsd:union memberTypes="xsd:boolean"/>
</xsd:simpleType>
<xsd:simpleType name="ST_String">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="ST_XmlName">
<xsd:restriction base="xsd:NCName">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_UnsignedDecimalNumber">
<xsd:restriction base="xsd:unsignedLong"/>
</xsd:simpleType>
<xsd:simpleType name="ST_TwipsMeasure">
<xsd:union memberTypes="ST_UnsignedDecimalNumber ST_PositiveUniversalMeasure"/>
</xsd:simpleType>
<xsd:simpleType name="ST_VerticalAlignRun">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="baseline"/>
<xsd:enumeration value="superscript"/>
<xsd:enumeration value="subscript"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_Xstring">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="ST_XAlign">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="left"/>
<xsd:enumeration value="center"/>
<xsd:enumeration value="right"/>
<xsd:enumeration value="inside"/>
<xsd:enumeration value="outside"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_YAlign">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="inline"/>
<xsd:enumeration value="top"/>
<xsd:enumeration value="center"/>
<xsd:enumeration value="bottom"/>
<xsd:enumeration value="inside"/>
<xsd:enumeration value="outside"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_ConformanceClass">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="strict"/>
<xsd:enumeration value="transitional"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_UniversalMeasure">
<xsd:restriction base="xsd:string">
<xsd:pattern value="-?[0-9]+(\.[0-9]+)?(mm|cm|in|pt|pc|pi)"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_PositiveUniversalMeasure">
<xsd:restriction base="ST_UniversalMeasure">
<xsd:pattern value="[0-9]+(\.[0-9]+)?(mm|cm|in|pt|pc|pi)"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_Percentage">
<xsd:restriction base="xsd:string">
<xsd:pattern value="-?[0-9]+(\.[0-9]+)?%"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_FixedPercentage">
<xsd:restriction base="ST_Percentage">
<xsd:pattern value="-?((100)|([0-9][0-9]?))(\.[0-9][0-9]?)?%"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_PositivePercentage">
<xsd:restriction base="ST_Percentage">
<xsd:pattern value="[0-9]+(\.[0-9]+)?%"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_PositiveFixedPercentage">
<xsd:restriction base="ST_Percentage">
<xsd:pattern value="((100)|([0-9][0-9]?))(\.[0-9][0-9]?)?%"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/officeDocument/customXml"
xmlns:s="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
targetNamespace="http://purl.oclc.org/ooxml/officeDocument/customXml"
elementFormDefault="qualified" attributeFormDefault="qualified" blockDefault="#all">
<xsd:import namespace="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
schemaLocation="shared-commonSimpleTypes.xsd"/>
<xsd:complexType name="CT_DatastoreSchemaRef">
<xsd:attribute name="uri" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_DatastoreSchemaRefs">
<xsd:sequence>
<xsd:element name="schemaRef" type="CT_DatastoreSchemaRef" minOccurs="0" maxOccurs="unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_DatastoreItem">
<xsd:sequence>
<xsd:element name="schemaRefs" type="CT_DatastoreSchemaRefs" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="itemID" type="s:ST_Guid" use="required"/>
</xsd:complexType>
<xsd:element name="datastoreItem" type="CT_DatastoreItem"/>
</xsd:schema>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/schemaLibrary/main"
targetNamespace="http://purl.oclc.org/ooxml/schemaLibrary/main" attributeFormDefault="qualified"
elementFormDefault="qualified">
<xsd:complexType name="CT_Schema">
<xsd:attribute name="uri" type="xsd:string" default=""/>
<xsd:attribute name="manifestLocation" type="xsd:string"/>
<xsd:attribute name="schemaLocation" type="xsd:string"/>
<xsd:attribute name="schemaLanguage" type="xsd:token"/>
</xsd:complexType>
<xsd:complexType name="CT_SchemaLibrary">
<xsd:sequence>
<xsd:element name="schema" type="CT_Schema" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="schemaLibrary" type="CT_SchemaLibrary"/>
</xsd:schema>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/officeDocument/customProperties"
xmlns:vt="http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes"
xmlns:s="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
targetNamespace="http://purl.oclc.org/ooxml/officeDocument/customProperties" blockDefault="#all"
elementFormDefault="qualified">
<xsd:import namespace="http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes"
schemaLocation="shared-documentPropertiesVariantTypes.xsd"/>
<xsd:import namespace="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
schemaLocation="shared-commonSimpleTypes.xsd"/>
<xsd:element name="Properties" type="CT_Properties"/>
<xsd:complexType name="CT_Properties">
<xsd:sequence>
<xsd:element name="property" minOccurs="0" maxOccurs="unbounded" type="CT_Property"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Property">
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element ref="vt:vector"/>
<xsd:element ref="vt:array"/>
<xsd:element ref="vt:blob"/>
<xsd:element ref="vt:oblob"/>
<xsd:element ref="vt:empty"/>
<xsd:element ref="vt:null"/>
<xsd:element ref="vt:i1"/>
<xsd:element ref="vt:i2"/>
<xsd:element ref="vt:i4"/>
<xsd:element ref="vt:i8"/>
<xsd:element ref="vt:int"/>
<xsd:element ref="vt:ui1"/>
<xsd:element ref="vt:ui2"/>
<xsd:element ref="vt:ui4"/>
<xsd:element ref="vt:ui8"/>
<xsd:element ref="vt:uint"/>
<xsd:element ref="vt:r4"/>
<xsd:element ref="vt:r8"/>
<xsd:element ref="vt:decimal"/>
<xsd:element ref="vt:lpstr"/>
<xsd:element ref="vt:lpwstr"/>
<xsd:element ref="vt:bstr"/>
<xsd:element ref="vt:date"/>
<xsd:element ref="vt:filetime"/>
<xsd:element ref="vt:bool"/>
<xsd:element ref="vt:cy"/>
<xsd:element ref="vt:error"/>
<xsd:element ref="vt:stream"/>
<xsd:element ref="vt:ostream"/>
<xsd:element ref="vt:storage"/>
<xsd:element ref="vt:ostorage"/>
<xsd:element ref="vt:vstream"/>
<xsd:element ref="vt:clsid"/>
</xsd:choice>
<xsd:attribute name="fmtid" use="required" type="s:ST_Guid"/>
<xsd:attribute name="pid" use="required" type="xsd:int"/>
<xsd:attribute name="name" use="optional" type="xsd:string"/>
<xsd:attribute name="linkTarget" use="optional" type="xsd:string"/>
</xsd:complexType>
</xsd:schema>

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/officeDocument/extendedProperties"
xmlns:vt="http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes"
targetNamespace="http://purl.oclc.org/ooxml/officeDocument/extendedProperties"
elementFormDefault="qualified" blockDefault="#all">
<xsd:import namespace="http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes"
schemaLocation="shared-documentPropertiesVariantTypes.xsd"/>
<xsd:element name="Properties" type="CT_Properties"/>
<xsd:complexType name="CT_Properties">
<xsd:all>
<xsd:element name="Template" minOccurs="0" maxOccurs="1" type="xsd:string"/>
<xsd:element name="Manager" minOccurs="0" maxOccurs="1" type="xsd:string"/>
<xsd:element name="Company" minOccurs="0" maxOccurs="1" type="xsd:string"/>
<xsd:element name="Pages" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="Words" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="Characters" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="PresentationFormat" minOccurs="0" maxOccurs="1" type="xsd:string"/>
<xsd:element name="Lines" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="Paragraphs" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="Slides" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="Notes" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="TotalTime" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="HiddenSlides" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="MMClips" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="ScaleCrop" minOccurs="0" maxOccurs="1" type="xsd:boolean"/>
<xsd:element name="HeadingPairs" minOccurs="0" maxOccurs="1" type="CT_VectorVariant"/>
<xsd:element name="TitlesOfParts" minOccurs="0" maxOccurs="1" type="CT_VectorLpstr"/>
<xsd:element name="LinksUpToDate" minOccurs="0" maxOccurs="1" type="xsd:boolean"/>
<xsd:element name="CharactersWithSpaces" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<xsd:element name="SharedDoc" minOccurs="0" maxOccurs="1" type="xsd:boolean"/>
<xsd:element name="HyperlinkBase" minOccurs="0" maxOccurs="1" type="xsd:string"/>
<xsd:element name="HLinks" minOccurs="0" maxOccurs="1" type="CT_VectorVariant"/>
<xsd:element name="HyperlinksChanged" minOccurs="0" maxOccurs="1" type="xsd:boolean"/>
<xsd:element name="DigSig" minOccurs="0" maxOccurs="1" type="CT_DigSigBlob"/>
<xsd:element name="Application" minOccurs="0" maxOccurs="1" type="xsd:string"/>
<xsd:element name="AppVersion" minOccurs="0" maxOccurs="1" type="xsd:string"/>
<xsd:element name="DocSecurity" minOccurs="0" maxOccurs="1" type="xsd:int"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="CT_VectorVariant">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="vt:vector"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_VectorLpstr">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="vt:vector"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_DigSigBlob">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="vt:blob"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>

View File

@@ -0,0 +1,195 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes"
xmlns:s="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
targetNamespace="http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes" blockDefault="#all"
elementFormDefault="qualified">
<xsd:import namespace="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
schemaLocation="shared-commonSimpleTypes.xsd"/>
<xsd:simpleType name="ST_VectorBaseType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="variant"/>
<xsd:enumeration value="i1"/>
<xsd:enumeration value="i2"/>
<xsd:enumeration value="i4"/>
<xsd:enumeration value="i8"/>
<xsd:enumeration value="ui1"/>
<xsd:enumeration value="ui2"/>
<xsd:enumeration value="ui4"/>
<xsd:enumeration value="ui8"/>
<xsd:enumeration value="r4"/>
<xsd:enumeration value="r8"/>
<xsd:enumeration value="lpstr"/>
<xsd:enumeration value="lpwstr"/>
<xsd:enumeration value="bstr"/>
<xsd:enumeration value="date"/>
<xsd:enumeration value="filetime"/>
<xsd:enumeration value="bool"/>
<xsd:enumeration value="cy"/>
<xsd:enumeration value="error"/>
<xsd:enumeration value="clsid"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_ArrayBaseType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="variant"/>
<xsd:enumeration value="i1"/>
<xsd:enumeration value="i2"/>
<xsd:enumeration value="i4"/>
<xsd:enumeration value="int"/>
<xsd:enumeration value="ui1"/>
<xsd:enumeration value="ui2"/>
<xsd:enumeration value="ui4"/>
<xsd:enumeration value="uint"/>
<xsd:enumeration value="r4"/>
<xsd:enumeration value="r8"/>
<xsd:enumeration value="decimal"/>
<xsd:enumeration value="bstr"/>
<xsd:enumeration value="date"/>
<xsd:enumeration value="bool"/>
<xsd:enumeration value="cy"/>
<xsd:enumeration value="error"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_Cy">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\s*[0-9]*\.[0-9]{4}\s*"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_Error">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\s*0x[0-9A-Za-z]{8}\s*"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Empty"/>
<xsd:complexType name="CT_Null"/>
<xsd:complexType name="CT_Vector">
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element ref="variant"/>
<xsd:element ref="i1"/>
<xsd:element ref="i2"/>
<xsd:element ref="i4"/>
<xsd:element ref="i8"/>
<xsd:element ref="ui1"/>
<xsd:element ref="ui2"/>
<xsd:element ref="ui4"/>
<xsd:element ref="ui8"/>
<xsd:element ref="r4"/>
<xsd:element ref="r8"/>
<xsd:element ref="lpstr"/>
<xsd:element ref="lpwstr"/>
<xsd:element ref="bstr"/>
<xsd:element ref="date"/>
<xsd:element ref="filetime"/>
<xsd:element ref="bool"/>
<xsd:element ref="cy"/>
<xsd:element ref="error"/>
<xsd:element ref="clsid"/>
</xsd:choice>
<xsd:attribute name="baseType" type="ST_VectorBaseType" use="required"/>
<xsd:attribute name="size" type="xsd:unsignedInt" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_Array">
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element ref="variant"/>
<xsd:element ref="i1"/>
<xsd:element ref="i2"/>
<xsd:element ref="i4"/>
<xsd:element ref="int"/>
<xsd:element ref="ui1"/>
<xsd:element ref="ui2"/>
<xsd:element ref="ui4"/>
<xsd:element ref="uint"/>
<xsd:element ref="r4"/>
<xsd:element ref="r8"/>
<xsd:element ref="decimal"/>
<xsd:element ref="bstr"/>
<xsd:element ref="date"/>
<xsd:element ref="bool"/>
<xsd:element ref="error"/>
<xsd:element ref="cy"/>
</xsd:choice>
<xsd:attribute name="lBounds" type="xsd:int" use="required"/>
<xsd:attribute name="uBounds" type="xsd:int" use="required"/>
<xsd:attribute name="baseType" type="ST_ArrayBaseType" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_Variant">
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element ref="variant"/>
<xsd:element ref="vector"/>
<xsd:element ref="array"/>
<xsd:element ref="blob"/>
<xsd:element ref="oblob"/>
<xsd:element ref="empty"/>
<xsd:element ref="null"/>
<xsd:element ref="i1"/>
<xsd:element ref="i2"/>
<xsd:element ref="i4"/>
<xsd:element ref="i8"/>
<xsd:element ref="int"/>
<xsd:element ref="ui1"/>
<xsd:element ref="ui2"/>
<xsd:element ref="ui4"/>
<xsd:element ref="ui8"/>
<xsd:element ref="uint"/>
<xsd:element ref="r4"/>
<xsd:element ref="r8"/>
<xsd:element ref="decimal"/>
<xsd:element ref="lpstr"/>
<xsd:element ref="lpwstr"/>
<xsd:element ref="bstr"/>
<xsd:element ref="date"/>
<xsd:element ref="filetime"/>
<xsd:element ref="bool"/>
<xsd:element ref="cy"/>
<xsd:element ref="error"/>
<xsd:element ref="stream"/>
<xsd:element ref="ostream"/>
<xsd:element ref="storage"/>
<xsd:element ref="ostorage"/>
<xsd:element ref="vstream"/>
<xsd:element ref="clsid"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="CT_Vstream">
<xsd:simpleContent>
<xsd:extension base="xsd:base64Binary">
<xsd:attribute name="version" type="s:ST_Guid"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:element name="variant" type="CT_Variant"/>
<xsd:element name="vector" type="CT_Vector"/>
<xsd:element name="array" type="CT_Array"/>
<xsd:element name="blob" type="xsd:base64Binary"/>
<xsd:element name="oblob" type="xsd:base64Binary"/>
<xsd:element name="empty" type="CT_Empty"/>
<xsd:element name="null" type="CT_Null"/>
<xsd:element name="i1" type="xsd:byte"/>
<xsd:element name="i2" type="xsd:short"/>
<xsd:element name="i4" type="xsd:int"/>
<xsd:element name="i8" type="xsd:long"/>
<xsd:element name="int" type="xsd:int"/>
<xsd:element name="ui1" type="xsd:unsignedByte"/>
<xsd:element name="ui2" type="xsd:unsignedShort"/>
<xsd:element name="ui4" type="xsd:unsignedInt"/>
<xsd:element name="ui8" type="xsd:unsignedLong"/>
<xsd:element name="uint" type="xsd:unsignedInt"/>
<xsd:element name="r4" type="xsd:float"/>
<xsd:element name="r8" type="xsd:double"/>
<xsd:element name="decimal" type="xsd:decimal"/>
<xsd:element name="lpstr" type="xsd:string"/>
<xsd:element name="lpwstr" type="xsd:string"/>
<xsd:element name="bstr" type="xsd:string"/>
<xsd:element name="date" type="xsd:dateTime"/>
<xsd:element name="filetime" type="xsd:dateTime"/>
<xsd:element name="bool" type="xsd:boolean"/>
<xsd:element name="cy" type="ST_Cy"/>
<xsd:element name="error" type="ST_Error"/>
<xsd:element name="stream" type="xsd:base64Binary"/>
<xsd:element name="ostream" type="xsd:base64Binary"/>
<xsd:element name="storage" type="xsd:base64Binary"/>
<xsd:element name="ostorage" type="xsd:base64Binary"/>
<xsd:element name="vstream" type="CT_Vstream"/>
<xsd:element name="clsid" type="s:ST_Guid"/>
</xsd:schema>

View File

@@ -0,0 +1,582 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/officeDocument/math"
xmlns:m="http://purl.oclc.org/ooxml/officeDocument/math"
xmlns:w="http://purl.oclc.org/ooxml/wordprocessingml/main"
xmlns:s="http://purl.oclc.org/ooxml/officeDocument/sharedTypes" elementFormDefault="qualified"
attributeFormDefault="qualified" blockDefault="#all"
targetNamespace="http://purl.oclc.org/ooxml/officeDocument/math">
<xsd:import namespace="http://purl.oclc.org/ooxml/wordprocessingml/main"
schemaLocation="wml.xsd"/>
<xsd:import namespace="http://purl.oclc.org/ooxml/officeDocument/sharedTypes"
schemaLocation="shared-commonSimpleTypes.xsd"/>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:simpleType name="ST_Integer255">
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="255"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Integer255">
<xsd:attribute name="val" type="ST_Integer255" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_Integer2">
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="-2"/>
<xsd:maxInclusive value="2"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Integer2">
<xsd:attribute name="val" type="ST_Integer2" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_SpacingRule">
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="4"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_SpacingRule">
<xsd:attribute name="val" type="ST_SpacingRule" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_UnSignedInteger">
<xsd:restriction base="xsd:unsignedInt"/>
</xsd:simpleType>
<xsd:complexType name="CT_UnSignedInteger">
<xsd:attribute name="val" type="ST_UnSignedInteger" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_Char">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Char">
<xsd:attribute name="val" type="ST_Char" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_OnOff">
<xsd:attribute name="val" type="s:ST_OnOff"/>
</xsd:complexType>
<xsd:complexType name="CT_String">
<xsd:attribute name="val" type="s:ST_String"/>
</xsd:complexType>
<xsd:complexType name="CT_XAlign">
<xsd:attribute name="val" type="s:ST_XAlign" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_YAlign">
<xsd:attribute name="val" type="s:ST_YAlign" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_Shp">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="centered"/>
<xsd:enumeration value="match"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Shp">
<xsd:attribute name="val" type="ST_Shp" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_FType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="bar"/>
<xsd:enumeration value="skw"/>
<xsd:enumeration value="lin"/>
<xsd:enumeration value="noBar"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_FType">
<xsd:attribute name="val" type="ST_FType" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_LimLoc">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="undOvr"/>
<xsd:enumeration value="subSup"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_LimLoc">
<xsd:attribute name="val" type="ST_LimLoc" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_TopBot">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="top"/>
<xsd:enumeration value="bot"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_TopBot">
<xsd:attribute name="val" type="ST_TopBot" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_Script">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="roman"/>
<xsd:enumeration value="script"/>
<xsd:enumeration value="fraktur"/>
<xsd:enumeration value="double-struck"/>
<xsd:enumeration value="sans-serif"/>
<xsd:enumeration value="monospace"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Script">
<xsd:attribute name="val" type="ST_Script"/>
</xsd:complexType>
<xsd:simpleType name="ST_Style">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="p"/>
<xsd:enumeration value="b"/>
<xsd:enumeration value="i"/>
<xsd:enumeration value="bi"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Style">
<xsd:attribute name="val" type="ST_Style"/>
</xsd:complexType>
<xsd:complexType name="CT_ManualBreak">
<xsd:attribute name="alnAt" type="ST_Integer255"/>
</xsd:complexType>
<xsd:group name="EG_ScriptStyle">
<xsd:sequence>
<xsd:element name="scr" minOccurs="0" type="CT_Script"/>
<xsd:element name="sty" minOccurs="0" type="CT_Style"/>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="CT_RPR">
<xsd:sequence>
<xsd:element name="lit" minOccurs="0" type="CT_OnOff"/>
<xsd:choice>
<xsd:element name="nor" minOccurs="0" type="CT_OnOff"/>
<xsd:sequence>
<xsd:group ref="EG_ScriptStyle"/>
</xsd:sequence>
</xsd:choice>
<xsd:element name="brk" minOccurs="0" type="CT_ManualBreak"/>
<xsd:element name="aln" minOccurs="0" type="CT_OnOff"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Text">
<xsd:simpleContent>
<xsd:extension base="s:ST_String">
<xsd:attribute ref="xml:space" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="CT_R">
<xsd:sequence>
<xsd:element name="rPr" type="CT_RPR" minOccurs="0"/>
<xsd:group ref="w:EG_RPr" minOccurs="0"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:group ref="w:EG_RunInnerContent"/>
<xsd:element name="t" type="CT_Text" minOccurs="0"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_CtrlPr">
<xsd:sequence>
<xsd:group ref="w:EG_RPrMath" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_AccPr">
<xsd:sequence>
<xsd:element name="chr" type="CT_Char" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Acc">
<xsd:sequence>
<xsd:element name="accPr" type="CT_AccPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_BarPr">
<xsd:sequence>
<xsd:element name="pos" type="CT_TopBot" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Bar">
<xsd:sequence>
<xsd:element name="barPr" type="CT_BarPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_BoxPr">
<xsd:sequence>
<xsd:element name="opEmu" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="noBreak" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="diff" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="brk" type="CT_ManualBreak" minOccurs="0"/>
<xsd:element name="aln" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Box">
<xsd:sequence>
<xsd:element name="boxPr" type="CT_BoxPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_BorderBoxPr">
<xsd:sequence>
<xsd:element name="hideTop" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="hideBot" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="hideLeft" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="hideRight" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="strikeH" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="strikeV" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="strikeBLTR" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="strikeTLBR" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_BorderBox">
<xsd:sequence>
<xsd:element name="borderBoxPr" type="CT_BorderBoxPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_DPr">
<xsd:sequence>
<xsd:element name="begChr" type="CT_Char" minOccurs="0"/>
<xsd:element name="sepChr" type="CT_Char" minOccurs="0"/>
<xsd:element name="endChr" type="CT_Char" minOccurs="0"/>
<xsd:element name="grow" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="shp" type="CT_Shp" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_D">
<xsd:sequence>
<xsd:element name="dPr" type="CT_DPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_EqArrPr">
<xsd:sequence>
<xsd:element name="baseJc" type="CT_YAlign" minOccurs="0"/>
<xsd:element name="maxDist" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="objDist" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="rSpRule" type="CT_SpacingRule" minOccurs="0"/>
<xsd:element name="rSp" type="CT_UnSignedInteger" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_EqArr">
<xsd:sequence>
<xsd:element name="eqArrPr" type="CT_EqArrPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_FPr">
<xsd:sequence>
<xsd:element name="type" type="CT_FType" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_F">
<xsd:sequence>
<xsd:element name="fPr" type="CT_FPr" minOccurs="0"/>
<xsd:element name="num" type="CT_OMathArg"/>
<xsd:element name="den" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_FuncPr">
<xsd:sequence>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Func">
<xsd:sequence>
<xsd:element name="funcPr" type="CT_FuncPr" minOccurs="0"/>
<xsd:element name="fName" type="CT_OMathArg"/>
<xsd:element name="e" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_GroupChrPr">
<xsd:sequence>
<xsd:element name="chr" type="CT_Char" minOccurs="0"/>
<xsd:element name="pos" type="CT_TopBot" minOccurs="0"/>
<xsd:element name="vertJc" type="CT_TopBot" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_GroupChr">
<xsd:sequence>
<xsd:element name="groupChrPr" type="CT_GroupChrPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_LimLowPr">
<xsd:sequence>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_LimLow">
<xsd:sequence>
<xsd:element name="limLowPr" type="CT_LimLowPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
<xsd:element name="lim" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_LimUppPr">
<xsd:sequence>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_LimUpp">
<xsd:sequence>
<xsd:element name="limUppPr" type="CT_LimUppPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
<xsd:element name="lim" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_MCPr">
<xsd:sequence>
<xsd:element name="count" type="CT_Integer255" minOccurs="0"/>
<xsd:element name="mcJc" type="CT_XAlign" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_MC">
<xsd:sequence>
<xsd:element name="mcPr" type="CT_MCPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_MCS">
<xsd:sequence>
<xsd:element name="mc" type="CT_MC" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_MPr">
<xsd:sequence>
<xsd:element name="baseJc" type="CT_YAlign" minOccurs="0"/>
<xsd:element name="plcHide" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="rSpRule" type="CT_SpacingRule" minOccurs="0"/>
<xsd:element name="cGpRule" type="CT_SpacingRule" minOccurs="0"/>
<xsd:element name="rSp" type="CT_UnSignedInteger" minOccurs="0"/>
<xsd:element name="cSp" type="CT_UnSignedInteger" minOccurs="0"/>
<xsd:element name="cGp" type="CT_UnSignedInteger" minOccurs="0"/>
<xsd:element name="mcs" type="CT_MCS" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_MR">
<xsd:sequence>
<xsd:element name="e" type="CT_OMathArg" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_M">
<xsd:sequence>
<xsd:element name="mPr" type="CT_MPr" minOccurs="0"/>
<xsd:element name="mr" type="CT_MR" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_NaryPr">
<xsd:sequence>
<xsd:element name="chr" type="CT_Char" minOccurs="0"/>
<xsd:element name="limLoc" type="CT_LimLoc" minOccurs="0"/>
<xsd:element name="grow" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="subHide" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="supHide" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Nary">
<xsd:sequence>
<xsd:element name="naryPr" type="CT_NaryPr" minOccurs="0"/>
<xsd:element name="sub" type="CT_OMathArg"/>
<xsd:element name="sup" type="CT_OMathArg"/>
<xsd:element name="e" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_PhantPr">
<xsd:sequence>
<xsd:element name="show" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="zeroWid" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="zeroAsc" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="zeroDesc" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="transp" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Phant">
<xsd:sequence>
<xsd:element name="phantPr" type="CT_PhantPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_RadPr">
<xsd:sequence>
<xsd:element name="degHide" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Rad">
<xsd:sequence>
<xsd:element name="radPr" type="CT_RadPr" minOccurs="0"/>
<xsd:element name="deg" type="CT_OMathArg"/>
<xsd:element name="e" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SPrePr">
<xsd:sequence>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SPre">
<xsd:sequence>
<xsd:element name="sPrePr" type="CT_SPrePr" minOccurs="0"/>
<xsd:element name="sub" type="CT_OMathArg"/>
<xsd:element name="sup" type="CT_OMathArg"/>
<xsd:element name="e" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SSubPr">
<xsd:sequence>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SSub">
<xsd:sequence>
<xsd:element name="sSubPr" type="CT_SSubPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
<xsd:element name="sub" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SSubSupPr">
<xsd:sequence>
<xsd:element name="alnScr" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SSubSup">
<xsd:sequence>
<xsd:element name="sSubSupPr" type="CT_SSubSupPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
<xsd:element name="sub" type="CT_OMathArg"/>
<xsd:element name="sup" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SSupPr">
<xsd:sequence>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SSup">
<xsd:sequence>
<xsd:element name="sSupPr" type="CT_SSupPr" minOccurs="0"/>
<xsd:element name="e" type="CT_OMathArg"/>
<xsd:element name="sup" type="CT_OMathArg"/>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="EG_OMathMathElements">
<xsd:choice>
<xsd:element name="acc" type="CT_Acc"/>
<xsd:element name="bar" type="CT_Bar"/>
<xsd:element name="box" type="CT_Box"/>
<xsd:element name="borderBox" type="CT_BorderBox"/>
<xsd:element name="d" type="CT_D"/>
<xsd:element name="eqArr" type="CT_EqArr"/>
<xsd:element name="f" type="CT_F"/>
<xsd:element name="func" type="CT_Func"/>
<xsd:element name="groupChr" type="CT_GroupChr"/>
<xsd:element name="limLow" type="CT_LimLow"/>
<xsd:element name="limUpp" type="CT_LimUpp"/>
<xsd:element name="m" type="CT_M"/>
<xsd:element name="nary" type="CT_Nary"/>
<xsd:element name="phant" type="CT_Phant"/>
<xsd:element name="rad" type="CT_Rad"/>
<xsd:element name="sPre" type="CT_SPre"/>
<xsd:element name="sSub" type="CT_SSub"/>
<xsd:element name="sSubSup" type="CT_SSubSup"/>
<xsd:element name="sSup" type="CT_SSup"/>
<xsd:element name="r" type="CT_R"/>
</xsd:choice>
</xsd:group>
<xsd:group name="EG_OMathElements">
<xsd:choice>
<xsd:group ref="EG_OMathMathElements"/>
<xsd:group ref="w:EG_PContentMath"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="CT_OMathArgPr">
<xsd:sequence>
<xsd:element name="argSz" type="CT_Integer2" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_OMathArg">
<xsd:sequence>
<xsd:element name="argPr" type="CT_OMathArgPr" minOccurs="0"/>
<xsd:group ref="EG_OMathElements" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="ctrlPr" type="CT_CtrlPr" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="ST_Jc">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="left"/>
<xsd:enumeration value="right"/>
<xsd:enumeration value="center"/>
<xsd:enumeration value="centerGroup"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_OMathJc">
<xsd:attribute name="val" type="ST_Jc"/>
</xsd:complexType>
<xsd:complexType name="CT_OMathParaPr">
<xsd:sequence>
<xsd:element name="jc" type="CT_OMathJc" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_TwipsMeasure">
<xsd:attribute name="val" type="s:ST_TwipsMeasure" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_BreakBin">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="before"/>
<xsd:enumeration value="after"/>
<xsd:enumeration value="repeat"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_BreakBin">
<xsd:attribute name="val" type="ST_BreakBin"/>
</xsd:complexType>
<xsd:simpleType name="ST_BreakBinSub">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="--"/>
<xsd:enumeration value="-+"/>
<xsd:enumeration value="+-"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_BreakBinSub">
<xsd:attribute name="val" type="ST_BreakBinSub"/>
</xsd:complexType>
<xsd:complexType name="CT_MathPr">
<xsd:sequence>
<xsd:element name="mathFont" type="CT_String" minOccurs="0"/>
<xsd:element name="brkBin" type="CT_BreakBin" minOccurs="0"/>
<xsd:element name="brkBinSub" type="CT_BreakBinSub" minOccurs="0"/>
<xsd:element name="smallFrac" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="dispDef" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="lMargin" type="CT_TwipsMeasure" minOccurs="0"/>
<xsd:element name="rMargin" type="CT_TwipsMeasure" minOccurs="0"/>
<xsd:element name="defJc" type="CT_OMathJc" minOccurs="0"/>
<xsd:element name="preSp" type="CT_TwipsMeasure" minOccurs="0"/>
<xsd:element name="postSp" type="CT_TwipsMeasure" minOccurs="0"/>
<xsd:element name="interSp" type="CT_TwipsMeasure" minOccurs="0"/>
<xsd:element name="intraSp" type="CT_TwipsMeasure" minOccurs="0"/>
<xsd:choice minOccurs="0">
<xsd:element name="wrapIndent" type="CT_TwipsMeasure"/>
<xsd:element name="wrapRight" type="CT_OnOff"/>
</xsd:choice>
<xsd:element name="intLim" type="CT_LimLoc" minOccurs="0"/>
<xsd:element name="naryLim" type="CT_LimLoc" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="mathPr" type="CT_MathPr"/>
<xsd:complexType name="CT_OMathPara">
<xsd:sequence>
<xsd:element name="oMathParaPr" type="CT_OMathParaPr" minOccurs="0"/>
<xsd:element name="oMath" type="CT_OMath" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_OMath">
<xsd:sequence>
<xsd:group ref="EG_OMathElements" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="oMathPara" type="CT_OMathPara"/>
<xsd:element name="oMath" type="CT_OMath"/>
</xsd:schema>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.oclc.org/ooxml/officeDocument/relationships"
xmlns:r="http://purl.oclc.org/ooxml/officeDocument/relationships" elementFormDefault="qualified"
targetNamespace="http://purl.oclc.org/ooxml/officeDocument/relationships" blockDefault="#all">
<xsd:simpleType name="ST_RelationshipId">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:attribute name="id" type="ST_RelationshipId"/>
<xsd:attribute name="embed" type="ST_RelationshipId"/>
<xsd:attribute name="link" type="ST_RelationshipId"/>
<xsd:attribute name="dm" type="ST_RelationshipId" default=""/>
<xsd:attribute name="lo" type="ST_RelationshipId" default=""/>
<xsd:attribute name="qs" type="ST_RelationshipId" default=""/>
<xsd:attribute name="cs" type="ST_RelationshipId" default=""/>
<xsd:attribute name="blip" type="ST_RelationshipId" default=""/>
<xsd:attribute name="pict" type="ST_RelationshipId"/>
<xsd:attribute name="href" type="ST_RelationshipId"/>
<xsd:attribute name="topLeft" type="ST_RelationshipId"/>
<xsd:attribute name="topRight" type="ST_RelationshipId"/>
<xsd:attribute name="bottomLeft" type="ST_RelationshipId"/>
<xsd:attribute name="bottomRight" type="ST_RelationshipId"/>
</xsd:schema>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
schema 文件来自 https://www.ecma-international.org/publications-and-standards/standards/ecma-376/
presetShapeDefinitions.xml 来自 https://github.com/LibreOffice/core/blob/master/oox/source/drawingml/customshapes/presetShapeDefinitions.xml
因为官方的有错误,漏了 upArrow

View File

@@ -0,0 +1,640 @@
import {Type, simplifyUnionOne, generateCodes, xsd2Types} from '../xsd2Types';
test('fill', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CT_Stylesheet">
<xsd:sequence>
<xsd:element name="fills" type="CT_Fills" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Fills">
<xsd:sequence>
<xsd:element name="fill" type="CT_Fill" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="count" type="xsd:unsignedInt" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CT_Fill">
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element name="patternFill" type="CT_PatternFill" minOccurs="0" maxOccurs="1"/>
<xsd:element name="gradientFill" type="CT_GradientFill" minOccurs="0" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="CT_GradientFill">
<xsd:sequence>
<xsd:element name="stop" type="CT_GradientStop" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="type" type="ST_GradientType" use="optional" default="linear"/>
<xsd:attribute name="degree" type="xsd:double" use="optional" default="0"/>
<xsd:attribute name="left" type="xsd:double" use="optional" default="0"/>
<xsd:attribute name="right" type="xsd:double" use="optional" default="0"/>
<xsd:attribute name="top" type="xsd:double" use="optional" default="0"/>
<xsd:attribute name="bottom" type="xsd:double" use="optional" default="0"/>
</xsd:complexType>
<xsd:complexType name="CT_GradientStop">
<xsd:sequence>
<xsd:element name="color" type="CT_Color" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="position" type="xsd:double" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_GradientType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="linear"/>
<xsd:enumeration value="path"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_PatternFill">
<xsd:sequence>
<xsd:element name="fgColor" type="CT_Color" minOccurs="0" maxOccurs="1"/>
<xsd:element name="bgColor" type="CT_Color" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="patternType" type="ST_PatternType" use="optional"/>
</xsd:complexType>
<xsd:simpleType name="ST_PatternType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="none"/>
<xsd:enumeration value="solid"/>
<xsd:enumeration value="mediumGray"/>
<xsd:enumeration value="darkGray"/>
<xsd:enumeration value="lightGray"/>
<xsd:enumeration value="darkHorizontal"/>
<xsd:enumeration value="darkVertical"/>
<xsd:enumeration value="darkDown"/>
<xsd:enumeration value="darkUp"/>
<xsd:enumeration value="darkGrid"/>
<xsd:enumeration value="darkTrellis"/>
<xsd:enumeration value="lightHorizontal"/>
<xsd:enumeration value="lightVertical"/>
<xsd:enumeration value="lightDown"/>
<xsd:enumeration value="lightUp"/>
<xsd:enumeration value="lightGrid"/>
<xsd:enumeration value="lightTrellis"/>
<xsd:enumeration value="gray125"/>
<xsd:enumeration value="gray0625"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Color">
<xsd:attribute name="auto" type="xsd:boolean" use="optional"/>
<xsd:attribute name="indexed" type="xsd:unsignedInt" use="optional"/>
<xsd:attribute name="rgb" type="ST_UnsignedIntHex" use="optional"/>
<xsd:attribute name="theme" type="xsd:unsignedInt" use="optional"/>
<xsd:attribute name="tint" type="xsd:double" use="optional" default="0.0"/>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
expect(types).toEqual([
{
name: 'CT_Stylesheet',
type: 'CT_Stylesheet',
attributes: {
fills: {
name: 'fills',
isArray: false,
defaultValue: undefined,
type: 'CT_Fills'
}
}
},
{
name: 'CT_Fills',
type: 'CT_Fills',
attributes: {
fill: {
name: 'fill',
isArray: true,
defaultValue: undefined,
type: 'CT_Fill'
},
count: {
name: 'count',
defaultValue: undefined,
type: 'int'
}
}
},
{
name: 'CT_Fill',
type: 'CT_Fill',
attributes: {
patternFill: {
name: 'patternFill',
isArray: false,
defaultValue: undefined,
type: 'CT_PatternFill'
},
gradientFill: {
name: 'gradientFill',
isArray: false,
defaultValue: undefined,
type: 'CT_GradientFill'
}
}
},
{
name: 'CT_GradientFill',
type: 'CT_GradientFill',
attributes: {
stop: {
name: 'stop',
isArray: true,
defaultValue: undefined,
type: 'CT_GradientStop'
},
type: {
name: 'type',
defaultValue: 'linear',
type: 'ST_GradientType'
},
degree: {
name: 'degree',
defaultValue: '0',
type: 'double'
},
left: {
name: 'left',
defaultValue: '0',
type: 'double'
},
right: {
name: 'right',
defaultValue: '0',
type: 'double'
},
top: {
name: 'top',
defaultValue: '0',
type: 'double'
},
bottom: {
name: 'bottom',
defaultValue: '0',
type: 'double'
}
}
},
{
name: 'CT_GradientStop',
type: 'CT_GradientStop',
attributes: {
color: {
name: 'color',
isArray: false,
defaultValue: undefined,
type: 'CT_Color'
},
position: {
name: 'position',
defaultValue: undefined,
type: 'double'
}
}
},
{
name: 'ST_GradientType',
type: 'enum',
enum: ['linear', 'path']
},
{
name: 'CT_PatternFill',
type: 'CT_PatternFill',
attributes: {
fgColor: {
name: 'fgColor',
isArray: false,
defaultValue: undefined,
type: 'CT_Color'
},
bgColor: {
name: 'bgColor',
isArray: false,
defaultValue: undefined,
type: 'CT_Color'
},
patternType: {
name: 'patternType',
defaultValue: undefined,
type: 'ST_PatternType'
}
}
},
{
name: 'ST_PatternType',
type: 'enum',
enum: [
'none',
'solid',
'mediumGray',
'darkGray',
'lightGray',
'darkHorizontal',
'darkVertical',
'darkDown',
'darkUp',
'darkGrid',
'darkTrellis',
'lightHorizontal',
'lightVertical',
'lightDown',
'lightUp',
'lightGrid',
'lightTrellis',
'gray125',
'gray0625'
]
},
{
name: 'CT_Color',
type: 'CT_Color',
attributes: {
auto: {
name: 'auto',
defaultValue: undefined,
type: 'boolean'
},
indexed: {
name: 'indexed',
defaultValue: undefined,
type: 'int'
},
rgb: {
name: 'rgb',
defaultValue: undefined,
type: 'string'
},
theme: {
name: 'theme',
defaultValue: undefined,
type: 'int'
},
tint: {
name: 'tint',
defaultValue: '0.0',
type: 'double'
}
}
}
]);
});
test('list', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name="ST_CellSpan">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="ST_CellSpans">
<xsd:list itemType="ST_CellSpan"/>
</xsd:simpleType>
<xsd:complexType name="CT_Row">
<xsd:attribute name="spans" type="ST_CellSpans" use="optional"/>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
expect(types).toEqual([
{
name: 'ST_CellSpan',
type: 'string'
},
{
name: 'ST_CellSpans',
type: 'ST_CellSpan',
isArray: true
},
{
name: 'CT_Row',
type: 'CT_Row',
attributes: {
spans: {
name: 'spans',
type: 'ST_CellSpans'
}
}
}
]);
});
test('simplifyType', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name="ST_TextScale">
<xsd:union memberTypes="ST_TextScalePercent"/>
</xsd:simpleType>
<xsd:simpleType name="ST_TextScalePercent">
<xsd:restriction base="xsd:string">
<xsd:pattern value="0*(600|([0-5]?[0-9]?[0-9]))%"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_TextScale">
<xsd:attribute name="val" type="ST_TextScale"/>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
expect(types).toEqual([
{
name: 'ST_TextScale',
type: 'union',
union: ['ST_TextScalePercent']
},
{
name: 'ST_TextScalePercent',
type: 'string'
},
{
name: 'CT_TextScale',
type: 'CT_TextScale',
attributes: {
val: {
name: 'val',
type: 'ST_TextScale'
}
}
}
]);
const code = generateCodes(types);
console.log(code);
});
test('ST_DecimalNumber', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CT_DecimalNumber">
<xsd:attribute name="val" type="ST_DecimalNumber" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_DecimalNumber">
<xsd:restriction base="xsd:integer"/>
</xsd:simpleType>
</xsd:schema>`;
const types = await xsd2Types(xml);
const code = generateCodes(types);
console.log(code);
});
test('typeprefix', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CT_WordprocessingCanvas">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
expect(types).toEqual([
{
name: 'CT_WordprocessingCanvas',
type: 'CT_WordprocessingCanvas',
attributes: {
extLst: {
name: 'extLst',
isArray: false,
defaultValue: undefined,
type: 'CT_OfficeArtExtensionList'
}
}
}
]);
});
test('mergeUnion', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name="ST_TextBulletSize">
<xsd:union memberTypes="ST_TextBulletSizePercent"/>
</xsd:simpleType>
<xsd:simpleType name="ST_TextBulletSizePercent">
<xsd:restriction base="xsd:string">
<xsd:pattern value="0*((2[5-9])|([3-9][0-9])|([1-3][0-9][0-9])|400)%"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>`;
const types = await xsd2Types(xml);
simplifyUnionOne(types);
expect(types).toEqual([
{
name: 'ST_TextBulletSize',
type: 'string'
},
{
name: 'ST_TextBulletSizePercent',
type: 'string'
}
]);
});
test('cfRule', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CT_CfRule">
<xsd:sequence>
<xsd:element name="formula" type="ST_Formula" minOccurs="0" maxOccurs="3"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
simplifyUnionOne(types);
expect(types).toEqual([
{
name: 'CT_CfRule',
type: 'CT_CfRule',
attributes: {
formula: {
name: 'formula',
isArray: true,
defaultValue: undefined,
type: 'child-string'
}
}
}
]);
});
test('groupref', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CT_Color">
<xsd:sequence>
<xsd:group ref="EG_ColorChoice"/>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="EG_ColorChoice">
<xsd:choice>
<xsd:element name="scrgbClr" type="CT_ScRgbColor" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="CT_ScRgbColor">
<xsd:attribute name="r" type="ST_Percentage" use="required"/>
<xsd:attribute name="g" type="ST_Percentage" use="required"/>
<xsd:attribute name="b" type="ST_Percentage" use="required"/>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
expect(types).toEqual([
{
name: 'CT_Color',
type: 'CT_Color',
attributes: {
scrgbClr: {
name: 'scrgbClr',
isArray: false,
defaultValue: undefined,
type: 'CT_ScRgbColor'
}
}
},
{
name: 'CT_ScRgbColor',
type: 'CT_ScRgbColor',
attributes: {
r: {
name: 'r',
defaultValue: undefined,
type: 'string'
},
g: {
name: 'g',
defaultValue: undefined,
type: 'string'
},
b: {
name: 'b',
defaultValue: undefined,
type: 'string'
}
}
}
]);
});
test('any', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CT_Extension">
<xsd:sequence>
<xsd:any processContents="lax"/>
</xsd:sequence>
<xsd:attribute name="uri" type="xsd:token"/>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
expect(types).toEqual([
{
name: 'CT_Extension',
type: 'CT_Extension',
attributes: {
__any__: {
name: '__any__',
type: 'any'
},
uri: {
name: 'uri',
defaultValue: undefined,
type: 'string'
}
}
}
]);
});
test('rid', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CT_Rel">
<xsd:attribute ref="r:id" use="required"/>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
expect(types).toEqual([
{
name: 'CT_Rel',
type: 'CT_Rel',
attributes: {
'r:id': {
name: 'r:id',
type: 'string'
}
}
}
]);
});
test('ignore', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CT_Extension">
<xsd:sequence>
<xsd:any processContents="lax"/>
</xsd:sequence>
<xsd:attribute name="uri" type="xsd:token"/>
</xsd:complexType>
<xsd:group name="EG_ExtensionList">
<xsd:sequence>
<xsd:element name="ext" type="CT_Extension" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="CT_ExtensionList">
<xsd:sequence>
<xsd:group ref="EG_ExtensionList" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
const code = generateCodes(types);
console.log(code);
});
test('child-string-sequence', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CT_NumVal">
<xsd:sequence>
<xsd:element name="v" type="s:ST_Xstring" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
expect(types).toEqual([
{
name: 'CT_NumVal',
type: 'CT_NumVal',
attributes: {
v: {
name: 'v',
isArray: false,
defaultValue: undefined,
type: 'child-string'
}
}
}
]);
});
test('child-string-element', async () => {
const xml = `<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CT_NumRef">
<xsd:sequence>
<xsd:element name="f" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>`;
const types = await xsd2Types(xml);
expect(types).toEqual([
{
name: 'CT_NumRef',
type: 'CT_NumRef',
attributes: {
f: {
name: 'f',
isArray: false,
defaultValue: undefined,
type: 'child-string'
}
}
}
]);
});

View File

@@ -0,0 +1,51 @@
/**
* 将 drawingml 配置转成内置 json 格式,避免运行时再次解析
*/
import {readFileSync, writeFileSync} from 'fs';
import {parseXML} from '../src/util/xml';
import {Shape} from '../src/openxml/drawing/Shape';
import {parseShape} from '../src/word/parse/parseShape';
import jsdom from 'jsdom';
import prettier from 'prettier';
const {JSDOM} = jsdom;
const {DOMParser} = new JSDOM(``).window;
global.DOMParser = DOMParser;
const drawingML = parseXML(
readFileSync(
'./OfficeOpenXML-DrawingMLGeometries/presetShapeDefinitions.xml',
'utf-8'
)
);
let outputFile: string[] = [
'/** generated by tools/converDarwingML.ts, do not edit */',
`import {Shape} from './Shape';`
];
const shapeMap: {[key: string]: Shape} = {};
for (const shape of drawingML
.getElementsByTagName('presetShapeDefinitons')
.item(0)!.children) {
const shapeName = shape.tagName;
shapeMap[shapeName] = parseShape(shape);
}
outputFile.push(
'export const presetShape: Record<string, Shape> = ' +
JSON.stringify(shapeMap, null, 2) +
';'
);
prettier.resolveConfig('../../../.prettierrc').then(options => {
const formatted = prettier.format(outputFile.join('\n'), {
...options,
parser: 'typescript'
});
writeFileSync('../src/openxml/word/drawing/presetShape.ts', formatted);
});

View File

@@ -0,0 +1,33 @@
/**
* 将文件转成 base64 字符串
*/
import {readFileSync, writeFileSync} from 'fs';
import prettier from 'prettier';
import process from 'node:process';
import path from 'node:path';
const file = process.argv[2];
const tsFile = process.argv[3];
const content = readFileSync(file);
const varName = path.basename(tsFile.replace(/\.ts$/, ''));
const base64Content = content.toString('base64');
const outputFile = `
/** generated by convertFileToBase64.ts, do not edit */
export const ${varName} = '${base64Content}';
`;
prettier.resolveConfig('../../../.prettierrc').then(options => {
const formatted = prettier.format(outputFile, {
...options,
parser: 'typescript'
});
writeFileSync(tsFile, formatted);
});

View File

@@ -0,0 +1,57 @@
/**
* 转换 presetCellStyles 为对象,但好像这个功能在浏览模式不需要
*/
import {readFileSync, writeFileSync} from 'fs';
import prettier from 'prettier';
import {xml2json} from '../src/util/xml';
import {autoParse} from '../src/common/autoParse';
import {
CT_Stylesheet,
CT_Stylesheet_Attributes
} from '../src/openxml/ExcelTypes';
async function convert() {
const presetFileNode = await xml2json(
readFileSync(
'./OfficeOpenXML-SpreadsheetMLStyles/presetCellStyles.xml',
'utf-8'
)
);
const presetCellStyles: Record<string, CT_Stylesheet> = {};
for (const tableStyle of presetFileNode.children) {
const styleId = tableStyle.attrs['builtinId'];
const styleDef = autoParse(
tableStyle.children[0],
CT_Stylesheet_Attributes
);
if (styleDef) {
delete styleDef['xmlns'];
presetCellStyles[styleId] = styleDef;
}
}
let outputFile: string[] = [
'/** generated by tools/convertPresetCellStyles.ts, do not edit */',
`import {CT_Stylesheet} from '../../../../openxml/ExcelTypes';`
];
outputFile.push(
'export const presetCellStyles: Record<string, CT_Stylesheet> = ' +
JSON.stringify(presetCellStyles, null, 2) +
';'
);
prettier.resolveConfig('../../../.prettierrc').then(options => {
const formatted = prettier.format(outputFile.join('\n'), {
...options,
parser: 'typescript'
});
writeFileSync(
'../src/excel/io/excel/preset/presetCellStyles.ts',
formatted
);
});
}
convert();

View File

@@ -0,0 +1,50 @@
/**
* 转换 presetTableStyles 为对象方便处理
*/
import {readFileSync, writeFileSync} from 'fs';
import prettier from 'prettier';
import {xml2json} from '../src/util/xml';
import {TableStyleDef} from '../src/excel/types/TableStyleDef';
import {parseTableStyleDef} from '../src/excel/io/excel/parseTableStyleDef';
async function convert() {
const presetFileNode = await xml2json(
readFileSync(
'./OfficeOpenXML-SpreadsheetMLStyles/presetTableStyles.xml',
'utf-8'
)
);
const presetTableStyles: Record<string, TableStyleDef> = {};
for (const tableStyle of presetFileNode.children) {
const styleName = tableStyle.tag;
const styleDef = parseTableStyleDef(tableStyle);
if (styleDef) {
presetTableStyles[styleName] = styleDef;
}
}
let outputFile: string[] = [
'/** generated by tools/convertPresetTableStyle.ts, do not edit */',
`import {TableStyleDef} from '../../../types/TableStyleDef';`
];
outputFile.push(
'export const presetTableStyles: Record<string, TableStyleDef> = ' +
JSON.stringify(presetTableStyles, null, 2) +
';'
);
prettier.resolveConfig('../../../.prettierrc').then(options => {
const formatted = prettier.format(outputFile.join('\n'), {
...options,
parser: 'typescript'
});
writeFileSync(
'../src/excel/io/excel/preset/presetTableStyles.ts',
formatted
);
});
}
convert();

View File

@@ -0,0 +1,23 @@
/**
* 创建个大的csv文件
*/
import process from 'node:process';
const columns = 10;
const rows = 1000000;
// 写入 csv header
const header: string[] = [];
for (let i = 0; i < columns; i++) {
header.push(`col${i}`);
}
process.stdout.write(header.join(',') + '\n');
for (let i = 0; i < rows; i++) {
const row: string[] = [];
for (let j = 0; j < columns; j++) {
row.push(`r${i} c${j}`);
}
process.stdout.write(row.join(',') + '\n');
}

View File

@@ -0,0 +1,26 @@
/**
* 测试 Excel 解析是否正常
*/
import jsdom from 'jsdom';
const {JSDOM} = jsdom;
const {DOMParser, document, Blob, URL} = new JSDOM(``).window;
global.DOMParser = DOMParser;
global.document = document;
global.Blob = Blob;
global.URL = URL;
import {readFileSync} from 'fs';
import {createOfficeViewer} from '../src';
import {getFiles} from './getFiles';
const dir = process.argv[2];
(async () => {
for await (const file of getFiles(dir)) {
if (file.endsWith('.xlsx') && !file.includes('~$')) {
console.log(file);
const data = readFileSync(file);
const excel = await createOfficeViewer(data, {}, file);
}
}
})();

View File

@@ -0,0 +1,879 @@
<?xml version="1.0" encoding="utf-8"?>
<schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" targetNamespace="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" elementFormDefault="qualified" xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2">
<import namespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main" schemaLocation="xlbasictypes.xsd" />
<import namespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main" schemaLocation="xlsheet.xsd" />
<import namespace="http://schemas.openxmlformats.org/officeDocument/2006/relationships" schemaLocation="orel.xsd" />
<import namespace="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" schemaLocation="xl15.xsd" />
<import namespace="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" schemaLocation="xlslicercache15.xsd" />
<import namespace="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" schemaLocation="xlrevexignore10.xsd" />
<import namespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main" schemaLocation="xlpivot.xsd" />
<import namespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main" schemaLocation="xlworkbook.xsd" />
<import namespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main" schemaLocation="xlsupbook.xsd" />
<import namespace="http://schemas.microsoft.com/office/excel/2006/main" schemaLocation="xlmbasictypes.xsd" />
<import namespace="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" schemaLocation="xlrevexignore.xsd" />
<import namespace="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" schemaLocation="xlrevexignore2.xsd" />
<import schemaLocation="xlsst.xsd" namespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main" />
<element name="slicerCacheDefinition" type="CT_SlicerCacheDefinition" />
<complexType name="CT_SlicerCacheDefinition">
<sequence>
<element name="pivotTables" type="CT_SlicerCachePivotTables" minOccurs="0" maxOccurs="1" />
<element name="data" type="CT_SlicerCacheData" minOccurs="0" maxOccurs="1" />
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="name" type="x:ST_Xstring" use="required" />
<attribute ref="xr10:uid" use="optional" />
<attribute name="sourceName" type="x:ST_Xstring" use="required" />
</complexType>
<simpleType name="ST_OlapSlicerCacheSortOrder">
<restriction base="xsd:string">
<enumeration value="natural" />
<enumeration value="ascending" />
<enumeration value="descending" />
</restriction>
</simpleType>
<simpleType name="ST_TabularSlicerCacheSortOrder">
<restriction base="xsd:string">
<enumeration value="ascending" />
<enumeration value="descending" />
</restriction>
</simpleType>
<simpleType name="ST_SlicerCacheCrossFilter">
<restriction base="xsd:string">
<enumeration value="none" />
<enumeration value="showItemsWithDataAtTop" />
<enumeration value="showItemsWithNoData" />
</restriction>
</simpleType>
<complexType name="CT_SlicerCacheData">
<choice minOccurs="1" maxOccurs="1">
<element name="olap" type="CT_OlapSlicerCache" minOccurs="1" maxOccurs="1" />
<element name="tabular" type="CT_TabularSlicerCache" minOccurs="1" maxOccurs="1" />
</choice>
</complexType>
<complexType name="CT_SlicerCachePivotTables">
<sequence>
<element name="pivotTable" type="CT_SlicerCachePivotTable" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_SlicerCachePivotTable">
<attribute name="tabId" type="xsd:unsignedInt" use="required" />
<attribute name="name" type="x:ST_Xstring" use="required" />
</complexType>
<complexType name="CT_OlapSlicerCacheItem">
<sequence>
<element name="p" type="CT_OlapSlicerCacheItemParent" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attribute name="n" type="x:ST_Xstring" use="required" />
<attribute name="c" type="x:ST_Xstring" use="optional" />
<attribute name="nd" type="xsd:boolean" use="optional" default="false" />
</complexType>
<complexType name="CT_OlapSlicerCacheItemParent">
<attribute name="n" type="x:ST_Xstring" use="required" />
</complexType>
<complexType name="CT_OlapSlicerCacheRange">
<sequence>
<element name="i" type="CT_OlapSlicerCacheItem" minOccurs="1" maxOccurs="unbounded" />
</sequence>
<attribute name="startItem" type="xsd:unsignedInt" use="required" />
</complexType>
<complexType name="CT_OlapSlicerCacheRanges">
<sequence>
<element name="range" type="CT_OlapSlicerCacheRange" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_OlapSlicerCacheLevelData">
<sequence>
<element name="ranges" type="CT_OlapSlicerCacheRanges" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="uniqueName" type="x:ST_Xstring" use="required" />
<attribute name="sourceCaption" type="x:ST_Xstring" use="optional" />
<attribute name="count" type="xsd:unsignedInt" use="required" />
<attribute name="sortOrder" type="ST_OlapSlicerCacheSortOrder" use="optional" default="natural" />
<attribute name="crossFilter" type="ST_SlicerCacheCrossFilter" use="optional" default="showItemsWithDataAtTop" />
</complexType>
<complexType name="CT_OlapSlicerCacheLevelsData">
<sequence>
<element name="level" type="CT_OlapSlicerCacheLevelData" minOccurs="1" maxOccurs="unbounded" />
</sequence>
<attribute name="count" type="xsd:unsignedInt" use="optional" />
</complexType>
<complexType name="CT_OlapSlicerCache">
<sequence>
<element name="levels" type="CT_OlapSlicerCacheLevelsData" minOccurs="1" maxOccurs="1" />
<element name="selections" type="CT_OlapSlicerCacheSelections" minOccurs="1" maxOccurs="1" />
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="pivotCacheId" type="xsd:unsignedInt" use="required" />
</complexType>
<complexType name="CT_OlapSlicerCacheSelections">
<sequence>
<element name="selection" type="CT_OlapSlicerCacheSelection" minOccurs="1" maxOccurs="unbounded" />
</sequence>
<attribute name="count" type="xsd:unsignedInt" use="optional" />
</complexType>
<complexType name="CT_OlapSlicerCacheSelection">
<sequence>
<element name="p" type="CT_OlapSlicerCacheItemParent" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attribute name="n" type="x:ST_Xstring" use="required" />
</complexType>
<complexType name="CT_TabularSlicerCache">
<sequence>
<element name="items" type="CT_TabularSlicerCacheItems" minOccurs="0" maxOccurs="1" />
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="pivotCacheId" type="xsd:unsignedInt" use="required" />
<attribute name="sortOrder" type="ST_TabularSlicerCacheSortOrder" use="optional" default="ascending" />
<attribute name="customListSort" type="xsd:boolean" use="optional" default="true" />
<attribute name="showMissing" type="xsd:boolean" use="optional" default="true" />
<attribute name="crossFilter" type="ST_SlicerCacheCrossFilter" use="optional" default="showItemsWithDataAtTop" />
</complexType>
<complexType name="CT_TabularSlicerCacheItems">
<sequence>
<element name="i" type="CT_TabularSlicerCacheItem" minOccurs="1" maxOccurs="unbounded" />
</sequence>
<attribute name="count" type="xsd:unsignedInt" use="optional" />
</complexType>
<complexType name="CT_TabularSlicerCacheItem">
<attribute name="x" type="xsd:unsignedInt" use="required" />
<attribute name="s" type="xsd:boolean" use="optional" default="false" />
<attribute name="nd" type="xsd:boolean" use="optional" default="false" />
</complexType>
<element name="conditionalFormattings" type="CT_ConditionalFormattings" />
<element name="dataValidations" type="CT_DataValidations" />
<element name="sparklineGroups" type="CT_SparklineGroups" />
<element name="slicerList" type="CT_SlicerRefs" />
<element name="protectedRanges" type="CT_ProtectedRanges" />
<element name="ignoredErrors" type="CT_IgnoredErrors" />
<complexType name="CT_ConditionalFormattings">
<sequence>
<element name="conditionalFormatting" type="CT_ConditionalFormatting" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_ConditionalFormatting">
<sequence>
<element name="cfRule" type="CT_CfRule" minOccurs="0" maxOccurs="unbounded" />
<element ref="xm:sqref" minOccurs="0" maxOccurs="1" />
<element name="extLst" minOccurs="0" type="x:CT_ExtensionList" />
</sequence>
<attribute name="pivot" type="xsd:boolean" default="false" use="optional" />
</complexType>
<complexType name="CT_DataValidations">
<sequence>
<element name="dataValidation" type="CT_DataValidation" minOccurs="1" maxOccurs="unbounded" />
</sequence>
<attribute name="disablePrompts" type="xsd:boolean" use="optional" default="false" />
<attribute name="xWindow" type="xsd:unsignedInt" use="optional" />
<attribute name="yWindow" type="xsd:unsignedInt" use="optional" />
<attribute name="count" type="xsd:unsignedInt" use="optional" />
</complexType>
<complexType name="CT_DataValidationFormula">
<sequence>
<element ref="xm:f" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>
<complexType name="CT_DataValidation">
<sequence>
<element name="formula1" type="CT_DataValidationFormula" minOccurs="0" maxOccurs="1" />
<element name="formula2" type="CT_DataValidationFormula" minOccurs="0" maxOccurs="1" />
<element ref="xm:sqref" minOccurs="1" maxOccurs="1" />
</sequence>
<attribute name="type" type="x:ST_DataValidationType" use="optional" default="none" />
<attribute name="errorStyle" type="x:ST_DataValidationErrorStyle" use="optional" default="stop" />
<attribute name="imeMode" type="x:ST_DataValidationImeMode" use="optional" default="noControl" />
<attribute name="operator" type="x:ST_DataValidationOperator" use="optional" default="between" />
<attribute name="allowBlank" type="xsd:boolean" use="optional" default="false" />
<attribute name="showDropDown" type="xsd:boolean" use="optional" default="false" />
<attribute name="showInputMessage" type="xsd:boolean" use="optional" default="false" />
<attribute name="showErrorMessage" type="xsd:boolean" use="optional" default="false" />
<attribute name="errorTitle" type="x:ST_Xstring" use="optional" />
<attribute name="error" type="x:ST_Xstring" use="optional" />
<attribute name="promptTitle" type="x:ST_Xstring" use="optional" />
<attribute name="prompt" type="x:ST_Xstring" use="optional" />
<attribute ref="xr:uid" />
</complexType>
<simpleType name="ST_DispBlanksAs">
<restriction base="xsd:string">
<enumeration value="span" />
<enumeration value="gap" />
<enumeration value="zero" />
</restriction>
</simpleType>
<simpleType name="ST_SparklineAxisMinMax">
<restriction base="xsd:string">
<enumeration value="individual" />
<enumeration value="group" />
<enumeration value="custom" />
</restriction>
</simpleType>
<complexType name="CT_SparklineGroups">
<sequence>
<element name="sparklineGroup" type="CT_SparklineGroup" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_SparklineGroup">
<sequence>
<element name="colorSeries" minOccurs="0" maxOccurs="1" type="x:CT_Color" />
<element name="colorNegative" minOccurs="0" maxOccurs="1" type="x:CT_Color" />
<element name="colorAxis" minOccurs="0" maxOccurs="1" type="x:CT_Color" />
<element name="colorMarkers" minOccurs="0" maxOccurs="1" type="x:CT_Color" />
<element name="colorFirst" minOccurs="0" maxOccurs="1" type="x:CT_Color" />
<element name="colorLast" minOccurs="0" maxOccurs="1" type="x:CT_Color" />
<element name="colorHigh" minOccurs="0" maxOccurs="1" type="x:CT_Color" />
<element name="colorLow" minOccurs="0" maxOccurs="1" type="x:CT_Color" />
<element ref="xm:f" minOccurs="0" maxOccurs="1" />
<element name="sparklines" type="CT_Sparklines" minOccurs="1" maxOccurs="1" />
</sequence>
<attribute name="manualMax" type="xsd:double" use="optional" />
<attribute name="manualMin" type="xsd:double" use="optional" />
<attribute name="lineWeight" type="xsd:double" use="optional" default="0.75" />
<attribute name="type" type="ST_SparklineType" use="optional" default="line" />
<attribute name="dateAxis" type="xsd:boolean" use="optional" default="false" />
<attribute name="displayEmptyCellsAs" type="ST_DispBlanksAs" use="optional" default="zero" />
<attribute name="markers" type="xsd:boolean" use="optional" default="false" />
<attribute name="high" type="xsd:boolean" use="optional" default="false" />
<attribute name="low" type="xsd:boolean" use="optional" default="false" />
<attribute name="first" type="xsd:boolean" use="optional" default="false" />
<attribute name="last" type="xsd:boolean" use="optional" default="false" />
<attribute name="negative" type="xsd:boolean" use="optional" default="false" />
<attribute name="displayXAxis" type="xsd:boolean" use="optional" default="false" />
<attribute name="displayHidden" type="xsd:boolean" use="optional" default="false" />
<attribute name="minAxisType" type="ST_SparklineAxisMinMax" use="optional" default="individual" />
<attribute name="maxAxisType" type="ST_SparklineAxisMinMax" use="optional" default="individual" />
<attribute name="rightToLeft" type="xsd:boolean" use="optional" default="false" />
<attribute ref="xr2:uid" />
</complexType>
<simpleType name="ST_SparklineType">
<restriction base="xsd:string">
<enumeration value="line" />
<enumeration value="column" />
<enumeration value="stacked" />
</restriction>
</simpleType>
<complexType name="CT_Sparklines">
<sequence>
<element name="sparkline" type="CT_Sparkline" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_Sparkline">
<sequence>
<element ref="xm:f" minOccurs="0" maxOccurs="1" />
<element ref="xm:sqref" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>
<element name="pivotCaches" type="x:CT_PivotCaches" />
<element name="slicerCaches" type="CT_SlicerCaches" />
<element name="workbookPr" type="CT_WorkbookPr" />
<complexType name="CT_WorkbookPr">
<attribute name="defaultImageDpi" type="xsd:unsignedInt" default="220" />
<attribute name="discardImageEditData" type="xsd:boolean" default="false" />
<attribute name="accuracyVersion" type="xsd:unsignedInt" default="0" />
</complexType>
<complexType name="CT_SlicerRefs">
<sequence>
<element name="slicer" type="CT_SlicerRef" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_SlicerRef">
<attribute ref="r:id" use="required" />
</complexType>
<complexType name="CT_SlicerCaches">
<sequence>
<element name="slicerCache" type="CT_SlicerCache" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_SlicerCache">
<attribute ref="r:id" use="required" />
</complexType>
<element name="calculatedMember" type="CT_CalculatedMember" />
<complexType name="CT_CalculatedMember">
<sequence>
<element name="tupleSet" minOccurs="0" maxOccurs="1" type="CT_TupleSet" />
</sequence>
<attribute name="displayFolder" type="x:ST_Xstring" use="optional" />
<attribute name="flattenHierarchies" type="xsd:boolean" use="optional" default="true" />
<attribute name="dynamicSet" type="xsd:boolean" use="optional" default="false" />
<attribute name="hierarchizeDistinct" type="xsd:boolean" use="optional" default="true" />
<attribute name="mdxLong" type="x:ST_Xstring" use="optional" />
</complexType>
<complexType name="CT_TupleSet">
<sequence>
<element name="headers" type="CT_TupleSetHeaders" minOccurs="1" maxOccurs="1" />
<element name="rows" type="CT_TupleSetRows" minOccurs="1" maxOccurs="1" />
</sequence>
<attribute name="rowCount" type="xsd:unsignedInt" use="optional" default="1" />
<attribute name="columnCount" type="xsd:unsignedInt" use="optional" default="1" />
</complexType>
<complexType name="CT_TupleSetHeaders">
<sequence>
<element name="header" type="CT_TupleSetHeader" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_TupleSetHeader">
<attribute name="uniqueName" type="x:ST_Xstring" use="optional" />
<attribute name="hierarchyName" type="x:ST_Xstring" use="optional" />
</complexType>
<complexType name="CT_TupleSetRows">
<sequence>
<element name="row" type="CT_TupleSetRow" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_TupleSetRow">
<sequence>
<element name="rowItem" type="CT_TupleSetRowItem" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_TupleSetRowItem">
<attribute name="u" type="x:ST_Xstring" use="optional" />
<attribute name="d" type="x:ST_Xstring" use="optional" />
</complexType>
<element name="cacheHierarchy" type="CT_CacheHierarchy" />
<complexType name="CT_SetLevels">
<sequence>
<element name="setLevel" minOccurs="1" maxOccurs="unbounded" type="CT_SetLevel" />
</sequence>
<attribute name="count" type="xsd:unsignedInt" use="optional" />
</complexType>
<complexType name="CT_SetLevel">
<attribute name="hierarchy" use="required" type="xsd:int" />
</complexType>
<complexType name="CT_CacheHierarchy">
<sequence>
<element name="setLevels" minOccurs="0" maxOccurs="1" type="CT_SetLevels" />
</sequence>
<attribute name="flattenHierarchies" type="xsd:boolean" use="optional" default="true" />
<attribute name="measuresSet" type="xsd:boolean" use="optional" default="false" />
<attribute name="hierarchizeDistinct" type="xsd:boolean" use="optional" default="true" />
<attribute name="ignore" type="xsd:boolean" default="false" use="optional" />
</complexType>
<element name="dataField" type="CT_DataField" />
<complexType name="CT_DataField">
<attribute name="pivotShowAs" type="ST_PivotShowAs" use="optional" />
<attribute name="sourceField" type="xsd:unsignedInt" use="optional" />
<attribute name="uniqueName" type="x:ST_Xstring" use="optional" />
</complexType>
<simpleType name="ST_PivotShowAs">
<restriction base="xsd:string">
<enumeration value="percentOfParent" />
<enumeration value="percentOfParentRow" />
<enumeration value="percentOfParentCol" />
<enumeration value="percentOfRunningTotal" />
<enumeration value="rankAscending" />
<enumeration value="rankDescending" />
</restriction>
</simpleType>
<simpleType name="ST_DataBarDirection">
<restriction base="xsd:string">
<enumeration value="context" />
<enumeration value="leftToRight" />
<enumeration value="rightToLeft" />
</restriction>
</simpleType>
<simpleType name="ST_DataBarAxisPosition">
<restriction base="xsd:string">
<enumeration value="automatic" />
<enumeration value="middle" />
<enumeration value="none" />
</restriction>
</simpleType>
<simpleType name="ST_CfvoType">
<restriction base="xsd:string">
<enumeration value="num" />
<enumeration value="percent" />
<enumeration value="max" />
<enumeration value="min" />
<enumeration value="formula" />
<enumeration value="percentile" />
<enumeration value="autoMin" />
<enumeration value="autoMax" />
</restriction>
</simpleType>
<complexType name="CT_Cfvo">
<sequence>
<element ref="xm:f" minOccurs="0" maxOccurs="1" />
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="type" type="ST_CfvoType" use="required" />
<attribute name="gte" type="xsd:boolean" use="optional" default="true" />
</complexType>
<complexType name="CT_CfRule">
<sequence>
<element ref="xm:f" minOccurs="0" maxOccurs="3" />
<element name="colorScale" type="CT_ColorScale" minOccurs="0" maxOccurs="1" />
<element name="dataBar" type="CT_DataBar" minOccurs="0" maxOccurs="1" />
<element name="iconSet" type="CT_IconSet" minOccurs="0" maxOccurs="1" />
<element name="dxf" type="x:CT_Dxf" minOccurs="0" maxOccurs="1" />
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="type" type="x:ST_CfType" use="optional" />
<attribute name="priority" type="xsd:int" use="optional" />
<attribute name="stopIfTrue" type="xsd:boolean" use="optional" default="false" />
<attribute name="aboveAverage" type="xsd:boolean" use="optional" default="true" />
<attribute name="percent" type="xsd:boolean" use="optional" default="false" />
<attribute name="bottom" type="xsd:boolean" use="optional" default="false" />
<attribute name="operator" type="x:ST_ConditionalFormattingOperator" use="optional" />
<attribute name="text" type="xsd:string" use="optional" />
<attribute name="timePeriod" type="x:ST_TimePeriod" use="optional" />
<attribute name="rank" type="xsd:unsignedInt" use="optional" />
<attribute name="stdDev" type="xsd:int" use="optional" />
<attribute name="equalAverage" type="xsd:boolean" use="optional" default="false" />
<attribute name="activePresent" type="xsd:boolean" use="optional" default="false" />
<attribute name="id" type="x:ST_Guid" use="optional" />
</complexType>
<complexType name="CT_IconSet">
<sequence>
<element name="cfvo" type="CT_Cfvo" minOccurs="2" maxOccurs="unbounded" />
<element name="cfIcon" type="CT_CfIcon" minOccurs="0" maxOccurs="5" />
</sequence>
<attribute name="iconSet" type="ST_IconSetType" use="optional" default="3TrafficLights1" />
<attribute name="showValue" type="xsd:boolean" use="optional" default="true" />
<attribute name="percent" type="xsd:boolean" use="optional" default="true" />
<attribute name="reverse" type="xsd:boolean" use="optional" default="false" />
<attribute name="custom" type="xsd:boolean" use="optional" default="false" />
</complexType>
<complexType name="CT_ColorScale">
<sequence>
<element name="cfvo" type="CT_Cfvo" minOccurs="2" maxOccurs="unbounded" />
<element name="color" type="x:CT_Color" minOccurs="2" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_DataBar">
<sequence>
<element name="cfvo" type="CT_Cfvo" minOccurs="2" maxOccurs="2" />
<element name="fillColor" type="x:CT_Color" minOccurs="0" maxOccurs="1" />
<element name="borderColor" type="x:CT_Color" minOccurs="0" maxOccurs="1" />
<element name="negativeFillColor" type="x:CT_Color" minOccurs="0" maxOccurs="1" />
<element name="negativeBorderColor" type="x:CT_Color" minOccurs="0" maxOccurs="1" />
<element name="axisColor" type="x:CT_Color" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="minLength" type="xsd:unsignedInt" use="optional" default="10" />
<attribute name="maxLength" type="xsd:unsignedInt" use="optional" default="90" />
<attribute name="showValue" type="xsd:boolean" use="optional" default="true" />
<attribute name="border" type="xsd:boolean" use="optional" default="false" />
<attribute name="gradient" type="xsd:boolean" use="optional" default="true" />
<attribute name="direction" type="ST_DataBarDirection" use="optional" default="context" />
<attribute name="negativeBarColorSameAsPositive" type="xsd:boolean" use="optional" default="false" />
<attribute name="negativeBarBorderColorSameAsPositive" type="xsd:boolean" use="optional" default="true" />
<attribute name="axisPosition" type="ST_DataBarAxisPosition" use="optional" default="automatic" />
</complexType>
<element name="pivotField" type="CT_PivotField" />
<complexType name="CT_PivotField">
<attribute name="fillDownLabels" type="xsd:boolean" use="optional" default="false" />
<attribute name="ignore" type="xsd:boolean" default="false" use="optional" />
</complexType>
<element name="pivotTableDefinition" type="CT_PivotTableDefinition" />
<complexType name="CT_PivotTableDefinition">
<sequence>
<element name="pivotEdits" type="CT_PivotEdits" minOccurs="0" maxOccurs="1" />
<element name="pivotChanges" type="CT_PivotChanges" minOccurs="0" maxOccurs="1" />
<element name="conditionalFormats" type="CT_ConditionalFormats" minOccurs="0" />
</sequence>
<attribute name="fillDownLabelsDefault" type="xsd:boolean" use="optional" default="false" />
<attribute name="visualTotalsForSets" type="xsd:boolean" use="optional" default="false" />
<attribute name="calculatedMembersInFilters" type="xsd:boolean" use="optional" default="false" />
<attribute name="altText" type="x:ST_Xstring" use="optional" />
<attribute name="altTextSummary" type="x:ST_Xstring" use="optional" />
<attribute name="enableEdit" type="xsd:boolean" use="optional" default="false" />
<attribute name="autoApply" type="xsd:boolean" use="optional" default="false" />
<attribute name="allocationMethod" type="ST_AllocationMethod" use="optional" default="equalAllocation" />
<attribute name="weightExpression" type="x:ST_Xstring" use="optional" />
<attribute name="hideValuesRow" type="xsd:boolean" use="optional" default="false" />
</complexType>
<element name="pivotCacheDefinition" type="CT_PivotCacheDefinition" />
<complexType name="CT_PivotCacheDefinition">
<attribute name="slicerData" type="xsd:boolean" use="optional" default="false" />
<attribute name="pivotCacheId" type="xsd:unsignedInt" use="optional" />
<attribute name="supportSubqueryNonVisual" type="xsd:boolean" use="optional" default="false" />
<attribute name="supportSubqueryCalcMem" type="xsd:boolean" use="optional" default="false" />
<attribute name="supportAddCalcMems" type="xsd:boolean" use="optional" default="false" />
</complexType>
<element name="connection" type="CT_Connection" />
<complexType name="CT_Connection">
<sequence>
<element name="calculatedMembers" type="x:CT_CalculatedMembers" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="culture" use="optional" type="x:ST_Xstring" />
<attribute name="embeddedDataId" use="optional" type="x:ST_Xstring" />
</complexType>
<element name="table" type="CT_Table" />
<complexType name="CT_Table">
<attribute name="altText" type="x:ST_Xstring" use="optional" />
<attribute name="altTextSummary" type="x:ST_Xstring" use="optional" />
</complexType>
<complexType name="CT_CfIcon">
<attribute name="iconSet" type="ST_IconSetType" use="required" />
<attribute name="iconId" type="xsd:unsignedInt" use="required" />
</complexType>
<simpleType name="ST_IconSetType">
<restriction base="xsd:string">
<enumeration value="3Arrows" />
<enumeration value="3ArrowsGray" />
<enumeration value="3Flags" />
<enumeration value="3TrafficLights1" />
<enumeration value="3TrafficLights2" />
<enumeration value="3Signs" />
<enumeration value="3Symbols" />
<enumeration value="3Symbols2" />
<enumeration value="4Arrows" />
<enumeration value="4ArrowsGray" />
<enumeration value="4RedToBlack" />
<enumeration value="4Rating" />
<enumeration value="4TrafficLights" />
<enumeration value="5Arrows" />
<enumeration value="5ArrowsGray" />
<enumeration value="5Rating" />
<enumeration value="5Quarters" />
<enumeration value="3Stars" />
<enumeration value="3Triangles" />
<enumeration value="5Boxes" />
<enumeration value="NoIcons" />
</restriction>
</simpleType>
<complexType name="CT_PivotEdits">
<sequence>
<element name="pivotEdit" minOccurs="1" maxOccurs="unbounded" type="CT_PivotEdit" />
</sequence>
</complexType>
<complexType name="CT_PivotEdit">
<sequence>
<element name="userEdit" type="CT_PivotUserEdit" minOccurs="1" maxOccurs="1" />
<element name="tupleItems" type="CT_TupleItems" minOccurs="1" maxOccurs="1" />
<element name="pivotArea" type="x:CT_PivotArea" minOccurs="1" maxOccurs="1" />
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
</complexType>
<complexType name="CT_PivotChanges">
<sequence>
<element name="pivotChange" minOccurs="1" maxOccurs="unbounded" type="CT_PivotChange" />
</sequence>
</complexType>
<complexType name="CT_PivotChange">
<sequence>
<element name="editValue" type="CT_PivotEditValue" minOccurs="1" maxOccurs="1" />
<element name="tupleItems" type="CT_TupleItems" minOccurs="1" maxOccurs="1" />
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="allocationMethod" type="ST_AllocationMethod" default="equalAllocation" />
<attribute name="weightExpression" type="x:ST_Xstring" use="optional" />
</complexType>
<complexType name="CT_PivotUserEdit">
<choice minOccurs="1" maxOccurs="1">
<element ref="xm:f" minOccurs="1" maxOccurs="1" />
<element name="editValue" type="CT_PivotEditValue" minOccurs="1" maxOccurs="1" />
</choice>
</complexType>
<complexType name="CT_PivotEditValue">
<simpleContent>
<extension base="x:ST_Xstring">
<attribute name="valueType" use="required" type="ST_PivotEditValueType" />
</extension>
</simpleContent>
</complexType>
<simpleType name="ST_PivotEditValueType">
<restriction base="xsd:string">
<enumeration value="number" />
<enumeration value="dateTime" />
<enumeration value="string" />
<enumeration value="boolean" />
<enumeration value="error" />
</restriction>
</simpleType>
<complexType name="CT_TupleItems">
<sequence>
<element name="tupleItem" type="x:ST_Xstring" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<simpleType name="ST_AllocationMethod">
<restriction base="xsd:string">
<enumeration value="equalAllocation" />
<enumeration value="equalIncrement" />
<enumeration value="weightedAllocation" />
<enumeration value="weightedIncrement" />
</restriction>
</simpleType>
<complexType name="CT_SlicerStyle">
<sequence>
<element name="slicerStyleElements" type="CT_SlicerStyleElements" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="name" type="xsd:string" use="required" />
</complexType>
<complexType name="CT_SlicerStyleElement">
<attribute name="type" type="ST_SlicerStyleType" use="required" />
<attribute name="dxfId" type="x:ST_DxfId" use="optional" />
</complexType>
<simpleType name="ST_SlicerStyleType">
<restriction base="xsd:string">
<enumeration value="unselectedItemWithData" />
<enumeration value="selectedItemWithData" />
<enumeration value="unselectedItemWithNoData" />
<enumeration value="selectedItemWithNoData" />
<enumeration value="hoveredUnselectedItemWithData" />
<enumeration value="hoveredSelectedItemWithData" />
<enumeration value="hoveredUnselectedItemWithNoData" />
<enumeration value="hoveredSelectedItemWithNoData" />
</restriction>
</simpleType>
<element name="slicerStyles" type="CT_SlicerStyles" />
<element name="dxfs" type="x:CT_Dxfs" />
<complexType name="CT_OleItem">
<sequence>
<element name="values" type="x:CT_DdeValues" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="name" type="x:ST_Xstring" use="required" />
<attribute name="icon" type="xsd:boolean" use="optional" default="false" />
<attribute name="advise" type="xsd:boolean" use="optional" default="false" />
<attribute name="preferPic" type="xsd:boolean" use="optional" default="false" />
</complexType>
<element name="oleItem" type="CT_OleItem" />
<element name="pivotHierarchy" type="CT_PivotHierarchy" />
<complexType name="CT_PivotHierarchy">
<attribute name="ignore" type="xsd:boolean" default="false" use="optional" />
</complexType>
<element name="cacheField" type="CT_CacheField" />
<complexType name="CT_CacheField">
<attribute name="ignore" type="xsd:boolean" default="false" use="optional" />
</complexType>
<complexType name="CT_ConditionalFormats">
<sequence>
<element name="conditionalFormat" minOccurs="1" maxOccurs="unbounded" type="CT_ConditionalFormat" />
</sequence>
<attribute name="count" type="xsd:unsignedInt" use="optional" />
</complexType>
<complexType name="CT_ConditionalFormat">
<sequence>
<element name="pivotAreas" type="x:CT_PivotAreas" minOccurs="0" maxOccurs="1" />
<element name="extLst" minOccurs="0" maxOccurs="1" type="x:CT_ExtensionList" />
</sequence>
<attribute name="scope" type="x:ST_Scope" default="selection" use="optional" />
<attribute name="type" type="x:ST_Type" default="none" use="optional" />
<attribute name="priority" use="optional" type="xsd:unsignedInt" />
<attribute name="id" type="x:ST_Guid" use="required" />
</complexType>
<complexType name="CT_SlicerStyles">
<sequence>
<element name="slicerStyle" type="CT_SlicerStyle" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attribute name="defaultSlicerStyle" type="xsd:string" use="required" />
</complexType>
<complexType name="CT_SlicerStyleElements">
<sequence>
<element name="slicerStyleElement" type="CT_SlicerStyleElement" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<element name="id" type="x:ST_Guid" />
<complexType name="CT_IgnoredErrors">
<sequence>
<element name="ignoredError" type="CT_IgnoredError" minOccurs="0" maxOccurs="unbounded" />
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
</complexType>
<complexType name="CT_IgnoredError">
<sequence>
<element ref="xm:sqref" minOccurs="1" maxOccurs="1" />
</sequence>
<attribute name="evalError" type="xsd:boolean" use="optional" default="false" />
<attribute name="twoDigitTextYear" type="xsd:boolean" use="optional" default="false" />
<attribute name="numberStoredAsText" type="xsd:boolean" use="optional" default="false" />
<attribute name="formula" type="xsd:boolean" use="optional" default="false" />
<attribute name="formulaRange" type="xsd:boolean" use="optional" default="false" />
<attribute name="unlockedFormula" type="xsd:boolean" use="optional" default="false" />
<attribute name="emptyCellReference" type="xsd:boolean" use="optional" default="false" />
<attribute name="listDataValidation" type="xsd:boolean" use="optional" default="false" />
<attribute name="calculatedColumn" type="xsd:boolean" use="optional" default="false" />
</complexType>
<complexType name="CT_ProtectedRanges">
<sequence>
<element name="protectedRange" type="CT_ProtectedRange" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_ProtectedRange">
<sequence maxOccurs="1">
<element ref="xm:sqref" minOccurs="1" maxOccurs="1" />
</sequence>
<attribute name="password" type="x:ST_UnsignedShortHex" use="optional" />
<attribute name="algorithmName" type="x:ST_Xstring" use="optional" />
<attribute name="hashValue" type="xsd:base64Binary" use="optional" />
<attribute name="saltValue" type="xsd:base64Binary" use="optional" />
<attribute name="spinCount" type="xsd:unsignedInt" use="optional" />
<attribute name="name" type="x:ST_Xstring" use="required" />
<attribute name="securityDescriptor" type="xsd:string" use="optional" />
</complexType>
<element name="iconFilter" type="CT_IconFilter" />
<complexType name="CT_IconFilter">
<attribute name="iconSet" type="ST_IconSetType" use="required" />
<attribute name="iconId" type="xsd:unsignedInt" use="required" />
</complexType>
<element name="filter" type="CT_Filter" />
<complexType name="CT_Filter">
<attribute name="val" type="x:ST_Xstring" />
</complexType>
<element name="customFilters" type="CT_CustomFilters" />
<complexType name="CT_CustomFilters">
<sequence>
<element name="customFilter" type="CT_CustomFilter" minOccurs="1" maxOccurs="2" />
</sequence>
<attribute name="and" type="xsd:boolean" use="optional" default="false" />
</complexType>
<complexType name="CT_CustomFilter">
<attribute name="operator" type="x:ST_FilterOperator" default="equal" use="optional" />
<attribute name="val" type="x:ST_Xstring" />
</complexType>
<complexType name="CT_SortCondition">
<attribute name="descending" type="xsd:boolean" use="optional" default="false" />
<attribute name="sortBy" type="x:ST_SortBy" use="optional" default="value" />
<attribute name="ref" type="x:ST_Ref" use="required" />
<attribute name="customList" type="x:ST_Xstring" use="optional" />
<attribute name="dxfId" type="x:ST_DxfId" use="optional" />
<attribute name="iconSet" type="ST_IconSetType" use="optional" default="3Arrows" />
<attribute name="iconId" type="xsd:unsignedInt" use="optional" />
</complexType>
<element name="sortCondition" type="CT_SortCondition" />
<complexType name="CT_CacheSourceExt">
<sequence>
<element ref="sourceConnection" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>
<element name="sourceConnection" type="CT_SourceConnection" />
<complexType name="CT_SourceConnection">
<attribute name="name" type="x:ST_Xstring" use="required" />
</complexType>
<element name="datastoreItem" type="CT_DatastoreItem" />
<complexType name="CT_DatastoreItem">
<sequence>
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="id" type="x:ST_Xstring" use="required" />
</complexType>
<element name="formControlPr" type="CT_FormControlPr" />
<complexType name="CT_ListItem">
<attribute name="val" type="xsd:string" use="required" />
</complexType>
<complexType name="CT_ListItems">
<sequence>
<element name="item" type="CT_ListItem" minOccurs="0" maxOccurs="unbounded" />
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
</complexType>
<complexType name="CT_FormControlPr">
<sequence>
<element name="itemLst" type="CT_ListItems" minOccurs="0" maxOccurs="1" />
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="objectType" type="ST_ObjectType" use="optional" />
<attribute name="checked" type="ST_Checked" use="optional" />
<attribute name="colored" type="xsd:boolean" use="optional" default="false" />
<attribute name="dropLines" type="xsd:unsignedInt" use="optional" default="8" />
<attribute name="dropStyle" type="ST_DropStyle" use="optional" />
<attribute name="dx" type="xsd:unsignedInt" use="optional" default="80" />
<attribute name="firstButton" type="xsd:boolean" use="optional" default="false" />
<attribute name="fmlaGroup" type="x:ST_Formula" use="optional" />
<attribute name="fmlaLink" type="x:ST_Formula" use="optional" />
<attribute name="fmlaRange" type="x:ST_Formula" use="optional" />
<attribute name="fmlaTxbx" type="x:ST_Formula" use="optional" />
<attribute name="horiz" type="xsd:boolean" use="optional" default="false" />
<attribute name="inc" type="xsd:unsignedInt" use="optional" default="1" />
<attribute name="justLastX" type="xsd:boolean" use="optional" default="false" />
<attribute name="lockText" type="xsd:boolean" use="optional" default="false" />
<attribute name="max" type="xsd:unsignedInt" use="optional" />
<attribute name="min" type="xsd:unsignedInt" use="optional" default="0" />
<attribute name="multiSel" type="xsd:string" use="optional" />
<attribute name="noThreeD" type="xsd:boolean" use="optional" default="false" />
<attribute name="noThreeD2" type="xsd:boolean" use="optional" default="false" />
<attribute name="page" type="xsd:unsignedInt" use="optional" />
<attribute name="sel" type="xsd:unsignedInt" use="optional" />
<attribute name="seltype" type="ST_SelType" use="optional" default="single" />
<attribute name="textHAlign" type="ST_TextHAlign" use="optional" default="left" />
<attribute name="textVAlign" type="ST_TextVAlign" use="optional" default="top" />
<attribute name="val" type="xsd:unsignedInt" use="optional" />
<attribute name="widthMin" type="xsd:unsignedInt" use="optional" />
<attribute name="editVal" type="ST_EditValidation" use="optional" />
<attribute name="multiLine" type="xsd:boolean" use="optional" default="false" />
<attribute name="verticalBar" type="xsd:boolean" use="optional" default="false" />
<attribute name="passwordEdit" type="xsd:boolean" use="optional" default="false" />
</complexType>
<simpleType name="ST_ObjectType">
<restriction base="xsd:token">
<enumeration value="Button" />
<enumeration value="CheckBox" />
<enumeration value="Drop" />
<enumeration value="GBox" />
<enumeration value="Label" />
<enumeration value="List" />
<enumeration value="Radio" />
<enumeration value="Scroll" />
<enumeration value="Spin" />
<enumeration value="EditBox" />
<enumeration value="Dialog" />
</restriction>
</simpleType>
<simpleType name="ST_Checked">
<restriction base="xsd:token">
<enumeration value="Unchecked" />
<enumeration value="Checked" />
<enumeration value="Mixed" />
</restriction>
</simpleType>
<simpleType name="ST_DropStyle">
<restriction base="xsd:token">
<enumeration value="combo" />
<enumeration value="comboedit" />
<enumeration value="simple" />
</restriction>
</simpleType>
<simpleType name="ST_SelType">
<restriction base="xsd:token">
<enumeration value="single" />
<enumeration value="multi" />
<enumeration value="extended" />
</restriction>
</simpleType>
<simpleType name="ST_TextHAlign">
<restriction base="xsd:string">
<enumeration value="left" />
<enumeration value="center" />
<enumeration value="right" />
<enumeration value="justify" />
<enumeration value="distributed" />
</restriction>
</simpleType>
<simpleType name="ST_TextVAlign">
<restriction base="xsd:string">
<enumeration value="top" />
<enumeration value="center" />
<enumeration value="bottom" />
<enumeration value="justify" />
<enumeration value="distributed" />
</restriction>
</simpleType>
<simpleType name="ST_EditValidation">
<restriction base="xsd:token">
<enumeration value="text" />
<enumeration value="integer" />
<enumeration value="number" />
<enumeration value="reference" />
<enumeration value="formula" />
</restriction>
</simpleType>
<element name="slicers" type="CT_Slicers" />
<complexType name="CT_Slicers">
<sequence>
<element name="slicer" type="CT_Slicer" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CT_Slicer">
<sequence>
<element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="name" type="x:ST_Xstring" use="required" />
<attribute ref="xr10:uid" use="optional" />
<attribute name="cache" type="x:ST_Xstring" use="required" />
<attribute name="caption" type="x:ST_Xstring" use="optional" />
<attribute name="startItem" type="xsd:unsignedInt" use="optional" default="0" />
<attribute name="columnCount" type="xsd:unsignedInt" use="optional" default="1" />
<attribute name="showCaption" type="xsd:boolean" use="optional" default="true" />
<attribute name="level" type="xsd:unsignedInt" use="optional" default="0" />
<attribute name="style" type="x:ST_Xstring" use="optional" />
<attribute name="lockedPosition" type="xsd:boolean" use="optional" default="false" />
<attribute name="rowHeight" type="xsd:unsignedInt" use="required" />
</complexType>
</schema>

View File

@@ -0,0 +1,394 @@
/**
* 统计一下目前实现函数的数量
*/
import {functions} from '../src/excel/formula/functions/functions';
import {FormulaVisitor} from '../src/excel/formula/eval/FormulaVisitor';
import {
FunctionName,
builtinFunctionSet
} from '../src/excel/formula/builtinFunctions';
import {specialFunctions} from '../src/excel/formula/functions/special';
const mockEnv = {} as any;
const formulaVisitor = new FormulaVisitor(mockEnv);
console.log(`functions count: ${functions.size + specialFunctions.size}`);
const formulsjs = new Set([
'ABS',
'ACCRINT',
'ACOS',
'ACOSH',
'ACOT',
'ACOTH',
'AGGREGATE',
'AND',
'ARABIC',
'ASIN',
'ASINH',
'ATAN',
'ATAN2',
'ATANH',
'AVEDEV',
'AVERAGE',
'AVERAGEA',
'AVERAGEIF',
'AVERAGEIFS',
'BASE',
'BESSELI',
'BESSELJ',
'BESSELK',
'BESSELY',
'BETADIST',
'BETAINV',
'BIN2DEC',
'BIN2HEX',
'BIN2OCT',
'BINOMDIST',
'BITAND',
'BITLSHIFT',
'BITOR',
'BITRSHIFT',
'BITXOR',
'CEILING',
'CEILINGMATH',
'CEILINGPRECISE',
'CHAR',
'CHIDIST',
'CHIDISTRT',
'CHIINV',
'CHIINVRT',
'CHITEST',
'CHOOSE',
'CLEAN',
'CODE',
'COLUMN',
'COLUMNS',
'COMBIN',
'COMBINA',
'COMPLEX',
'CONCAT',
'CONCATENATE',
'CONVERT',
'CORREL',
'COS',
'COSH',
'COT',
'COTH',
'COUNT',
'COUNTA',
'COUNTBLANK',
'COUNTIF',
'COUNTIFS',
'COUPDAYS',
'COVAR',
'COVARIANCEP',
'COVARIANCES',
'CRITBINOM',
'CSC',
'CSCH',
'CUMIPMT',
'CUMPRINC',
'DATE',
'DATEDIF',
'DATEVALUE',
'DAVERAGE',
'DAY',
'DAYS',
'DAYS360',
'DB',
'DCOUNT',
'DCOUNTA',
'DDB',
'DEC2BIN',
'DEC2HEX',
'DEC2OCT',
'DECIMAL',
'DEGREES',
'DELTA',
'DEVSQ',
'DGET',
'DISC',
'DMAX',
'DMIN',
'DOLLAR',
'DOLLARDE',
'DOLLARFR',
'DPRODUCT',
'DSTDEV',
'DSTDEVP',
'DSUM',
'DVAR',
'DVARP',
'EDATE',
'EFFECT',
'EOMONTH',
'ERF',
'ERFC',
'EVEN',
'EXACT',
'EXP',
'EXPONDIST',
'FACT',
'FACTDOUBLE',
'FALSE',
'FDIST',
'FDISTRT',
'FIND',
'FINV',
'FINVRT',
'FISHER',
'FISHERINV',
'FIXED',
'FLOOR',
'FLOORMATH',
'FLOORPRECISE',
'FORECAST',
'FREQUENCY',
'FTEST',
'FV',
'FVSCHEDULE',
'GAMMA',
'GAMMADIST',
'GAMMAINV',
'GAMMALN',
'GAMMALNPRECISE',
'GAUSS',
'GCD',
'GEOMEAN',
'GESTEP',
'GROWTH',
'HARMEAN',
'HEX2BIN',
'HEX2DEC',
'HEX2OCT',
'HLOOKUP',
'HOUR',
'HYPGEOMDIST',
'IF',
'IFERROR',
'IFNA',
'IFS',
'IMABS',
'IMAGINARY',
'IMARGUMENT',
'IMCONJUGATE',
'IMCOS',
'IMCOSH',
'IMCOT',
'IMCSC',
'IMCSCH',
'IMDIV',
'IMEXP',
'IMLN',
'IMLOG10',
'IMLOG2',
'IMPOWER',
'IMPRODUCT',
'IMREAL',
'IMSEC',
'IMSECH',
'IMSIN',
'IMSINH',
'IMSQRT',
'IMSUB',
'IMSUM',
'IMTAN',
'INDEX',
'INT',
'INTERCEPT',
'IPMT',
'IRR',
'ISBLANK',
'ISERR',
'ISERROR',
'ISEVEN',
'ISLOGICAL',
'ISNA',
'ISNONTEXT',
'ISNUMBER',
'ISODD',
'ISOWEEKNUM',
'ISPMT',
'ISTEXT',
'KURT',
'LARGE',
'LCM',
'LEFT',
'LEN',
'LINEST',
'LN',
'LOG',
'LOG10',
'LOGEST',
'LOGINV',
'LOGNORMDIST',
'LOGNORMINV',
'LOOKUP',
'LOWER',
'MATCH',
'MAX',
'MAXA',
'MAXIFS',
'MEDIAN',
'MID',
'MIN',
'MINA',
'MINIFS',
'MINUTE',
'MIRR',
'MMULT',
'MOD',
'MODEMULT',
'MODESNGL',
'MONTH',
'MROUND',
'MULTINOMIAL',
'MUNIT',
'N',
'NA',
'NEGBINOMDIST',
'NETWORKDAYS',
'NETWORKDAYSINTL',
'NOMINAL',
'NORMDIST',
'NORMINV',
'NORMSDIST',
'NORMSINV',
'NOT',
'NOW',
'NPER',
'NPV',
'NUMBERVALUE',
'OCT2BIN',
'OCT2DEC',
'OCT2HEX',
'ODD',
'OR',
'PDURATION',
'PEARSON',
'PERCENTILEEXC',
'PERCENTILEINC',
'PERCENTRANKEXC',
'PERCENTRANKINC',
'PERMUT',
'PERMUTATIONA',
'PHI',
'PI',
'PMT',
'POISSONDIST',
'POWER',
'PPMT',
'PRICEDISC',
'PROB',
'PRODUCT',
'PROPER',
'PV',
'QUARTILEEXC',
'QUARTILEINC',
'QUOTIENT',
'RADIANS',
'RAND',
'RANDBETWEEN',
'RANKAVG',
'RANKEQ',
'RATE',
'REPLACE',
'REPT',
'RIGHT',
'ROMAN',
'ROUND',
'ROUNDDOWN',
'ROUNDUP',
'ROW',
'ROWS',
'RRI',
'RSQ',
'SEARCH',
'SEC',
'SECH',
'SECOND',
'SERIESSUM',
'SIGN',
'SIN',
'SINH',
'SKEW',
'SKEWP',
'SLN',
'SLOPE',
'SMALL',
'SORT',
'SQRT',
'SQRTPI',
'STANDARDIZE',
'STDEVA',
'STDEVP',
'STDEVPA',
'STDEVS',
'STEYX',
'SUBSTITUTE',
'SUBTOTAL',
'SUM',
'SUMIF',
'SUMIFS',
'SUMPRODUCT',
'SUMSQ',
'SUMX2MY2',
'SUMX2PY2',
'SUMXMY2',
'SWITCH',
'SYD',
'T',
'TAN',
'TANH',
'TBILLEQ',
'TBILLPRICE',
'TBILLYIELD',
'TDIST',
'TDISTRT',
'TEXT',
'TEXTJOIN',
'TIME',
'TIMEVALUE',
'TINV',
'TODAY',
'TRANSPOSE',
'TREND',
'TRIM',
'TRIMMEAN',
'TRUE',
'TRUNC',
'TTEST',
'TYPE',
'UNICHAR',
'UNICODE',
'UNIQUE',
'UPPER',
'VALUE',
'VARA',
'VARP',
'VARPA',
'VARS',
'VLOOKUP',
'WEEKDAY',
'WEEKNUM',
'WORKDAY',
'XIRR',
'XNPV',
'XOR',
'YEAR',
'YEARFRAC',
'ZTEST'
]);
for (const key of formulsjs) {
if (
!functions.has(key as FunctionName) &&
!specialFunctions.has(key) &&
builtinFunctionSet.has(key as FunctionName)
) {
console.log(key);
}
}

View File

@@ -0,0 +1,42 @@
/**
* 生成示例文件列表
*/
import {readdir} from 'node:fs/promises';
import {writeFileSync} from 'fs';
import prettier from 'prettier';
async function genFiles(path: string) {
const fileLists: Record<string, string[]> = {};
const dirs = (await readdir(path)).filter(
item => !/(^|\/)\.[^\/\.]/g.test(item)
);
for (const dir of dirs) {
fileLists[dir] = (await readdir(path + '/' + dir)).filter(
item =>
(item.endsWith('.xlsx') ||
item.endsWith('.csv') ||
item.endsWith('.tsv')) &&
!item.startsWith('~')
);
}
return fileLists;
}
function writeFile(fileName: string, content: string) {
prettier.resolveConfig('../../../.prettierrc').then(options => {
const formatted = prettier.format(content, {
...options,
parser: 'typescript'
});
writeFileSync(fileName, formatted);
});
}
(async () => {
const excelFiles = genFiles('__tests__/xlsx/');
writeFile(
'examples/excelFileList.ts',
`export default ${JSON.stringify(await excelFiles, null, 2)};`
);
})();

View File

@@ -0,0 +1,31 @@
/**
* 生成图标定义,不想依赖任何打包工具,所以自己生成
*/
import {readFileSync, writeFileSync, readdirSync} from 'fs';
import prettier from 'prettier';
const iconFiles = readdirSync('design/icons').filter(item =>
item.endsWith('.svg')
);
const iconContents: Record<string, string> = {};
for (const icon of iconFiles) {
const content = readFileSync(`design/icons/${icon}`, 'utf-8');
iconContents[icon.replace(/\.svg$/, '')] = content;
}
const outputFile = `
/** generated by genIcons.ts, do not edit */
export const Icons = ${JSON.stringify(iconContents, null, 2)};
`;
prettier.resolveConfig('../../../.prettierrc').then(options => {
const formatted = prettier.format(outputFile, {
...options,
parser: 'typescript'
});
writeFileSync('src/excel/render/Icons.ts', formatted);
});

View File

@@ -0,0 +1,79 @@
/**
* 生成图标定义,不想依赖任何打包工具,所以自己生成
*/
import {readFileSync, writeFileSync} from 'fs';
import prettier from 'prettier';
const icons = [
'down',
'side',
'up',
'downGray',
'sideGray',
'upGray',
'flagRed',
'flagYellow',
'flagGreen',
'diamondRed',
'triangleYellow',
'circleGreen',
'crossRed',
'exclamationYellow',
'checkGreen',
'crossSymbolRed',
'exclamationSymbolYellow',
'checkSymbolGreen',
'circleRed',
'circleYellow',
'trafficLightRed',
'trafficLightYellow',
'trafficLightGreen',
'downIncline',
'upIncline',
'downInclineGray',
'upInclineGray',
'oneFilledBars',
'twoFilledBars',
'threeFilledBars',
'fourFilledBars',
'circleBlack',
'circleGray',
'circleLightRed',
'circleWhite',
'circleThreeWhiteQuarters',
'circleTwoWhiteQuarters',
'circleOneWhiteQuarter',
'zeroFilledBars'
];
const iconContents: Record<string, string> = {};
for (const icon of icons) {
const content = readFileSync(
`../src/excel/io/excel/preset/icons/${icon}.svg`,
'utf-8'
);
iconContents[icon] =
'data:image/svg+xml;base64,' +
Buffer.from(content, 'utf8').toString('base64');
}
const outputFile = `
/** generated by genPresetIcons.ts, do not edit */
export type IconNames = ${icons.map(icon => `'${icon}'`).join(' | ')};
export const presetIcons: Record<IconNames, string> = ${JSON.stringify(
iconContents,
null,
2
)};
`;
prettier.resolveConfig('../../../.prettierrc').then(options => {
const formatted = prettier.format(outputFile, {
...options,
parser: 'typescript'
});
writeFileSync('../src/excel/io/excel/preset/presetIcons.ts', formatted);
});

View File

@@ -0,0 +1,14 @@
import {readdir} from 'node:fs/promises';
import {resolve} from 'path';
export async function* getFiles(dir: string): AsyncGenerator<string> {
const dirs = await readdir(dir, {withFileTypes: true});
for (const dirent of dirs) {
const res = resolve(dir, dirent.name);
if (dirent.isDirectory()) {
yield* getFiles(res);
} else {
yield res;
}
}
}

View File

@@ -0,0 +1,46 @@
/**
* 优化 xlsx 文件,将 xml 解析为 json
* 实测发现 JSON.parser 更慢,所以这个功能废弃了
*/
import * as fs from 'fs';
import ZipPackageParser from '../src/package/ZipPackageParser';
import {parseSheetData} from '../src/excel/io/excel/worksheet/parseSheetData';
import {parseSharedStrings} from '../src/excel/io/excel/parseSharedStrings';
import {getNodeByTagName, xml2json} from '../src/util/xml';
import {StringItem} from '../src/excel/types/StringItem';
const xlsxFile = process.argv[2];
const zip = new ZipPackageParser();
zip.load(fs.readFileSync(xlsxFile, null));
async function opt() {
let sharedStrings: StringItem[] = [];
const zipFiles = zip.getZip();
for (const file in zipFiles) {
if (file.endsWith('sharedStrings.xml')) {
const xml = zip.getString(file);
sharedStrings = await parseSharedStrings(xml);
zip.saveFile(file + '.json', JSON.stringify(sharedStrings));
}
}
for (const file in zipFiles) {
if (file.search(/worksheets\/sheet\d*.xml/) !== -1) {
const xml = zip.getString(file);
const node = await xml2json(xml);
const sheetDataNode = getNodeByTagName(node, 'sheetData')!;
const sheetData = parseSheetData(sheetDataNode, sharedStrings);
zip.saveFile(file + '.json', JSON.stringify(sheetData));
}
}
const zipContent = zip.generateZip();
fs.writeFileSync(xlsxFile.replace('.xlsx', '.opt.xlsx'), zipContent);
}
opt();

View File

@@ -0,0 +1,31 @@
/**
* 批量测试某个目录下的 xlsx 文件是否渲染报错
*/
import puppeteer, {ElementHandle} from 'puppeteer';
import {getFiles} from './getFiles';
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('http://localhost:5173/examples/excel.html');
const dir = process.argv[2];
const uploadFile = (await page.$(
'#uploadFile'
)!) as ElementHandle<HTMLInputElement>;
for await (const file of getFiles(dir)) {
if (file.endsWith('.xlsx') && !file.includes('~$')) {
uploadFile?.uploadFile(file);
console.log(file);
await page.waitForSelector('.ov-excel-content', {
timeout: 2000
});
}
}
await browser.close();
})();

View File

@@ -0,0 +1,84 @@
import {readFileSync, writeFileSync} from 'fs';
import process from 'node:process';
import {functions} from '../src/excel/formula/functions/functions';
import {FormulaVisitor} from '../src/excel/formula/eval/FormulaVisitor';
import {Parser} from '../src/excel/formula/Parser';
import {tokenize} from '../src/excel/formula/tokenizer';
import {ASTNode} from '../src/excel/formula/ast/ASTNode';
import {
FunctionName,
builtinFunctionSet
} from '../src/excel/formula/builtinFunctions';
import {specialFunctions} from '../src/excel/formula/functions/special';
const mockEnv = {} as any;
const formulaVisitor = new FormulaVisitor(mockEnv);
const file = process.argv[2];
const content = readFileSync(file, 'utf-8').replace(/\r\n/g, '\n');
const usedFunctions = new Map<string, number>();
function addFunctions(ast: ASTNode) {
if (ast.type === 'Function') {
const functionName = ast.token.value.replace(/\($/, '');
if (usedFunctions.has(functionName)) {
usedFunctions.set(functionName, usedFunctions.get(functionName)! + 1);
} else {
usedFunctions.set(functionName, 1);
}
}
for (const child of ast.children) {
if (Array.isArray(child)) {
for (const c of child) {
addFunctions(c);
}
continue;
}
addFunctions(child);
}
}
for (const line of content.split('\n')) {
if (line.trim() === '') {
continue;
}
if (line.startsWith('#')) {
continue;
}
const formula = line.substring(1, line.length - 1).replace(/""/g, '"');
// console.log(formula);
const parser = new Parser(tokenize(formula));
const ast = parser.parse();
addFunctions(ast);
}
console.log(usedFunctions.size);
const notFoundFunctions = new Map<string, number>();
for (const [func, count] of usedFunctions) {
if (
!functions.has(func as FunctionName) &&
builtinFunctionSet.has(func as FunctionName)
) {
notFoundFunctions.set(func, count);
}
}
// 这些函数是在执行时实现的
for (const [func] of specialFunctions) {
notFoundFunctions.delete(func);
}
const mapSort = new Map(
[...notFoundFunctions.entries()].sort((a, b) => b[1] - a[1])
);
console.log(mapSort);

View File

@@ -0,0 +1,619 @@
import * as fs from 'fs';
import {XMLNode, xml2json} from '../src/util/xml';
interface SimpleType {
name: string;
type: 'string' | 'int' | 'double' | 'boolean' | 'enum' | 'union' | string;
isArray?: boolean;
required?: boolean;
enum?: string[];
union?: string[];
defaultValue?: string;
}
interface ComplexType {
name: string;
type: string;
defaultValue?: string;
isArray?: boolean;
required?: boolean;
attributes: Record<string, SimpleType | ComplexType>;
}
export async function parse(filePath: string, types: Type[] = []) {
return xsd2Types(fs.readFileSync(filePath, 'utf-8'), types);
}
export type Type = SimpleType | ComplexType;
function toJavaScriptType(type: string) {
if (
type === 'xsd:string' ||
type === 'xsd:token' ||
type === 'xsd:hexBinary' ||
type === 'xsd:dateTime' ||
type === 'xsd:NCName' ||
type === 'xsd:base64Binary' ||
type === 'ST_UnsignedIntHex' ||
type === 'ST_Sqref' ||
type === 'ST_Percentage' ||
type === 'ST_Formula' ||
type === 's:ST_Xstring' ||
type === 'a:ST_Coordinate'
) {
return 'string';
} else if (
type === 'xsd:integer' ||
type === 'xsd:int' ||
type === 'xsd:unsignedInt' ||
type === 'xsd:unsignedLong' ||
type === 'xsd:unsignedShort' ||
type === 'xsd:long' ||
type === 'xsd:byte' ||
type === 'xsd:unsignedByte' ||
type === 'ST_ColID' ||
type === 'ST_RowID' ||
type === 'ST_TextRotation'
) {
return 'int';
} else if (type === 'xsd:double') {
return 'double';
} else if (type === 'xsd:boolean') {
return 'boolean';
}
return type.replace(/\w:/g, '');
}
function parseElement(
sequenceChild: XMLNode,
attributes: Record<string, SimpleType | ComplexType>
) {
const type = sequenceChild.attrs.type;
const name = sequenceChild.attrs.name;
const maxOccurs = parseInt(sequenceChild.attrs.maxOccurs, 10);
let isArray = true;
if (maxOccurs === 1) {
isArray = false;
}
const defaultValue = sequenceChild.attrs.default;
if (name) {
let javaScriptType = toJavaScriptType(type);
// 这里都是 element,所以一定是 child-string
if (javaScriptType === 'string') {
javaScriptType = 'child-string';
}
if (javaScriptType === 'int') {
javaScriptType = 'child-int';
}
attributes[name] = {
name,
isArray,
defaultValue,
type: javaScriptType
};
} else {
const ref = sequenceChild.attrs.ref;
if (ref === 'r:id') {
attributes['r:id'] = {
name: 'r:id',
type: 'string'
};
} else {
console.error(`error require name`, ref);
}
}
}
function parseTypeChild(
child: XMLNode,
attributes: Record<string, SimpleType | ComplexType>,
groupMap: Map<string, XMLNode>
) {
for (let typeChild of child.children) {
// 这里可能是深层嵌套关系,需要递归处理,但
if (typeChild.tag === 'xsd:sequence' || typeChild.tag === 'xsd:choice') {
for (let sequenceChild of typeChild.children) {
if (
sequenceChild.tag === 'xsd:element' ||
sequenceChild.tag === 'xsd:group'
) {
if (sequenceChild.tag === 'xsd:group') {
const ref = sequenceChild.attrs.ref;
if (ref) {
const group = groupMap.get(ref);
if (group) {
parseTypeChild(group, attributes, groupMap);
} else {
console.error(`找不到 group: ${ref}`);
}
} else {
console.error(`require ref`, sequenceChild);
}
}
parseElement(sequenceChild, attributes);
} else if (sequenceChild.tag === 'xsd:any') {
attributes['__any__'] = {
name: '__any__',
type: 'any'
};
} else if (sequenceChild.tag === 'xsd:choice') {
for (const choiceChild of sequenceChild.children) {
if (choiceChild.tag === 'xsd:element') {
parseElement(choiceChild, attributes);
}
}
}
}
} else if (typeChild.tag === 'xsd:attribute') {
const type = typeChild.attrs.type;
let name = typeChild.attrs.name;
const defaultValue = typeChild.attrs.default;
if (name) {
attributes[name] = {
name,
defaultValue,
type: toJavaScriptType(type)
};
} else {
const ref = typeChild.attrs.ref;
if (ref === 'r:id') {
attributes['r:id'] = {
name: 'r:id',
type: 'string'
};
} else {
console.error(`require name`, ref, typeChild);
}
}
}
}
}
/**
* 解析 xsd 生成 TypeScript 类型定义
* @param xmlString
*/
export async function xsd2Types(xmlString: string, types: Type[] = []) {
const xml = await xml2json(xmlString);
const groupMap = collectGroup(xml);
for (const child of xml.children) {
if (child.tag === 'xsd:complexType') {
const type = child.attrs.name;
const attributes: Record<string, SimpleType | ComplexType> = {};
parseTypeChild(child, attributes, groupMap);
const hasType = types.findIndex(item => item.name === type);
// 有重复定义就以后面的为主,删掉这个
if (hasType !== -1) {
console.log(`有重复定义: ${type}`);
types.splice(hasType, 1);
}
types.push({name: type, type, attributes});
} else if (child.tag === 'xsd:simpleType') {
const name = child.attrs.name;
const simpleTypeChild = child.children[0];
if (simpleTypeChild.tag === 'xsd:restriction') {
const base = simpleTypeChild.attrs.base;
if (base) {
const type = toJavaScriptType(base);
if (type === 'string') {
const enumValues: string[] = [];
for (const enumChild of simpleTypeChild.children) {
if (enumChild.tag === 'xsd:enumeration') {
enumValues.push(enumChild.attrs.value);
}
}
if (enumValues.length === 0) {
types.push({
name,
type
});
} else {
types.push({
name,
type: 'enum',
enum: enumValues
});
}
} else {
types.push({
name,
type
});
}
}
} else if (simpleTypeChild.tag === 'xsd:union') {
const memberTypes = simpleTypeChild.attrs.memberTypes
?.replace(/s:/g, '')
.split(' ')
.map((item: string) => {
return toJavaScriptType(item);
});
types.push({
name,
type: 'union',
union: memberTypes
});
} else if (simpleTypeChild.tag === 'xsd:list') {
const itemType = simpleTypeChild.attrs.itemType;
types.push({
name,
type: toJavaScriptType(itemType),
isArray: true
});
}
}
}
return types;
}
/**
* 搜集 group 列表
*/
function collectGroup(xmlNode: XMLNode) {
const groupMap = new Map<string, XMLNode>();
for (const child of xmlNode.children) {
if (child.tag === 'xsd:group') {
const name = child.attrs.name;
groupMap.set(name, child);
}
}
return groupMap;
}
/**
* 生成简化类型,比如有些最终是字符串或字符串数组,就直接用 string | string[] 表示
* 只支持一层数组,层次多会有问题,但好像没这种场景
*/
function simplifyType(
type: Type,
typeMap: Record<string, Type>
): {
type: string;
isArray?: boolean;
} | null {
const typeName = type.type;
if (
typeName === 'string' ||
typeName === 'number' ||
typeName === 'int' ||
typeName === 'double'
) {
if (type.isArray) {
return {
type: typeName,
isArray: true
};
} else {
return {
type: typeName
};
}
}
if (typeName.startsWith('ST')) {
if (typeName in typeMap) {
const parentType = simplifyType(typeMap[typeName], typeMap);
if (parentType) {
if (type.isArray) {
return {
...parentType,
isArray: true
};
} else {
return parentType;
}
}
}
}
return null;
}
// 这些类型不需要生成,由外部提供定义
const IGNORE_TYPES = new Set([
'CT_ExtensionList',
'EG_ExtensionList',
'CT_Extension'
]);
// 目前这些定义有死循环,导致用不了
const ANY_TYPES = new Set([
'CT_Div',
'CT_Divs',
'CT_EffectStyleItem',
'CT_EffectList',
'CT_FillOverlayEffect',
'CT_GvmlGroupShape',
'CT_GroupShape'
]);
function generateAnyType(typeName: string) {
const result: string[] = [];
result.push(`export type ${typeName} = any;`);
result.push(`export const ${typeName}_Attributes: Attributes = {};`);
return result.join('\n');
}
/**
* 生成某个类型的代码
* @param type 类型定义
* @param typeIsGenerated 已经生成过的类型
* @param typeMap 类型映射,用于查找依赖的类型
* @param generateAttributes 是否生成用于解析的属性定义
*/
function generateType(
type: Type,
typeIsGenerated: Record<string, boolean>,
typeMap: Record<string, Type>,
generateAttributes = true
) {
if (type.name in typeIsGenerated || IGNORE_TYPES.has(type.name)) {
return '';
}
if (ANY_TYPES.has(type.name)) {
typeIsGenerated[type.name] = true;
return generateAnyType(type.name);
}
typeIsGenerated[type.name] = true;
// 说明是复杂类型
if ('attributes' in type) {
const attributes = type.attributes;
const result: string[] = [];
result.push(`export interface ${type.name} {`);
for (let key in attributes) {
const attribute = attributes[key] as Type;
let outputType = attribute.type;
let simpleType = simplifyType(attribute, typeMap);
if (simpleType) {
let javascriptType = simpleType.type;
if (javascriptType === 'int' || javascriptType === 'double') {
javascriptType = 'number';
}
if (simpleType.isArray) {
outputType = `${javascriptType}[]`;
} else {
outputType = javascriptType;
}
}
if (outputType === 'int' || outputType === 'double') {
outputType = 'number';
}
if (outputType === 'child-string') {
outputType = 'string';
}
if (outputType === 'child-int') {
outputType = 'number';
}
let optional = '?';
if (attribute.required) {
optional = '';
}
if (key.includes(':')) {
key = `'${key}'`;
}
// simpleType 已经处理过数组了
if (attribute.isArray && !simpleType) {
result.push(` ${key}${optional}: ${outputType}[];`);
} else {
result.push(` ${key}${optional}: ${outputType};`);
}
}
result.push('};');
// 生成用于解析的属性定义
if (generateAttributes) {
result.push(`\nexport const ${type.type}_Attributes: Attributes = {`);
for (let key in attributes) {
const attribute = attributes[key] as Type;
let outputType = attribute.type;
// 这两个定义循环了,所以目前无法支持
if (outputType === 'CT_Divs' || outputType === 'CT_Div') {
continue;
}
if (key.includes(':')) {
key = `'${key}'`;
}
let simpleType = simplifyType(attribute, typeMap);
if (simpleType) {
if (simpleType.isArray) {
result.push(` ${key}: {`);
result.push(` type: '${simpleType.type}',`);
result.push(` childIsArray: true`);
result.push(' },');
} else {
result.push(` ${key}: {`);
result.push(` type: '${simpleType.type}',`);
if (attribute.defaultValue) {
result.push(` defaultValue: '${attribute.defaultValue}'`);
}
result.push(' },');
}
} else {
let childAttributes = '';
if (outputType.startsWith('CT_')) {
childAttributes = `\n childAttributes: ${outputType}_Attributes,`;
}
if (childAttributes !== '') {
outputType = `child`;
}
// 这种情况一般是 union
if (outputType.startsWith('ST_')) {
outputType = 'string';
}
if (attribute.isArray) {
result.push(` ${key}: {`);
result.push(` type: '${outputType}',${childAttributes}`);
result.push(` childIsArray: true`);
result.push(' },');
} else {
result.push(` ${key}: {`);
result.push(` type: '${outputType}',${childAttributes}`);
if (attribute.defaultValue) {
result.push(`defaultValue: '${attribute.defaultValue}'`);
}
result.push(' },');
}
}
}
result.push('};');
}
return result.join('\n');
} else {
if (type.type === 'enum') {
return `export type ${type.name} = ${type.enum
?.map(item => `'${item}'`)
.join(' | ')};`;
} else if (type.type === 'union') {
return `export type ${type.name} = ${type.union
?.map(item => {
if (item === 'int' || item === 'double') {
return 'number';
}
return item;
})
.join(' | ')};`;
} else {
let outputType = type.type;
if (type.type === 'int' || type.type === 'double') {
outputType = 'number';
}
if (type.isArray) {
return `export type ${type.name} = ${outputType}[];`;
} else {
return `export type ${type.name} = ${outputType};`;
}
}
}
}
function generateCode(
type: Type,
typeIsGenerated: Record<string, boolean>,
typeMap: Record<string, Type>,
generateAttributes = true
) {
const result: string[] = [];
// 先生成依赖的类型
if ('attributes' in type) {
for (const key in type.attributes) {
const attribute = type.attributes[key];
const typeName = attribute.type;
// 这个定义循环了
if (ANY_TYPES.has(type.name) && !(type.name in typeIsGenerated)) {
typeIsGenerated[type.name] = true;
result.push(generateAnyType(type.name));
}
if (
(typeName.startsWith('CT_') || typeName.startsWith('ST_')) &&
!typeIsGenerated[typeName]
) {
if (!typeMap[typeName]) {
console.error(`找不到类型定义:${typeName}`);
}
// 递归生成
result.push(
...generateCode(
typeMap[typeName],
typeIsGenerated,
typeMap,
generateAttributes
)
);
}
}
}
result.push(generateType(type, typeIsGenerated, typeMap, generateAttributes));
return result;
}
/**
* 将 union 为一的情况换成最初的值,简化生成的类型
* @param types
*/
export function simplifyUnionOne(types: Type[]) {
const typeNameMap: Record<string, Type> = {};
for (const type of types) {
typeNameMap[type.name] = type;
}
let oneUnionTypes = findOneUnionType(types);
while (oneUnionTypes.length > 0) {
for (const singleUnionType of oneUnionTypes) {
const unionType = typeNameMap[singleUnionType.unionTypeName];
// 将这个类型设置为 union 的类型
const originName = singleUnionType.type.name;
if (!unionType) {
// 找不到类型定义说明是基础类型
singleUnionType.type.type = singleUnionType.unionTypeName;
} else {
singleUnionType.type.type = unionType.type;
}
if ('union' in singleUnionType.type) {
delete singleUnionType.type.union;
}
}
oneUnionTypes = findOneUnionType(types);
console.log(oneUnionTypes);
}
}
type SingleUnionType = {
type: Type;
unionTypeName: string;
};
function findOneUnionType(types: Type[]) {
const result: SingleUnionType[] = [];
for (const type of types) {
if ('union' in type && type.type === 'union') {
const union = type.union || [];
if (union.length === 1) {
const unionParentType = union[0];
// 如果不是自己,就需要替换
if (unionParentType !== type.name) {
result.push({
type,
unionTypeName: unionParentType
});
}
}
}
}
return result;
}
export function generateCodes(types: Type[], generateAttributes = true) {
// 如果已经生成过就跳过
const typeIsGenerated: Record<string, boolean> = {};
// 类型映射,这个主要是生成的时候先生成依赖的类型
const typeMap: Record<string, Type> = {};
for (const type of types) {
typeMap[type.name] = type;
}
const result: string[] = [
"import {Attributes} from './Attributes';\n",
"import {CT_ExtensionList, CT_ExtensionList_Attributes} from './../excel/types/CT_ExtensionList';\n\n"
];
for (const type of types) {
result.push(
...generateCode(type, typeIsGenerated, typeMap, generateAttributes)
);
}
return result.join('\n\n');
}

View File

@@ -0,0 +1,30 @@
/**
* 自动生成类型定义及解析所需数据
*/
import * as fs from 'fs';
import {Type, simplifyUnionOne, generateCodes, parse} from './xsd2Types';
async function main() {
const types: Type[] = [];
await parse(
'./OfficeOpenXML-XMLSchema-Strict/shared-commonSimpleTypes.xsd',
types
);
// word 的类型和 excel 的类型有冲突,所以只能先支持 excel
// 另外就是 CT_FontScheme 有冲突
await parse('./OfficeOpenXML-XMLSchema-Strict/dml-main.xsd', types);
await parse('./OfficeOpenXML-XMLSchema-Strict/dml-chartDrawing.xsd', types);
await parse('./OfficeOpenXML-XMLSchema-Strict/dml-chartDrawing.xsd', types);
await parse('./OfficeOpenXML-XMLSchema-Strict/dml-chart.xsd', types);
simplifyUnionOne(types);
fs.writeFileSync('../src/openxml/ChartTypes.ts', generateCodes(types));
}
try {
main();
} catch (error) {
console.error(error);
}

View File

@@ -0,0 +1,26 @@
/**
* 自动生成类型定义及解析所需数据
*/
import * as fs from 'fs';
import {Type, simplifyUnionOne, generateCodes, parse} from './xsd2Types';
async function main() {
const types: Type[] = [];
await parse(
'./OfficeOpenXML-XMLSchema-Strict/shared-commonSimpleTypes.xsd',
types
);
// 进包含 dml 的类型
await parse('./OfficeOpenXML-XMLSchema-Strict/dml-main.xsd', types);
simplifyUnionOne(types);
fs.writeFileSync('../src/openxml/DMLTypes.ts', generateCodes(types));
}
try {
main();
} catch (error) {
console.error(error);
}

View File

@@ -0,0 +1,32 @@
/**
* 自动生成类型定义及解析所需数据
*/
import * as fs from 'fs';
import {Type, simplifyUnionOne, generateCodes, parse} from './xsd2Types';
async function main() {
const types: Type[] = [];
await parse(
'./OfficeOpenXML-XMLSchema-Strict/shared-commonSimpleTypes.xsd',
types
);
// word 的类型和 excel 的类型有冲突,所以只能先支持 excel
// 另外就是 CT_FontScheme 有冲突
await parse('./OfficeOpenXML-XMLSchema-Strict/dml-main.xsd', types);
await parse(
'./OfficeOpenXML-XMLSchema-Strict/dml-spreadsheetDrawing.xsd',
types
);
await parse('./OfficeOpenXML-XMLSchema-Strict/sml.xsd', types);
simplifyUnionOne(types);
fs.writeFileSync('../src/openxml/ExcelTypes.ts', generateCodes(types));
}
try {
main();
} catch (error) {
console.error(error);
}

View File

@@ -0,0 +1,19 @@
/**
* 自动生成类型定义及解析所需数据
*/
import * as fs from 'fs';
import {Type, simplifyUnionOne, generateCodes, parse} from './xsd2Types';
async function main() {
// 问题比较多所有先不支持
const types: Type[] = [];
await parse('./ext/spreadsheetml-2009-9-main.xsd', types);
fs.writeFileSync('../src/openxml/ExcelExtTypes.ts', generateCodes(types));
}
try {
main();
} catch (error) {
console.error(error);
}

View File

@@ -0,0 +1,31 @@
/**
* 自动生成类型定义及解析所需数据
*/
import * as fs from 'fs';
import {Type, generateCodes, parse, simplifyUnionOne} from './xsd2Types';
async function main() {
const types: Type[] = [];
await parse(
'./OfficeOpenXML-XMLSchema-Strict/shared-commonSimpleTypes.xsd',
types
);
// word 的类型和 excel 的类型有冲突
await parse('./OfficeOpenXML-XMLSchema-Strict/dml-main.xsd', types);
await parse('./OfficeOpenXML-XMLSchema-Strict/wml.xsd', types);
types.push(
...(await parse(
'./OfficeOpenXML-XMLSchema-Strict/dml-wordprocessingDrawing.xsd'
))
);
simplifyUnionOne(types);
fs.writeFileSync('../src/openxml/Types.ts', generateCodes(types, false));
}
try {
main();
} catch (error) {
console.error(error);
}