Skip to content
achimnol edited this page Oct 8, 2012 · 2 revisions

플러그인 스펙을 정의합니다.

아래의 xsd 스펙은 태터툴즈 1.1.3 기준의 plugin 바인더 xml 의 스펙입니다. 아래에서 xsd 파일을 내려 받을 수 있습니다.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
    <xs:element name="plugin">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="title" minOccurs="1" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:simpleContent>
                            <xs:extension base="xs:normalizedString">
                                <xs:attribute ref="xml:lang"/>
                            </xs:extension>
                        </xs:simpleContent>
                    </xs:complexType>
                </xs:element>
                <xs:element name="link" minOccurs="1" maxOccurs="1" type="xs:anyURI"/>
                <xs:element name="version" minOccurs="1" maxOccurs="1" type="xs:token"/>
                <xs:element name="description" minOccurs="1" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:simpleContent>
                            <xs:extension base="xs:string">
                                <xs:attribute ref="xml:lang"/>
                            </xs:extension>
                        </xs:simpleContent>
                    </xs:complexType>
                </xs:element>
                <xs:element name="license" minOccurs="1" maxOccurs="1" type="xs:normalizedString"/>
                <xs:element name="author" minOccurs="1" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:simpleContent>
                            <xs:extension base="xs:normalizedString">
                                <xs:attribute ref="xml:lang"/>
                                <xs:attribute name="link" use="required" type="xs:anyURI"/>
                            </xs:extension>
                        </xs:simpleContent>
                    </xs:complexType>
                </xs:element>
                <xs:element name="safety" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:attribute name="accessLocal" use="required" type="yesno"/>
                        <xs:attribute name="accessRaw" use="required" type="yesno"/>
                        <xs:attribute name="accessRemote" use="required" type="yesno"/>
                        <xs:attribute name="changeData" use="required" type="yesno"/>
                        <xs:attribute name="exposeData" use="required" type="yesno"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="requirements" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="tattertools" minOccurs="1" maxOccurs="1" type="xs:token"/>
                            <xs:element name="textcube" minOccurs="0" maxOccurs="1" type="xs:token"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="storage" minOccurs="0" maxOccurs="1" type="storage"/>
                <xs:element name="binding" minOccurs="0" maxOccurs="1">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="listener" type="listener" minOccurs="0" maxOccurs="unbounded"/>
                            <xs:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded"/>
                            <xs:element name="sidebar" type="sidebar" minOccurs="0" maxOccurs="unbounded"/>
                            <xs:element name="center" type="center" minOccurs="0" maxOccurs="unbounded"/>
                            <xs:element name="adminMenu" type="adminMenu" minOccurs="0" maxOccurs="unbounded"/>
                            <xs:element name="config" type="config" minOccurs="0" maxOccurs="1"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
            <xs:attribute name="version" use="required" type="xs:decimal"/>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="storage">
        <xs:sequence>
            <xs:element name="table" minOccurs="1" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="name" minOccurs="1" maxOccurs="1" type="xs:token"/>
                        <xs:element name="fields" minOccurs="1" maxOccurs="1">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="field" minOccurs="1" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name" minOccurs="1" maxOccurs="1" type="xs:token"/>
                                                <xs:element name="attributes" minOccurs="1" maxOccurs="1" type="xs:token"/>
                                                <xs:element name="length" minOccurs="0" maxOccurs="1" type="xs:unsignedInt"/>
                                                <xs:element name="isnull" minOccurs="0" maxOccurs="1" type="xs:boolean"/>
                                                <xs:element name="default" minOccurs="0" maxOccurs="1" type="xs:string"/>
                                                <xs:element name="autoincrement" minOccurs="0" maxOccurs="1" type="xs:boolean"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="key" minOccurs="0" maxOccurs="unbounded" type="xs:token"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="tag">
        <xs:attribute name="name" use="required" type="xs:token"/>
        <xs:attribute name="handler" use="required" type="functionName"/>
    </xs:complexType>
    <xs:complexType name="sidebar">
        <xs:sequence>
            <xs:element name="params">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="param">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="name" minOccurs="1" maxOccurs="1" type="xs:token"/>
                                    <xs:element name="type" minOccurs="1" maxOccurs="1" type="paramType"/>
                                    <xs:element name="title" minOccurs="1" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:simpleContent>
                                                <xs:extension base="xs:normalizedString">
                                                    <xs:attribute ref="xml:lang"/>
                                                </xs:extension>
                                            </xs:simpleContent>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="title" use="required" type="xs:token"/>
        <xs:attribute name="handler" use="required" type="functionName"/>
    </xs:complexType>
    <xs:complexType name="listener">
        <xs:simpleContent>
            <xs:extension base="functionName">
                <xs:attribute name="event" use="required" type="xs:token"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="center">
    </xs:complexType>
    <xs:complexType name="adminMenu">
        <xs:sequence>
            <xs:element name="viewMethods">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="method">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="title" minOccurs="1" maxOccurs="unbounded" type="xs:token"/>
                                    <xs:element name="position" type="xs:token"/>
                                    <xs:element name="helpurl" type="xs:anyURI"/>
                                    <xs:element name="handler" minOccurs="1" maxOccurs="1" type="functionName"/>
                                    <xs:element name="params">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element maxOccurs="unbounded" name="param">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name" minOccurs="1" maxOccurs="1" type="xs:token"/>
                                                            <xs:element name="type" minOccurs="1" maxOccurs="1" type="parameterType"/>
                                                            <xs:choice minOccurs="0" maxOccurs="1">
                                                                <xs:element name="default" type="xs:string"/>
                                                                <xs:element name="mandatory" type="boolean"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="config">
        <xs:sequence>
            <xs:element name="fieldset" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="field" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="op" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                    <xs:attribute name="name" use="required" type="xs:token"/>
                                                    <xs:attribute name="value" type="xs:string"/>
                                                    <xs:attribute name="checked" type="xs:string"/>
                                                </xs:extension>
                                            </xs:simpleContent>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="caption" minOccurs="0" maxOccurs="1" type="xs:string"/>
                                </xs:sequence>
                                <xs:attribute name="title" use="required" type="xs:normalizedString"/>
                                <xs:attribute name="name" use="required" type="xs:token"/>
                                <xs:attribute name="type" use="required" type="fieldType"/>
                                <xs:attribute name="value" type="xs:string"/>
                                <xs:attribute name="titledirection" type="fieldTitleDirection"/>
                                <xs:attribute name="size" type="xs:unsignedInt"/>
                                <xs:attribute name="rows" type="xs:unsignedInt"/>
                                <xs:attribute name="cols" type="xs:unsignedInt"/>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                    <xs:attribute name="legend" type="xs:normalizedString"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="dataValHandler" type="functionName"/>
        <xs:attribute name="manifestHandler" type="functionName"/>
    </xs:complexType>

    <xs:simpleType name="yesno">
        <xs:restriction base="xs:string">
            <xs:pattern value="yes|no"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="boolean">
        <xs:restriction base="xs:integer">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="1"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="functionName">
        <xs:restriction base="xs:NMTOKEN"/>
    </xs:simpleType>
    <xs:simpleType name="paramType">
        <xs:restriction base="xs:token">
            <xs:enumeration value="string"/>
            <xs:enumeration value="int"/>
            <xs:enumeration value="textarea"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="parameterType">
        <xs:restriction base="xs:token">
            <xs:enumeration value="any"/>
            <xs:enumeration value="bool"/>
            <xs:enumeration value="number"/>
            <xs:enumeration value="int"/>
            <xs:enumeration value="id"/>
            <xs:enumeration value="url"/>
            <xs:enumeration value="string"/>
            <xs:enumeration value="list"/>
            <xs:enumeration value="timestamp"/>
            <xs:enumeration value="period"/>
            <xs:enumeration value="ip"/>
            <xs:enumeration value="domain"/>
            <xs:enumeration value="email"/>
            <xs:enumeration value="language"/>
            <xs:enumeration value="filename"/>
            <xs:enumeration value="directory"/>
            <xs:enumeration value="path"/>
            <xs:enumeration value="file"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="fieldType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="text"/>
            <xs:enumeration value="textarea"/>
            <xs:enumeration value="select"/>
            <xs:enumeration value="checkbox"/>
            <xs:enumeration value="radio"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="fieldTitleDirection">
        <xs:restriction base="xs:string">
            <xs:enumeration value="bk"/>
            <xs:enumeration value=""/>
        </xs:restriction>
    </xs:simpleType>
</xs:schema>
Clone this wiki locally