zoukankan      html  css  js  c++  java
  • schema举例二

    schema举例二:

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
     3            targetNamespace="http://www.weshare.com.cn/hbaseGroup"
     4            xmlns="http://www.weshare.com.cn/hbaseGroup"
     5            elementFormDefault="qualified">
     6 
     7     <xs:element name="hbaseGroup">
     8         <xs:complexType>
     9             <xs:sequence>
    10                 <xs:element name="statements" maxOccurs="unbounded">
    11                     <xs:complexType>
    12                         <xs:sequence>
    13                             <xs:element name="statement" maxOccurs="unbounded">
    14                                 <xs:complexType>
    15                                     <xs:sequence>
    16                                         <xs:element name="property" maxOccurs="unbounded">
    17                                             <xs:complexType>
    18                                                 <xs:attribute name="type" use="required"/>
    19                                             </xs:complexType>
    20                                         </xs:element>
    21                                     </xs:sequence>
    22                                 </xs:complexType>
    23                             </xs:element>
    24                         </xs:sequence>
    25                         <xs:attributeGroup ref="AttributeGroup"/>
    26                     </xs:complexType>
    27                 </xs:element>
    28             </xs:sequence>
    29             <xs:attribute name="id" type="xs:string" use="required"></xs:attribute>
    30         </xs:complexType>
    31     </xs:element>
    32 
    33     <xs:attributeGroup name="AttributeGroup">
    34         <xs:attribute name="id" type="xs:string" use="required"/>
    35         <xs:attribute name="type" type="xs:string" use="required"/>
    36     </xs:attributeGroup>
    37 
    38 </xs:schema>

    XML范例:

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <hbaseGroup id="id"
     3             xmlns="http://www.weshare.com.cn/hbaseGroup"
     4             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     5             xsi:noNamespaceSchemaLocation="file:///C:/workspace/Tools/UpdateProject/script_update_common/src/main/resources/schema/project/hbaseGroup.xsd">
     6     <statements id="" type="">
     7         <statement>
     8             <property type=""/>
     9             <property type=""/>
    10         </statement>
    11         <statement>
    12             <property type=""/>
    13         </statement>
    14     </statements>
    15     <statements id="" type="">
    16         <statement>
    17             <property type=""/>
    18         </statement>
    19     </statements>
    20 
    21 </hbaseGroup>
  • 相关阅读:
    array_keys
    strval
    is_numeric
    php static延迟静态绑定
    page39 类的访问权限控制
    page34类的继承
    被遗忘在角落的类型检查函数
    2.2.5重写静态变量
    2.2.3使用parent作用域
    16个最棒的WordPress博客写作发布工具【博主桌面工具】
  • 原文地址:https://www.cnblogs.com/gongxr/p/9179147.html
Copyright © 2011-2022 走看看