简单xsd实例

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema  xmlns:xs="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.zte.bigdata.vmax.com.cn"
            xmlns="http://www.zte.bigdata.vmax.com.cn"
            elementFormDefault="qualified">
    <!--基本元素定义-->


    <xs:element name="column" >
        <xs:complexType>
            <xs:attribute name="visible" type="xs:string"/>
            <xs:attribute name="type" type="xs:string"/>
            <xs:attribute name="linkable" type="xs:string"/>
            <xs:attribute name="linkUrl" type="xs:string"/>
            <xs:attribute name="clickable" type="xs:string"/>
            <xs:attribute name="clickType" type="xs:string"/>
            <xs:attribute name="imgName" type="xs:string"/>
            <xs:attribute name="sortable" type="xs:string"/>
            <xs:attribute name="enName" type="xs:string"/>
            <xs:attribute name="zhName" type="xs:string"/>
            <xs:attribute name="alg" type="xs:string"/>
            <xs:attribute name="search" type="xs:string"/>
            <xs:attribute name="keyWord" type="xs:string"/>
            <xs:attribute name="overHide" type="xs:string"/>
            <xs:attribute name="width" type="xs:string"/>
            <xs:attribute name="funcName" type="xs:string"/>
            <xs:attribute name="parameter" type="xs:string"/>
            <xs:attribute name="parameterOther" type="xs:string"/>
            <xs:attribute name="segid" type="xs:string"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="para" >
        <xs:complexType>
            <xs:attribute name="name" type="xs:string"/>
            <xs:attribute name="value" type="xs:string"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="sql" >
        <xs:complexType mixed="true">
            <xs:sequence>
                <xs:element ref="para" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attribute name="name" type="xs:string"/>
            <xs:attribute name="db" type="xs:string"/>
            <xs:attribute name="paraProcess" type="xs:string"/>
            <xs:attribute name="dataProcess" type="xs:string"/>
            <xs:attribute name="table" type="xs:string"/>
            <xs:attribute name="where" type="xs:string"/>
            <xs:attribute name="order" type="xs:string"/>
            <xs:attribute name="group" type="xs:string"/>
            <xs:attribute name="rowkey" type="xs:string"/>
        </xs:complexType>
    </xs:element>


    <!--插件定义-->
    <xs:element name="common">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="para" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>


    <xs:element name="weektimepicker">
        <xs:complexType>
            <xs:attribute name="id" type="xs:string"/>
            <xs:attribute name="paraName" type="xs:string"/>
            <xs:attribute name="weekStart" type="xs:string"/>
            <xs:attribute name="type" type="xs:string"/>
        </xs:complexType>
    </xs:element>



    <xs:element name="table">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="column" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element ref="sql" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
            <xs:attribute name="id" type="xs:string"/>
            <xs:attribute name="height" type="xs:string"/>
            <xs:attribute name="size" type="xs:string"/>
            <xs:attribute name="funcName" type="xs:string"/>
            <xs:attribute name="parameter" type="xs:string"/>
            <xs:attribute name="enTitle" type="xs:string"/>
            <xs:attribute name="zhTitle" type="xs:string"/>
            <xs:attribute name="search" type="xs:string"/>
            <xs:attribute name="exportType" type="xs:string"/>
            <xs:attribute name="zhSearchText" type="xs:string"/>
            <xs:attribute name="enSearchText" type="xs:string"/>
            <xs:attribute name="paging" type="xs:string"/>
            <xs:attribute name="export" type="xs:string"/>
            <xs:attribute name="zhExportText" type="xs:string"/>
            <xs:attribute name="enExportText" type="xs:string"/>
            <xs:attribute name="type" type="xs:string"/>
            <xs:attribute name="parameterOther" type="xs:string"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="barline">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="sql" minOccurs="1" maxOccurs="2"/>
            </xs:sequence>
            <xs:attribute name="id" type="xs:string"/>
            <xs:attribute name="enTitle" type="xs:string"/>
            <xs:attribute name="zhTitle" type="xs:string"/>
            <xs:attribute name="enLegend" type="xs:string"/>
            <xs:attribute name="zhLegend" type="xs:string"/>
            <xs:attribute name="color" type="xs:string"/>
            <xs:attribute name="height" type="xs:string"/>
            <xs:attribute name="type" type="xs:string"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="pie">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="sql" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
            <xs:attribute name="id" type="xs:string"/>
            <xs:attribute name="enTitle" type="xs:string"/>
            <xs:attribute name="zhTitle" type="xs:string"/>
            <xs:attribute name="enLegend" type="xs:string"/>
            <xs:attribute name="zhLegend" type="xs:string"/>
            <xs:attribute name="color" type="xs:string"/>
            <xs:attribute name="height" type="xs:string"/>
            <xs:attribute name="type" type="xs:string"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="popwindow">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="column" minOccurs="1" maxOccurs="unbounded"/>
                <xs:element ref="sql" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
            <xs:attribute name="id" type="xs:string"/>
            <xs:attribute name="type" type="xs:string"/>
        </xs:complexType>
    </xs:element>


    <xs:element name="Config">
        <xs:complexType>
            <xs:sequence minOccurs="0" >
                <xs:element ref="common" minOccurs="0"  maxOccurs="1"/>
                <xs:element ref="weektimepicker" minOccurs="0" maxOccurs="unbounded" />
                <xs:element ref="region" minOccurs="0" maxOccurs="unbounded" />
                <xs:element ref="initgis" minOccurs="0" maxOccurs="unbounded" />
                <xs:element ref="table" minOccurs="0" maxOccurs="unbounded" />
                <xs:element ref="barline" minOccurs="0" maxOccurs="unbounded" />
                <xs:element ref="pie" minOccurs="0" maxOccurs="unbounded" />
                <xs:element ref="popwindow" minOccurs="0"  maxOccurs="unbounded" />
                <xs:element ref="loadprojdata" minOccurs="0"  maxOccurs="unbounded" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>

</xs:schema>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值