<?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * Electric(tm) VLSI Design System
 *
 * File: Technology.xsd
 * technology scheme
 *
 * Copyright (c) 2008, Static Free Software. All rights reserved.
 *
 * Electric(tm) is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * Electric(tm) is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
-->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://electric.sun.com/Technology"
            xmlns:tns="http://electric.sun.com/Technology"
            elementFormDefault="qualified">

    <xsd:simpleType name="ColorComponent">
        <xsd:restriction base="xsd:unsignedByte"/>
    </xsd:simpleType>

    <xsd:group name="Color">
        <xsd:sequence>
            <xsd:element name="r" type="tns:ColorComponent"></xsd:element>
            <xsd:element name="g" type="tns:ColorComponent"></xsd:element>
            <xsd:element name="b" type="tns:ColorComponent"></xsd:element>
        </xsd:sequence>
    </xsd:group>

    <xsd:group name="Distance">
        <xsd:sequence>
            <xsd:choice maxOccurs="unbounded" minOccurs="0">
                <xsd:element name="lambda" type="xsd:double"></xsd:element>
            </xsd:choice>
        </xsd:sequence>
    </xsd:group>

    <xsd:group name="PrimitiveNodeImpl">
        <xsd:sequence>
            <xsd:element name="diskOffset" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                    <xsd:attribute name="untilVersion" type="tns:TechVersion" use="required"/>
                    <xsd:attribute name="x" type="xsd:double" use="required"/>
                    <xsd:attribute name="y" type="xsd:double" use="required"/>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="defaultWidth" minOccurs="0">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:group ref="tns:Distance"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="defaultHeight" minOccurs="0">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:group ref="tns:Distance"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:choice>
                <xsd:element name="nodeBase">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="box">
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:element name="lambdaBox">
                                            <xsd:complexType>
                                                <xsd:attribute name="klx" type="xsd:double" use="required"/>
                                                <xsd:attribute name="khx" type="xsd:double" use="required"/>
                                                <xsd:attribute name="kly" type="xsd:double" use="required"/>
                                                <xsd:attribute name="khy" type="xsd:double" use="required"/>
                                            </xsd:complexType>
                                        </xsd:element>
                                    </xsd:sequence>
                                </xsd:complexType>
                            </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="sizeOffset" minOccurs="0">
                    <xsd:complexType>
                        <xsd:attribute name="lx" type="xsd:double" use="required"/>
                        <xsd:attribute name="hx" type="xsd:double" use="required"/>
                        <xsd:attribute name="ly" type="xsd:double" use="required"/>
                        <xsd:attribute name="hy" type="xsd:double" use="required"/>
                    </xsd:complexType>
                </xsd:element>
            </xsd:choice>

            <xsd:element name="protection" minOccurs="0">
                <xsd:complexType>
                    <xsd:attribute name="location" type="tns:ProtectionType" use="required"/>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="nodeLayer" maxOccurs="unbounded">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="inNodes" minOccurs="0">
                            <xsd:complexType>
                                <xsd:sequence>
                                    <xsd:element name="primitiveNode" minOccurs="0" maxOccurs="unbounded">
                                        <xsd:complexType>
                                            <xsd:attribute name="name" type="tns:PrimitiveNodeName" use="required"/>
                                        </xsd:complexType>
                                    </xsd:element>
                                </xsd:sequence>
                            </xsd:complexType>
                        </xsd:element>
                        <xsd:choice>
                            <xsd:element name="box">
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:element name="lambdaBox" minOccurs="0">
                                            <xsd:complexType>
                                                <xsd:attribute name="klx" type="xsd:double" use="required"/>
                                                <xsd:attribute name="khx" type="xsd:double" use="required"/>
                                                <xsd:attribute name="kly" type="xsd:double" use="required"/>
                                                <xsd:attribute name="khy" type="xsd:double" use="required"/>
                                            </xsd:complexType>
                                        </xsd:element>
                                    </xsd:sequence>
                                    <xsd:attribute name="klx" type="xsd:double"/>
                                    <xsd:attribute name="khx" type="xsd:double"/>
                                    <xsd:attribute name="kly" type="xsd:double"/>
                                    <xsd:attribute name="khy" type="xsd:double"/>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="points">
                                <xsd:complexType></xsd:complexType>
                            </xsd:element>
                            <xsd:element name="multicutbox">
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:element name="lambdaBox" minOccurs="0">
                                            <xsd:complexType>
                                                <xsd:attribute name="klx" type="xsd:double" use="required"/>
                                                <xsd:attribute name="khx" type="xsd:double" use="required"/>
                                                <xsd:attribute name="kly" type="xsd:double" use="required"/>
                                                <xsd:attribute name="khy" type="xsd:double" use="required"/>
                                            </xsd:complexType>
                                        </xsd:element>
                                    </xsd:sequence>
                                    <xsd:attribute name="klx" type="xsd:double"/>
                                    <xsd:attribute name="khx" type="xsd:double"/>
                                    <xsd:attribute name="kly" type="xsd:double"/>
                                    <xsd:attribute name="khy" type="xsd:double"/>
                                    <xsd:attribute name="sizex" type="tns:PositiveDouble" use="required"/>
                                    <xsd:attribute name="sizey" type="tns:PositiveDouble" use="required"/>
                                    <xsd:attribute name="sep1d" type="tns:PositiveDouble" use="required"/>
                                    <xsd:attribute name="sep2d" type="tns:PositiveDouble" use="required"/>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="serpbox">
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:element name="lambdaBox" minOccurs="0">
                                            <xsd:complexType>
                                                <xsd:attribute name="klx" type="xsd:double" use="required"/>
                                                <xsd:attribute name="khx" type="xsd:double" use="required"/>
                                                <xsd:attribute name="kly" type="xsd:double" use="required"/>
                                                <xsd:attribute name="khy" type="xsd:double" use="required"/>
                                            </xsd:complexType>
                                        </xsd:element>
                                    </xsd:sequence>
                                    <xsd:attribute name="klx" type="xsd:double"/>
                                    <xsd:attribute name="khx" type="xsd:double"/>
                                    <xsd:attribute name="kly" type="xsd:double"/>
                                    <xsd:attribute name="khy" type="xsd:double"/>
                                    <xsd:attribute name="lWidth" type="xsd:double" use="required"/>
                                    <xsd:attribute name="rWidth" type="xsd:double" use="required"/>
                                    <xsd:attribute name="tExtent" type="xsd:double" use="required"/>
                                    <xsd:attribute name="bExtent" type="xsd:double" use="required"/>
                                </xsd:complexType>
                            </xsd:element>
                        </xsd:choice>
                        <xsd:element name="techPoint" minOccurs="0" maxOccurs="unbounded" type="tns:TechPoint"></xsd:element>
                    </xsd:sequence>
                    <xsd:attribute name="layer" type="tns:LayerName" use="required"/>
                    <xsd:attribute name="style" type="tns:NodeLayerStyle" use="required"/>
                    <xsd:attribute name="portNum" type="xsd:integer"/>
                    <xsd:attribute name="electrical" type="xsd:boolean"/>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="primitivePort" minOccurs="1" maxOccurs="unbounded">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="portAngle">
                            <xsd:complexType>
                                <xsd:attribute name="primary" type="xsd:int" use="required"/>
                                <xsd:attribute name="range" type="xsd:int" use="required"/>
                            </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="portTopology" type="xsd:integer"></xsd:element>
                        <xsd:element name="box">
                            <xsd:complexType>
                                <xsd:sequence>
                                    <xsd:element name="lambdaBox" minOccurs="0">
                                        <xsd:complexType>
                                            <xsd:attribute name="klx" type="xsd:double" use="required"/>
                                            <xsd:attribute name="khx" type="xsd:double" use="required"/>
                                            <xsd:attribute name="kly" type="xsd:double" use="required"/>
                                            <xsd:attribute name="khy" type="xsd:double" use="required"/>
                                        </xsd:complexType>
                                    </xsd:element>
                                </xsd:sequence>
                                <xsd:attribute name="klx" type="xsd:double"/>
                                <xsd:attribute name="khx" type="xsd:double"/>
                                <xsd:attribute name="kly" type="xsd:double"/>
                                <xsd:attribute name="khy" type="xsd:double"/>
                            </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="portArc" type="tns:ArcProtoName" minOccurs="0" maxOccurs="unbounded"></xsd:element>
                    </xsd:sequence>
                    <xsd:attribute name="name" type="xsd:NCName" use="required"/>
                </xsd:complexType>
            </xsd:element>
            <xsd:choice minOccurs="0">
                <xsd:element name="serpTrans">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="specialValue" type="xsd:double" maxOccurs="6" minOccurs="6"></xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="polygonal"></xsd:element>
            </xsd:choice>
            <xsd:element name="minSizeRule" minOccurs="0">
                <xsd:complexType>
                    <xsd:attribute name="width" type="xsd:double" use="required"/>
                    <xsd:attribute name="height" type="xsd:double" use="required"/>
                    <xsd:attribute name="rule" type="xsd:string" use="required"/>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="spiceTemplate" minOccurs="0">
                <xsd:complexType>
                    <xsd:attribute name="value" type="xsd:string" use="required"/>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:group>

    <xsd:group name="MenuItem">
        <xsd:sequence>
            <xsd:choice>
                <xsd:element name="menuArc" type="tns:ArcProtoName"></xsd:element>
                <xsd:element name="menuNode" type="tns:PrimitiveNodeName"></xsd:element>
                <xsd:element name="menuText" type="xsd:string"></xsd:element>
                <xsd:element name="menuNodeInst">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="menuNodeText" minOccurs="0">
                                <xsd:complexType>
                                    <xsd:attribute name="text" type="xsd:string" use="required"/>
                                    <xsd:attribute name="size" type="xsd:double" use="optional"/>
                                </xsd:complexType>
                            </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute name="protoName" type="tns:PrimitiveNodeName" use="required"/>
                        <xsd:attribute name="function" type="tns:PrimitiveNodeFun" use="required"/>
                        <xsd:attribute name="techBits" type="xsd:integer"/>
                        <xsd:attribute name="rotation" type="xsd:integer"/>
                        <xsd:attribute name="partialCircle" type="xsd:integer"/>
                    </xsd:complexType>
                </xsd:element>
            </xsd:choice>
        </xsd:sequence>
    </xsd:group>

   <xsd:simpleType name="PositiveDouble">
        <xsd:restriction base="xsd:double">
            <xsd:minExclusive value="0"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="ColorRGB">
        <xsd:attribute name="r" type="tns:ColorComponent" use="required"/>
        <xsd:attribute name="g" type="tns:ColorComponent" use="required"/>
        <xsd:attribute name="b" type="tns:ColorComponent" use="required"/>
    </xsd:complexType>

    <xsd:simpleType name="ClassName">
        <xsd:restriction base="xsd:NCName"/>
    </xsd:simpleType>

    <xsd:simpleType name="TechVersion">
        <xsd:restriction base="xsd:int"/>
    </xsd:simpleType>

    <xsd:simpleType name="ElectricVersion">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>

    <xsd:simpleType name="NumMetals">
        <xsd:restriction base="xsd:int">
            <xsd:minInclusive value="0"/>
            <xsd:maxInclusive value="14"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="Foundry">
        <xsd:restriction base="xsd:string">
            <!--
            <xsd:enumeration value="NONE"/>
            <xsd:enumeration value="MOSIS"/>
            <xsd:enumeration value="TSMC"/>
            <xsd:enumeration value="ST"/> -->
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="TransparentLayer">
        <xsd:restriction base="xsd:positiveInteger">
            <xsd:maxInclusive value="13"/>
            <xsd:whiteSpace value="collapse"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="LayerName">
        <xsd:restriction base="xsd:NCName"/>
    </xsd:simpleType>

    <xsd:simpleType name="ProtectionType">
       <xsd:restriction base="xsd:string">
           <xsd:enumeration value="both"/>
           <xsd:enumeration value="left"/>
           <xsd:enumeration value="right"/>
           <xsd:enumeration value="none"/>
       </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="LayerFun">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="UNKNOWN"/>
            <xsd:enumeration value="METAL1"/>  <xsd:enumeration value="METAL1C1"/>  <xsd:enumeration value="METAL1C2"/>  <xsd:enumeration value="METAL1C3"/>
            <xsd:enumeration value="METAL2"/>  <xsd:enumeration value="METAL2C1"/>  <xsd:enumeration value="METAL2C2"/>  <xsd:enumeration value="METAL2C3"/>
            <xsd:enumeration value="METAL3"/>  <xsd:enumeration value="METAL3C1"/>  <xsd:enumeration value="METAL3C2"/>  <xsd:enumeration value="METAL3C3"/>
            <xsd:enumeration value="METAL4"/>  <xsd:enumeration value="METAL4C1"/>  <xsd:enumeration value="METAL4C2"/>  <xsd:enumeration value="METAL4C3"/>
            <xsd:enumeration value="METAL5"/>  <xsd:enumeration value="METAL5C1"/>  <xsd:enumeration value="METAL5C2"/>  <xsd:enumeration value="METAL5C3"/>
            <xsd:enumeration value="METAL6"/>  <xsd:enumeration value="METAL6C1"/>  <xsd:enumeration value="METAL6C2"/>  <xsd:enumeration value="METAL6C3"/>
            <xsd:enumeration value="METAL7"/>  <xsd:enumeration value="METAL7C1"/>  <xsd:enumeration value="METAL7C2"/>  <xsd:enumeration value="METAL7C3"/>
            <xsd:enumeration value="METAL8"/>  <xsd:enumeration value="METAL8C1"/>  <xsd:enumeration value="METAL8C2"/>  <xsd:enumeration value="METAL8C3"/>
            <xsd:enumeration value="METAL9"/>  <xsd:enumeration value="METAL9C1"/>  <xsd:enumeration value="METAL9C2"/>  <xsd:enumeration value="METAL9C3"/>
            <xsd:enumeration value="METAL10"/> <xsd:enumeration value="METAL10C1"/> <xsd:enumeration value="METAL10C2"/> <xsd:enumeration value="METAL10C3"/>
            <xsd:enumeration value="METAL11"/> <xsd:enumeration value="METAL11C1"/> <xsd:enumeration value="METAL11C2"/> <xsd:enumeration value="METAL11C3"/>
            <xsd:enumeration value="METAL12"/> <xsd:enumeration value="METAL12C1"/> <xsd:enumeration value="METAL12C2"/> <xsd:enumeration value="METAL12C3"/>
            <xsd:enumeration value="METAL13"/> <xsd:enumeration value="METAL13C1"/> <xsd:enumeration value="METAL13C2"/> <xsd:enumeration value="METAL13C3"/>
            <xsd:enumeration value="METAL14"/> <xsd:enumeration value="METAL14C1"/> <xsd:enumeration value="METAL14C2"/> <xsd:enumeration value="METAL14C3"/>
            <xsd:enumeration value="POLY1"/>
            <xsd:enumeration value="POLY2"/>
            <xsd:enumeration value="POLY3"/>
            <xsd:enumeration value="GATE"/>
            <xsd:enumeration value="DIFF"/>
            <xsd:enumeration value="DIFFP"/>
            <xsd:enumeration value="DIFFN"/>
            <xsd:enumeration value="IMPLANT"/>
            <xsd:enumeration value="IMPLANTP"/>
            <xsd:enumeration value="IMPLANTN"/>
            <xsd:enumeration value="CONTACT1"/>  <xsd:enumeration value="CONTACT1C1"/>  <xsd:enumeration value="CONTACT1C2"/>  <xsd:enumeration value="CONTACT1C3"/>
            <xsd:enumeration value="CONTACT2"/>  <xsd:enumeration value="CONTACT2C1"/>  <xsd:enumeration value="CONTACT2C2"/>  <xsd:enumeration value="CONTACT2C3"/>
            <xsd:enumeration value="CONTACT3"/>  <xsd:enumeration value="CONTACT3C1"/>  <xsd:enumeration value="CONTACT3C2"/>  <xsd:enumeration value="CONTACT3C3"/>
            <xsd:enumeration value="CONTACT4"/>  <xsd:enumeration value="CONTACT4C1"/>  <xsd:enumeration value="CONTACT4C2"/>  <xsd:enumeration value="CONTACT4C3"/>
            <xsd:enumeration value="CONTACT5"/>  <xsd:enumeration value="CONTACT5C1"/>  <xsd:enumeration value="CONTACT5C2"/>  <xsd:enumeration value="CONTACT5C3"/>
            <xsd:enumeration value="CONTACT6"/>  <xsd:enumeration value="CONTACT6C1"/>  <xsd:enumeration value="CONTACT6C2"/>  <xsd:enumeration value="CONTACT6C3"/>
            <xsd:enumeration value="CONTACT7"/>  <xsd:enumeration value="CONTACT7C1"/>  <xsd:enumeration value="CONTACT7C2"/>  <xsd:enumeration value="CONTACT7C3"/>
            <xsd:enumeration value="CONTACT8"/>  <xsd:enumeration value="CONTACT8C1"/>  <xsd:enumeration value="CONTACT8C2"/>  <xsd:enumeration value="CONTACT8C3"/>
            <xsd:enumeration value="CONTACT9"/>  <xsd:enumeration value="CONTACT9C1"/>  <xsd:enumeration value="CONTACT9C2"/>  <xsd:enumeration value="CONTACT9C3"/>
            <xsd:enumeration value="CONTACT10"/> <xsd:enumeration value="CONTACT10C1"/> <xsd:enumeration value="CONTACT10C2"/> <xsd:enumeration value="CONTACT10C3"/>
            <xsd:enumeration value="CONTACT11"/> <xsd:enumeration value="CONTACT11C1"/> <xsd:enumeration value="CONTACT11C2"/> <xsd:enumeration value="CONTACT11C3"/>
            <xsd:enumeration value="CONTACT12"/> <xsd:enumeration value="CONTACT12C1"/> <xsd:enumeration value="CONTACT12C2"/> <xsd:enumeration value="CONTACT12C3"/>
            <xsd:enumeration value="CONTACT13"/> <xsd:enumeration value="CONTACT13C1"/> <xsd:enumeration value="CONTACT13C2"/> <xsd:enumeration value="CONTACT13C3"/>
            <xsd:enumeration value="CONTACT14"/> <xsd:enumeration value="CONTACT14C1"/> <xsd:enumeration value="CONTACT14C2"/> <xsd:enumeration value="CONTACT14C3"/>
            <xsd:enumeration value="PLUG"/>
            <xsd:enumeration value="OVERGLASS"/>
            <xsd:enumeration value="RESISTOR"/>
            <xsd:enumeration value="CAP"/>
            <xsd:enumeration value="TRANSISTOR"/>
            <xsd:enumeration value="EMITTER"/>
            <xsd:enumeration value="BASE"/>
            <xsd:enumeration value="COLLECTOR"/>
            <xsd:enumeration value="SUBSTRATE"/>
            <xsd:enumeration value="WELL"/>
            <xsd:enumeration value="WELLP"/>
            <xsd:enumeration value="WELLN"/>
            <xsd:enumeration value="GUARD"/>
            <xsd:enumeration value="ISOLATION"/>
            <xsd:enumeration value="BUS"/>
            <xsd:enumeration value="ART"/>
            <xsd:enumeration value="CONTROL"/>
            <xsd:enumeration value="TILENOT"/>
            <xsd:enumeration value="DMYPOLY1"/>
            <xsd:enumeration value="DMYPOLY2"/>
            <xsd:enumeration value="DMYPOLY3"/>
            <xsd:enumeration value="DMYDIFF"/>
            <xsd:enumeration value="DMYMETAL1"/>
            <xsd:enumeration value="DMYMETAL2"/>
            <xsd:enumeration value="DMYMETAL3"/>
            <xsd:enumeration value="DMYMETAL4"/>
            <xsd:enumeration value="DMYMETAL5"/>
            <xsd:enumeration value="DMYMETAL6"/>
            <xsd:enumeration value="DMYMETAL7"/>
            <xsd:enumeration value="DMYMETAL8"/>
            <xsd:enumeration value="DMYMETAL9"/>
            <xsd:enumeration value="DMYMETAL10"/>
            <xsd:enumeration value="DMYMETAL11"/>
            <xsd:enumeration value="DMYMETAL12"/>
            <xsd:enumeration value="DMYMETAL13"/>
            <xsd:enumeration value="DMYMETAL14"/>
            <xsd:enumeration value="DEXCLPOLY1"/>
            <xsd:enumeration value="DEXCLPOLY2"/>
            <xsd:enumeration value="DEXCLPOLY3"/>
            <xsd:enumeration value="DEXCLDIFF"/>
            <xsd:enumeration value="DEXCLMETAL1"/>
            <xsd:enumeration value="DEXCLMETAL2"/>
            <xsd:enumeration value="DEXCLMETAL3"/>
            <xsd:enumeration value="DEXCLMETAL4"/>
            <xsd:enumeration value="DEXCLMETAL5"/>
            <xsd:enumeration value="DEXCLMETAL6"/>
            <xsd:enumeration value="DEXCLMETAL7"/>
            <xsd:enumeration value="DEXCLMETAL8"/>
            <xsd:enumeration value="DEXCLMETAL9"/>
            <xsd:enumeration value="DEXCLMETAL10"/>
            <xsd:enumeration value="DEXCLMETAL11"/>
            <xsd:enumeration value="DEXCLMETAL12"/>
            <xsd:enumeration value="DEXCLMETAL13"/>
            <xsd:enumeration value="DEXCLMETAL14"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="LayerExtraFun">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="nonelectrical"/>
            <xsd:enumeration value="connects-metal"/>
            <xsd:enumeration value="connects-poly"/>
            <xsd:enumeration value="connects-diff"/>
            <xsd:enumeration value="heavy"/>
            <xsd:enumeration value="light"/>
            <xsd:enumeration value="depletion_heavy"/>
            <xsd:enumeration value="depletion_light"/>
            <xsd:enumeration value="enhancement_heavy"/>
            <xsd:enumeration value="enhancement_light"/>
            <xsd:enumeration value="vt"/>
            <xsd:enumeration value="thick"/>
            <xsd:enumeration value="native"/>
            <xsd:enumeration value="deep"/>
            <xsd:enumeration value="carb-nano"/> 
            <xsd:enumeration value="interconnect"/>
            <xsd:enumeration value="cut-layer"/> 
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="LayerOutline">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="NOPAT"/>
            <xsd:enumeration value="PAT_S"/>
            <xsd:enumeration value="PAT_T1"/>
            <xsd:enumeration value="PAT_T2"/>
            <xsd:enumeration value="PAT_DO1"/>
            <xsd:enumeration value="PAT_DO2"/>
            <xsd:enumeration value="PAT_DA1"/>
            <xsd:enumeration value="PAT_DA2"/>
            <xsd:enumeration value="PAT_DD1"/>
            <xsd:enumeration value="PAT_DD2"/>
            <xsd:enumeration value="PAT_DO1_T1"/>
            <xsd:enumeration value="PAT_DO2_T1"/>
            <xsd:enumeration value="PAT_DA1_T1"/>
            <xsd:enumeration value="PAT_DO1_T2"/>
            <xsd:enumeration value="PAT_DO2_T2"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="Opacity">
        <xsd:restriction base="xsd:double">
            <xsd:minInclusive value="0"/>
            <xsd:maxInclusive value="1"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="ArcProtoName">
        <xsd:restriction base="xsd:NCName"/>
    </xsd:simpleType>

    <xsd:simpleType name="ArcProtoFun">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="UNKNOWN"/>
            <xsd:enumeration value="METAL1"/>
            <xsd:enumeration value="METAL2"/>
            <xsd:enumeration value="METAL3"/>
            <xsd:enumeration value="METAL4"/>
            <xsd:enumeration value="METAL5"/>
            <xsd:enumeration value="METAL6"/>
            <xsd:enumeration value="METAL7"/>
            <xsd:enumeration value="METAL8"/>
            <xsd:enumeration value="METAL9"/>
            <xsd:enumeration value="METAL10"/>
            <xsd:enumeration value="METAL11"/>
            <xsd:enumeration value="METAL12"/>
            <xsd:enumeration value="METAL13"/>
            <xsd:enumeration value="METAL14"/>
            <xsd:enumeration value="POLY1"/>
            <xsd:enumeration value="POLY2"/>
            <xsd:enumeration value="POLY3"/>
            <xsd:enumeration value="DMYPOLY1"/>
            <xsd:enumeration value="DIFF"/>
            <xsd:enumeration value="DIFFP"/>
            <xsd:enumeration value="DIFFN"/>
            <xsd:enumeration value="DIFFS"/>
            <xsd:enumeration value="DIFFW"/>
            <xsd:enumeration value="WELL"/>
            <xsd:enumeration value="BUS"/>
            <xsd:enumeration value="UNROUTED"/>
            <xsd:enumeration value="NONELEC"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="ArcLayerStyle">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="FILLED"/>
            <xsd:enumeration value="CLOSED"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="PrimitiveNodeName">
        <xsd:restriction base="xsd:NCName"/>
    </xsd:simpleType>

    <xsd:simpleType name="PrimitiveNodeFun">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="UNKNOWN"/>
            <xsd:enumeration value="PIN"/>
            <xsd:enumeration value="CONTACT"/>
            <xsd:enumeration value="NODE"/>
            <xsd:enumeration value="CONNECT"/>
            <xsd:enumeration value="TRANMOS"/>
            <xsd:enumeration value="TRAPMOS"/>
            <xsd:enumeration value="TRADMOS"/>
            <xsd:enumeration value="TRAPMOSD"/>
            <xsd:enumeration value="TRANMOSNT"/>
            <xsd:enumeration value="TRAPMOSNT"/>
            <xsd:enumeration value="TRANMOSFG"/>
            <xsd:enumeration value="TRAPMOSFG"/>
            <xsd:enumeration value="TRANMOSCN"/>
            <xsd:enumeration value="TRAPMOSCN"/>
            <xsd:enumeration value="TRANMOSVTL"/>
            <xsd:enumeration value="TRAPMOSVTL"/>
            <xsd:enumeration value="TRANMOSVTH"/>
            <xsd:enumeration value="TRAPMOSVTH"/>
            <xsd:enumeration value="TRANMOSHV1"/>
            <xsd:enumeration value="TRAPMOSHV1"/>
            <xsd:enumeration value="TRANMOSHV2"/>
            <xsd:enumeration value="TRAPMOSHV2"/>
            <xsd:enumeration value="TRANMOSHV3"/>
            <xsd:enumeration value="TRAPMOSHV3"/>
            <xsd:enumeration value="TRANMOSNTHV1"/>
            <xsd:enumeration value="TRAPMOSNTHV1"/>
            <xsd:enumeration value="TRANMOSNTHV2"/>
            <xsd:enumeration value="TRAPMOSNTHV2"/>
            <xsd:enumeration value="TRANMOSNTHV3"/>
            <xsd:enumeration value="TRAPMOSNTHV3"/>
            <xsd:enumeration value="TRANPN"/>
            <xsd:enumeration value="TRAPNP"/>
            <xsd:enumeration value="TRANJFET"/>
            <xsd:enumeration value="TRAPJFET"/>
            <xsd:enumeration value="TRADMES"/>
            <xsd:enumeration value="TRAEMES"/>
            <xsd:enumeration value="TRANSREF"/>
            <xsd:enumeration value="TRANS"/>
            <xsd:enumeration value="TRA4NMOS"/>
            <xsd:enumeration value="TRA4PMOS"/>
            <xsd:enumeration value="TRA4DMOS"/>
            <xsd:enumeration value="TRA4PMOSD"/>
            <xsd:enumeration value="TRA4NMOSNT"/>
            <xsd:enumeration value="TRA4PMOSNT"/>
            <xsd:enumeration value="TRA4NMOSFG"/>
            <xsd:enumeration value="TRA4PMOSFG"/>
            <xsd:enumeration value="TRA4NMOSCN"/>
            <xsd:enumeration value="TRA4PMOSCN"/>
            <xsd:enumeration value="TRA4NMOSVTL"/>
            <xsd:enumeration value="TRA4PMOSVTL"/>
            <xsd:enumeration value="TRA4NMOSVTH"/>
            <xsd:enumeration value="TRA4PMOSVTH"/>
            <xsd:enumeration value="TRA4NMOSHV1"/>
            <xsd:enumeration value="TRA4PMOSHV1"/>
            <xsd:enumeration value="TRA4NMOSHV2"/>
            <xsd:enumeration value="TRA4PMOSHV2"/>
            <xsd:enumeration value="TRA4NMOSHV3"/>
            <xsd:enumeration value="TRA4PMOSHV3"/>
            <xsd:enumeration value="TRA4NMOSNTHV1"/>
            <xsd:enumeration value="TRA4PMOSNTHV1"/>
            <xsd:enumeration value="TRA4NMOSNTHV2"/>
            <xsd:enumeration value="TRA4PMOSNTHV2"/>
            <xsd:enumeration value="TRA4NMOSNTHV3"/>
            <xsd:enumeration value="TRA4PMOSNTHV3"/>
            <xsd:enumeration value="TRA4NPN"/>
            <xsd:enumeration value="TRA4PNP"/>
            <xsd:enumeration value="TRA4NJFET"/>
            <xsd:enumeration value="TRA4PJFET"/>
            <xsd:enumeration value="TRA4DMES"/>
            <xsd:enumeration value="TRA4EMES"/>
            <xsd:enumeration value="TRANS4"/>
            <xsd:enumeration value="JOSEPHSON"/>
            <xsd:enumeration value="RESIST"/>
            <xsd:enumeration value="RESISTBIAS"/>
            <!-- @Deprecated xsd:enumeration value="PRESIST"/-->
            <xsd:enumeration value="RESNPOLY"/>
            <xsd:enumeration value="RESPPOLY"/>
            <xsd:enumeration value="RESNPOLYM"/>
            <xsd:enumeration value="RESPPOLYM"/>
            <xsd:enumeration value="RESNNSPOLY"/>
            <xsd:enumeration value="RESPNSPOLY"/>
            <!-- @Deprecated xsd:enumeration value="WRESIST"/-->
            <xsd:enumeration value="RESNWELL"/>
            <xsd:enumeration value="RESPWELL"/>
            <xsd:enumeration value="RESHIRESPOLY2"/>
            <xsd:enumeration value="RESNACTIVE"/>
            <xsd:enumeration value="RESPACTIVE"/>
            <xsd:enumeration value="ESDDEVICE"/>
            <xsd:enumeration value="CAPAC"/>
            <xsd:enumeration value="ECAPAC"/>
            <xsd:enumeration value="POLY2CAPAC"/>
            <xsd:enumeration value="DIODE"/>
            <xsd:enumeration value="DIODEZ"/>
            <xsd:enumeration value="INDUCT"/>
            <xsd:enumeration value="METER"/>
            <xsd:enumeration value="BASE"/>
            <xsd:enumeration value="EMIT"/>
            <xsd:enumeration value="COLLECT"/>
            <xsd:enumeration value="BUFFER"/>
            <xsd:enumeration value="GATEAND"/>
            <xsd:enumeration value="GATEOR"/>
            <xsd:enumeration value="GATEXOR"/>
            <xsd:enumeration value="FLIPFLOPRSMS"/>
            <xsd:enumeration value="FLIPFLOPRSP"/>
            <xsd:enumeration value="FLIPFLOPRSN"/>
            <xsd:enumeration value="FLIPFLOPJKMS"/>
            <xsd:enumeration value="FLIPFLOPJKP"/>
            <xsd:enumeration value="FLIPFLOPJKN"/>
            <xsd:enumeration value="FLIPFLOPDMS"/>
            <xsd:enumeration value="FLIPFLOPDP"/>
            <xsd:enumeration value="FLIPFLOPDN"/>
            <xsd:enumeration value="FLIPFLOPTMS"/>
            <xsd:enumeration value="FLIPFLOPTP"/>
            <xsd:enumeration value="FLIPFLOPTN"/>
            <xsd:enumeration value="MUX"/>
            <xsd:enumeration value="CONPOWER"/>
            <xsd:enumeration value="CONGROUND"/>
            <xsd:enumeration value="SOURCE"/>
            <xsd:enumeration value="SUBSTRATE"/>
            <xsd:enumeration value="WELL"/>
            <xsd:enumeration value="ART"/>
            <xsd:enumeration value="ARRAY"/>
            <xsd:enumeration value="ALIGN"/>
            <xsd:enumeration value="CCVS"/>
            <xsd:enumeration value="CCCS"/>
            <xsd:enumeration value="VCVS"/>
            <xsd:enumeration value="VCCS"/>
            <xsd:enumeration value="TLINE"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="NodeLayerStyle">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="FILLED"/>
            <xsd:enumeration value="CLOSED"/>
            <xsd:enumeration value="CROSSED"/>
            <xsd:enumeration value="OPENED"/>
            <xsd:enumeration value="OPENEDT1"/>
            <xsd:enumeration value="OPENEDT2"/>
            <xsd:enumeration value="OPENEDT3"/>
            <xsd:enumeration value="VECTORS"/>
            <xsd:enumeration value="CIRCLE"/>
            <xsd:enumeration value="THICKCIRCLE"/>
            <xsd:enumeration value="DISC"/>
            <xsd:enumeration value="CIRCLEARC"/>
            <xsd:enumeration value="THICKCIRCLEARC"/>
            <xsd:enumeration value="TEXTCENT"/>
            <xsd:enumeration value="TEXTTOP"/>
            <xsd:enumeration value="TEXTBOT"/>
            <xsd:enumeration value="TEXTLEFT"/>
            <xsd:enumeration value="TEXTRIGHT"/>
            <xsd:enumeration value="TEXTTOPLEFT"/>
            <xsd:enumeration value="TEXTBOTLEFT"/>
            <xsd:enumeration value="TEXTTOPRIGHT"/>
            <xsd:enumeration value="TEXTBOTRIGHT"/>
            <xsd:enumeration value="TEXTBOX"/>
            <xsd:enumeration value="CROSS"/>
            <xsd:enumeration value="BIGCROSS"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="PrimitivePortName">
        <xsd:restriction base="xsd:NCName"/>
    </xsd:simpleType>

    <xsd:simpleType name="SpiceLevel">
        <xsd:restriction base="xsd:int">
            <xsd:minInclusive value="1"/>
            <xsd:maxInclusive value="3"/>
            <xsd:whiteSpace value="collapse"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="GDSData">
        <xsd:restriction base="xsd:string">
        <xsd:pattern value="\d+"/>
        <xsd:pattern value="\d+[/]*\d+"/>
        <xsd:pattern value="\d+[{/\d+}*,\d+p,\d+t,\d+h,\d+d]*"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="RuleName">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>

    <xsd:simpleType name="LayerRuleType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="MINWID"/>
            <xsd:enumeration value="MINWIDCOND"/>
            <xsd:enumeration value="MINAREA"/>
            <xsd:enumeration value="MINENCLOSEDAREA"/>
            <xsd:enumeration value="SURROUND"/>
            <xsd:enumeration value="G0CPL"/>
            <xsd:enumeration value="DIAGONALVIA"/>
            <xsd:enumeration value="DIFFMASKSEP"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="LayersRuleType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="CONSPA"/>
            <xsd:enumeration value="UCONSPA"/>
            <xsd:enumeration value="UCONSPA2D"/>
            <xsd:enumeration value="SPACING"/>
            <xsd:enumeration value="SPACINGE"/>
            <xsd:enumeration value="FORBIDDEN"/>
            <xsd:enumeration value="EXTENSION"/>
            <xsd:enumeration value="EXTENSIONGATE"/>
            <xsd:enumeration value="SURROUND"/>
            <xsd:enumeration value="G0CPL"/>
            <xsd:enumeration value="DIAGONALVIA"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="NodeLayersRuleType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="SURROUND"/>
            <xsd:enumeration value="ASURROUND"/>
            <xsd:enumeration value="UCONSPA2D"/>
            <xsd:enumeration value="SPACING"/>
            <xsd:enumeration value="SPACINGE"/>
            <xsd:enumeration value="FORBIDDEN"/>
            <xsd:enumeration value="EXTENSION"/>
            <xsd:enumeration value="EXTENSIONGATE"/>
            <xsd:enumeration value="SURROUND"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="NodeRuleType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="NODSIZ"/>
            <xsd:enumeration value="FORBIDDEN"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="DesignRuleWhen">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>

    <xsd:simpleType name="DesignRuleCondition">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>

    <xsd:complexType name="TechPoint">
        <xsd:attribute name="xm" type="xsd:double" use="required"/>
        <xsd:attribute name="xa" type="xsd:double" use="required"/>
        <xsd:attribute name="ym" type="xsd:double" use="required"/>
        <xsd:attribute name="ya" type="xsd:double" use="required"/>
    </xsd:complexType>

    <xsd:element name="technology">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="shortName" type="xsd:string" minOccurs="0"/>
                <xsd:element name="description" type="xsd:string"/>
                <xsd:element name="version" minOccurs="0" maxOccurs="unbounded">
                    <xsd:complexType>
                        <xsd:attribute name="tech" type="tns:TechVersion" use="required"/>
                        <xsd:attribute name="electric" type="tns:ElectricVersion" use="required"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="numMetals">
                    <xsd:complexType>
                        <xsd:attribute name="min" type="tns:NumMetals" use="required"/>
                        <xsd:attribute name="max" type="tns:NumMetals" use="required"/>
                        <xsd:attribute name="default" type="tns:NumMetals" use="required"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="scale">
                    <xsd:complexType>
                        <xsd:attribute name="value" type="xsd:double" use="required"/>
                        <xsd:attribute name="relevant" type="xsd:boolean" use="required"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="resolution" minOccurs="0">
                    <xsd:complexType>
                        <xsd:attribute name="value" type="xsd:double" use="required"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="defaultFoundry">
                    <xsd:complexType>
                        <xsd:attribute name="value" type="tns:Foundry" use="required"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="minResistance">
                    <xsd:complexType>
                        <xsd:attribute name="value" type="xsd:double" use="required"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="minCapacitance">
                    <xsd:complexType>
                        <xsd:attribute name="value" type="xsd:double" use="required"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="logicalEffort" minOccurs="0">
                    <xsd:complexType>
                        <xsd:attribute name="gateCapacitance" type="xsd:double" use="required"/>
                        <xsd:attribute name="wireRatio" type="xsd:double" use="required"/>
                        <xsd:attribute name="diffAlpha" type="xsd:double" use="required"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="transparentLayer" minOccurs="0" maxOccurs="14">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:group ref="tns:Color"/>
                        </xsd:sequence>
                        <xsd:attribute name="transparent" type="tns:TransparentLayer"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="layer" maxOccurs="unbounded" minOccurs="0">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:choice>
                                <xsd:element name="transparentColor">
                                    <xsd:complexType>
                                        <xsd:attribute name="transparent" type="tns:TransparentLayer"/>
                                    </xsd:complexType>
                                </xsd:element>
                                <xsd:element name="opaqueColor" type="tns:ColorRGB"></xsd:element>
                            </xsd:choice>
                            <xsd:element name="patternedOnDisplay" type="xsd:boolean"></xsd:element>
                            <xsd:element name="patternedOnPrinter" type="xsd:boolean"></xsd:element>
                            <xsd:element name="pattern" minOccurs="0" maxOccurs="16">
                                <xsd:simpleType>
                                    <xsd:restriction base="xsd:string">
                                        <xsd:pattern value="[X ]{16}"/>
                                    </xsd:restriction>
                                </xsd:simpleType>
                            </xsd:element>
                            <xsd:element name="outlined" type="tns:LayerOutline"></xsd:element>
                            <xsd:element name="opacity" type="tns:Opacity"></xsd:element>
                            <xsd:element name="foreground" type="xsd:boolean"></xsd:element>
                            <xsd:element name="display3D" minOccurs="0">
                                <xsd:complexType>
                                    <xsd:attribute name="thick" type="xsd:double" use="required"/>
                                    <xsd:attribute name="height" type="xsd:double" use="required"/>
                                    <xsd:attribute name="mode" type="xsd:string"/>
                                    <xsd:attribute name="factor" type="xsd:double"/>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="cifLayer" minOccurs="0">
                                <xsd:complexType>
                                    <xsd:attribute name="cif" type="xsd:string" use="required"/>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="skillLayer" minOccurs="0">
                                <xsd:complexType>
                                    <xsd:attribute name="skill" type="xsd:string" use="required"/>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="parasitics" minOccurs="0">
                                <xsd:complexType>
                                    <xsd:attribute name="resistance" type="xsd:double" use="required"/>
                                    <xsd:attribute name="capacitance" type="xsd:double" use="required"/>
                                    <xsd:attribute name="edgeCapacitance" type="xsd:double" use="required"/>
                                    <xsd:attribute name="inductanceAreaFactor" type="xsd:double" use="required"/>
                                    <xsd:attribute name="inductanceLengthFactor" type="xsd:double" use="required"/>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="pureLayerNode" minOccurs="0">
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:element name="oldName" type="xsd:string" minOccurs="0"></xsd:element>
                                        <xsd:group ref="tns:Distance"/>
                                        <xsd:element name="portArc" type="tns:ArcProtoName" minOccurs="0" maxOccurs="unbounded"></xsd:element>
                                    </xsd:sequence>
                                    <xsd:attribute name="name" type="tns:PrimitiveNodeName" use="required"/>
                                    <xsd:attribute name="style" type="tns:NodeLayerStyle"/>
                                    <xsd:attribute name="port" type="tns:PrimitivePortName" use="required"/>
                                </xsd:complexType>
                            </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute name="name" type="tns:LayerName" use="required"/>
                        <xsd:attribute name="fun" type="tns:LayerFun" use="required"/>
                        <xsd:attribute name="extraFun" type="tns:LayerExtraFun"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="arcProto" minOccurs="0" maxOccurs="unbounded">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="oldName" type="xsd:string" minOccurs="0"></xsd:element>
                            <xsd:element name="wipable" minOccurs="0"> <xsd:complexType/> </xsd:element>
                            <xsd:element name="curvable" minOccurs="0"> <xsd:complexType/> </xsd:element>
                            <xsd:element name="special" minOccurs="0"> <xsd:complexType/> </xsd:element>
                            <xsd:element name="notUsed" minOccurs="0"> <xsd:complexType/> </xsd:element>
                            <xsd:element name="skipSizeInPalette" minOccurs="0"> <xsd:complexType/> </xsd:element>
                            <xsd:element name="extended" type="xsd:boolean"/>
                            <xsd:element name="fixedAngle" type="xsd:boolean"/>
                            <xsd:element name="angleIncrement" type="xsd:integer"/>
                            <xsd:element name="antennaRatio" minOccurs="0" type="xsd:double"/>
                            <xsd:element name="diskOffset" minOccurs="0" maxOccurs="unbounded">
                                <xsd:complexType>
                                    <xsd:attribute name="untilVersion" type="tns:TechVersion" use="required"/>
                                    <xsd:attribute name="width" type="xsd:double" use="required"/>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="defaultWidth" minOccurs="0">
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:group ref="tns:Distance"/>
                                    </xsd:sequence>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="arcLayer" maxOccurs="unbounded">
                                <xsd:complexType>
                                    <xsd:group ref="tns:Distance"/>
                                    <xsd:attribute name="layer" type="tns:LayerName" use="required"/>
                                    <xsd:attribute name="style" type="tns:ArcLayerStyle" use="required"/>
                                </xsd:complexType>
                            </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute name="name" type="tns:ArcProtoName" use="required"/>
                        <xsd:attribute name="fun" type="tns:ArcProtoFun" use="required"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:choice minOccurs="0" maxOccurs="unbounded">
                    <xsd:element name="primitiveNodeGroup">
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element name="primitiveNode" maxOccurs="unbounded">
                                    <xsd:complexType>
                                        <xsd:sequence>
                                            <xsd:element name="oldName" type="xsd:string" minOccurs="0"/>
                                            <xsd:element name="lowVt" minOccurs="0"/>
                                            <xsd:element name="highVt" minOccurs="0"/>
                                            <xsd:element name="nativeBit" minOccurs="0"/>
                                            <xsd:element name="od18" minOccurs="0"/>
                                            <xsd:element name="od25" minOccurs="0"/>
                                            <xsd:element name="od33" minOccurs="0"/>
                                            <xsd:element name="curvePin" minOccurs="0"/>
                                        </xsd:sequence>
                                        <xsd:attribute name="name" type="tns:PrimitiveNodeName" use="required"/>
                                        <xsd:attribute name="fun" type="tns:PrimitiveNodeFun" use="required"/>
                                    </xsd:complexType>
                                </xsd:element>
                                <xsd:element name="shrinkArcs" minOccurs="0"/>
                                <xsd:element name="square" minOccurs="0"/>
                                <xsd:element name="canBeZeroSize" minOccurs="0"/>
                                <xsd:element name="wipes" minOccurs="0"/>
                                <xsd:element name="lockable" minOccurs="0"/>
                                <xsd:element name="edgeSelect" minOccurs="0"/>
                                <xsd:element name="skipSizeInPalette" minOccurs="0"/>
                                <xsd:element name="notUsed" minOccurs="0"/>
                                <xsd:group ref="tns:PrimitiveNodeImpl"/>
                            </xsd:sequence>
                            <!-- Deprecated attributes -->
                            <xsd:attribute name="name" type="tns:PrimitiveNodeName" use="prohibited"/>
                            <xsd:attribute name="fun" type="tns:PrimitiveNodeFun" use="prohibited"/>
                        </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="primitiveNode">
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element name="oldName" type="xsd:string" minOccurs="0"/>
                                <xsd:element name="shrinkArcs" minOccurs="0"/>
                                <xsd:element name="square" minOccurs="0"/>
                                <xsd:element name="canBeZeroSize" minOccurs="0"/>
                                <xsd:element name="wipes" minOccurs="0"/>
                                <xsd:element name="lockable" minOccurs="0"/>
                                <xsd:element name="edgeSelect" minOccurs="0"/>
                                <xsd:element name="skipSizeInPalette" minOccurs="0"/>
                                <xsd:element name="notUsed" minOccurs="0"/>
                                <xsd:element name="lowVt" minOccurs="0"/>
                                <xsd:element name="highVt" minOccurs="0"/>
                                <xsd:element name="nativeBit" minOccurs="0"/>
                                <xsd:element name="od18" minOccurs="0"/>
                                <xsd:element name="od25" minOccurs="0"/>
                                <xsd:element name="od33" minOccurs="0"/>
                                <xsd:element name="curvePin" minOccurs="0"/>
                                <xsd:group ref="tns:PrimitiveNodeImpl"/>
                            </xsd:sequence>
                            <xsd:attribute name="name" type="tns:PrimitiveNodeName" use="required"/>
                            <xsd:attribute name="fun" type="tns:PrimitiveNodeFun" use="required"/>
                        </xsd:complexType>
                    </xsd:element>
                </xsd:choice>
                <xsd:element name="spiceHeader" minOccurs="0" maxOccurs="unbounded">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="spiceLine" maxOccurs="unbounded">
                                <xsd:complexType>
                                    <xsd:attribute name="line" type="xsd:string" use="required"/>
                                </xsd:complexType>
                            </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute name="level" type="tns:SpiceLevel"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="menuPalette" minOccurs="0">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="menuBox" maxOccurs="unbounded" minOccurs="0">
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:group ref="tns:MenuItem" minOccurs="0" maxOccurs="unbounded"/>
                                    </xsd:sequence>
                                </xsd:complexType>
                            </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute name="numColumns" type="xsd:int"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="Foundry" maxOccurs="unbounded">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="layerGds" minOccurs="0" maxOccurs="unbounded">
                                <xsd:complexType>
                                    <xsd:sequence/>
                                    <xsd:attribute name="layer" type="tns:LayerName" use="required"/>
                                    <!-- <xsd:attribute name="gds" type="xsd:string" use="required"/> -->
                                    <xsd:attribute name="gds" type="tns:GDSData" use="required"/>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:choice minOccurs="0" maxOccurs="unbounded">
                                <xsd:element name="LayerRule">
                                    <xsd:complexType>
                                        <xsd:attribute name="ruleName" type="tns:RuleName" use="required"/>
                                        <xsd:attribute name="layerName" type="xsd:string" use="required"/>
                                        <xsd:attribute name="type" type="tns:LayerRuleType" use="required"/>
                                        <xsd:attribute name="when" type="tns:DesignRuleWhen"/>
                                        <xsd:attribute name="condition" type="tns:DesignRuleCondition"/>
                                        <xsd:attribute name="value" type="xsd:double" use="required"/>
                                    </xsd:complexType>
                                </xsd:element>
                                <xsd:element name="LayersRule">
                                    <xsd:complexType>
                                        <xsd:attribute name="ruleName" type="tns:RuleName" use="required"/>
                                        <xsd:attribute name="layerNames" type="xsd:string" use="required"/>
                                        <xsd:attribute name="type" type="tns:LayersRuleType" use="required"/>
                                        <xsd:attribute name="when" type="tns:DesignRuleWhen"/>
                                        <xsd:attribute name="valueX" type="xsd:double"/>
                                        <xsd:attribute name="valueY" type="xsd:double"/>
                                        <xsd:attribute name="value" type="xsd:double"/>
                                        <xsd:attribute name="maxW" type="xsd:double"/>
                                        <xsd:attribute name="minLen" type="xsd:double"/>
                                        <xsd:attribute name="nodeName" type="tns:PrimitiveNodeName"/>
                                        <xsd:attribute name="condition" type="tns:DesignRuleCondition"/>
                                    </xsd:complexType>
                                </xsd:element>
                                <xsd:element name="NodeLayersRule">
                                    <xsd:complexType>
                                        <xsd:attribute name="ruleName" type="tns:RuleName" use="required"/>
                                        <xsd:attribute name="layerNames" type="xsd:string" use="required"/>
                                        <xsd:attribute name="nodeName" type="tns:PrimitiveNodeName" use="required"/>
                                        <xsd:attribute name="type" type="tns:NodeLayersRuleType" use="required"/>
                                        <xsd:attribute name="when" type="tns:DesignRuleWhen"/>
                                        <xsd:attribute name="value" type="xsd:double"/>
                                        <xsd:attribute name="valueX" type="xsd:double"/>
                                        <xsd:attribute name="valueY" type="xsd:double"/>
                                    </xsd:complexType>
                                </xsd:element>
                                <xsd:element name="NodeRule">
                                    <xsd:complexType>
                                        <xsd:attribute name="ruleName" type="tns:RuleName" use="required"/>
                                        <xsd:attribute name="type" type="tns:NodeRuleType" use="required"/>
                                        <xsd:attribute name="when" type="tns:DesignRuleWhen"/>
                                        <xsd:attribute name="value" type="xsd:double"/>
                                        <xsd:attribute name="valueX" type="xsd:double"/>
                                        <xsd:attribute name="valueY" type="xsd:double"/>
                                        <xsd:attribute name="nodeName" type="tns:PrimitiveNodeName" use="required"/>
                                    </xsd:complexType>
                                </xsd:element>
                            </xsd:choice>
                        </xsd:sequence>
                        <xsd:attribute name="name" type="tns:Foundry" use="required"/>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:NCName" use="required"/>
            <xsd:attribute name="class" type="tns:ClassName"/>
        </xsd:complexType>

        <xsd:key name="transparent">
            <xsd:selector xpath="./tns:transparentLayer"/>
            <xsd:field xpath="@transparent"/>
        </xsd:key>

        <xsd:keyref name="transparentRef" refer="tns:transparent">
            <!-- every vehicle refers to its state -->
            <xsd:selector xpath=".//tns:transparentColor"/>
            <xsd:field xpath="@transparent"/>
        </xsd:keyref>
    </xsd:element>
</xsd:schema>
