maxGraph/docs/stencils.xsd

258 lines
10 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="shapes">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="shape"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="shape">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="connections"/>
<xs:element minOccurs="0" name="background" type="InstructionListType"/>
<xs:element minOccurs="0" name="foreground" type="InstructionListType"/>
</xs:sequence>
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="w" use="optional" type="xs:decimal" default="100"/>
<xs:attribute name="h" use="optional" type="xs:decimal" default="100"/>
<xs:attribute name="aspect" use="optional" default="variable">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="variable"/>
<xs:enumeration value="fixed"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="strokewidth" use="optional" type="xs:string" default="1"/>
</xs:complexType>
</xs:element>
<xs:element name="connections">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="constraint"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="constraint">
<xs:complexType>
<xs:attribute name="perimeter" use="required" type="xs:integer"/>
<xs:attribute name="x" use="required" type="xs:decimal"/>
<xs:attribute name="y" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:complexType name="InstructionListType">
<xs:choice maxOccurs="unbounded">
<xs:element name="save"/>
<xs:element name="restore"/>
<xs:element name="path" type="PathType"/>
<xs:element ref="rect"/>
<xs:element ref="roundrect"/>
<xs:element ref="ellipse"/>
<xs:element ref="text"/>
<xs:element ref="image"/>
<xs:element ref="include-shape"/>
<xs:element name="fill"/>
<xs:element name="stroke"/>
<xs:element name="fillstroke"/>
<xs:element name="strokecolor" type="ColorType"/>
<xs:element name="fillcolor" type="ColorType"/>
<xs:element name="fontcolor" type="ColorType"/>
<xs:element ref="alpha"/>
<xs:element ref="strokewidth"/>
<xs:element ref="dashed"/>
<xs:element ref="dashpattern"/>
<xs:element ref="miterlimit"/>
<xs:element ref="linejoin"/>
<xs:element ref="linecap"/>
<xs:element ref="fontsize"/>
<xs:element ref="fontstyle"/>
<xs:element ref="fontfamily"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="ColorType">
<xs:attribute name="color" use="required" type="xs:string"/>
</xs:complexType>
<xs:complexType name="PathType">
<xs:choice maxOccurs="unbounded">
<xs:element ref="move"/>
<xs:element ref="line"/>
<xs:element ref="quad"/>
<xs:element ref="curve"/>
<xs:element ref="arc"/>
<xs:element name="close"/>
</xs:choice>
<xs:attribute ref="crisp" use="optional"/>
</xs:complexType>
<xs:element name="move">
<xs:complexType>
<xs:attribute name="x" use="required" type="xs:decimal"/>
<xs:attribute name="y" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="line">
<xs:complexType>
<xs:attribute name="x" use="required" type="xs:decimal"/>
<xs:attribute name="y" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="quad">
<xs:complexType>
<xs:attribute name="x1" use="required" type="xs:decimal"/>
<xs:attribute name="y1" use="required" type="xs:decimal"/>
<xs:attribute name="x2" use="required" type="xs:decimal"/>
<xs:attribute name="y2" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="curve">
<xs:complexType>
<xs:attribute name="x1" use="required" type="xs:decimal"/>
<xs:attribute name="y1" use="required" type="xs:decimal"/>
<xs:attribute name="x2" use="required" type="xs:decimal"/>
<xs:attribute name="y2" use="required" type="xs:decimal"/>
<xs:attribute name="x3" use="required" type="xs:decimal"/>
<xs:attribute name="y3" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="arc">
<xs:complexType>
<xs:attribute name="rx" use="required" type="xs:decimal"/>
<xs:attribute name="ry" use="required" type="xs:decimal"/>
<xs:attribute name="x-axis-rotation" use="required" type="xs:decimal"/>
<xs:attribute name="large-arc-flag" use="required" type="xs:decimal"/>
<xs:attribute name="sweep-flag" use="required" type="xs:decimal"/>
<xs:attribute name="x" use="required" type="xs:decimal"/>
<xs:attribute name="y" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="rect">
<xs:complexType>
<xs:attribute ref="crisp" use="optional"/>
<xs:attribute name="x" use="required" type="xs:decimal"/>
<xs:attribute name="y" use="required" type="xs:decimal"/>
<xs:attribute name="w" use="required" type="xs:decimal"/>
<xs:attribute name="h" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="roundrect">
<xs:complexType>
<xs:attribute ref="crisp" use="optional"/>
<xs:attribute name="x" use="required" type="xs:decimal"/>
<xs:attribute name="y" use="required" type="xs:decimal"/>
<xs:attribute name="w" use="required" type="xs:decimal"/>
<xs:attribute name="h" use="required" type="xs:decimal"/>
<xs:attribute name="arcsize" use="optional" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="ellipse">
<xs:complexType>
<xs:attribute name="x" use="required" type="xs:decimal"/>
<xs:attribute name="y" use="required" type="xs:decimal"/>
<xs:attribute name="w" use="required" type="xs:decimal"/>
<xs:attribute name="h" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="text">
<xs:complexType>
<xs:attribute name="str" use="required" type="xs:string"/>
<xs:attribute name="x" use="required" type="xs:decimal"/>
<xs:attribute name="y" use="required" type="xs:decimal"/>
<xs:attribute name="align" use="optional" type="xs:string" default="left"/>
<xs:attribute name="valign" use="optional" type="xs:string" default="top"/>
</xs:complexType>
</xs:element>
<xs:element name="image">
<xs:complexType>
<xs:attribute name="src" use="required" type="xs:string"/>
<xs:attribute name="x" use="required" type="xs:decimal"/>
<xs:attribute name="y" use="required" type="xs:decimal"/>
<xs:attribute name="w" use="required" type="xs:decimal"/>
<xs:attribute name="h" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="include-shape">
<xs:complexType>
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="x" use="required" type="xs:decimal"/>
<xs:attribute name="y" use="required" type="xs:decimal"/>
<xs:attribute name="w" use="required" type="xs:decimal"/>
<xs:attribute name="h" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="alpha">
<xs:complexType>
<xs:attribute name="alpha" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="strokewidth">
<xs:complexType>
<xs:attribute name="width" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="dashed">
<xs:complexType>
<xs:attribute name="dashed" use="required" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:element name="dashpattern">
<xs:complexType>
<xs:attribute name="pattern" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="miterlimit">
<xs:complexType>
<xs:attribute name="limit" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="linejoin">
<xs:complexType>
<xs:attribute name="join" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="miter"/>
<xs:enumeration value="round"/>
<xs:enumeration value="bevel"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="linecap">
<xs:complexType>
<xs:attribute name="cap" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="flat"/>
<xs:enumeration value="square"/>
<xs:enumeration value="round"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="fontsize">
<xs:complexType>
<xs:attribute name="size" use="required" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="fontstyle">
<xs:complexType>
<xs:attribute name="style" use="required" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:element name="fontfamily">
<xs:complexType>
<xs:attribute name="family" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:attribute name="crisp">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:schema>