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"
     4            xmlns="http://www.weshare.com.cn"
     5            elementFormDefault="qualified">
     6 
     7     <xs:element name="actionGroup">
     8         <xs:complexType>
     9             <xs:sequence>
    10                 <xs:element name="action" maxOccurs="unbounded">
    11                     <xs:complexType>
    12                         <xs:attributeGroup ref="attributeGroup"/>
    13                     </xs:complexType>
    14                 </xs:element>
    15             </xs:sequence>
    16             <xs:attribute name="id" type="xs:string" use="required"></xs:attribute>
    17         </xs:complexType>
    18     </xs:element>
    19 
    20     <xs:attributeGroup name="attributeGroup">
    21         <xs:attribute name="id" type="xs:string" use="required"/>
    22         <xs:attribute name="fun" type="xs:string" use="required"/>
    23         <xs:attribute name="type" type="xs:string" use="required"/>
    24         <xs:attribute name="param" type="xs:string" use="required"/>
    25     </xs:attributeGroup>
    26 
    27 </xs:schema>

    XML范例:

    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <actionGroup id="3333"
    3              xmlns="http://www.weshare.com.cn"
    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/actionGroup.xsd">
    6 
    7     <action id="" fun="" type="" param=""/>
    8     <action id="" fun="" type="" param=""/>
    9 </actionGroup>

    引用示例二:

     1 <?xml version="1.0"?>
     2 <note
     3         xmlns="http://www.w3schools.com"
     4         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     5         xsi:schemaLocation="http://www.w3schools.com note.xsd">
     6     <to>Tove</to>
     7     <from>Jani</from>
     8     <heading>Reminder</heading>
     9     <body>Don't forget me this weekend!</body>
    10 </note>
  • 相关阅读:
    [JS]手写动画最小时间间隔设置
    [CSS3]chrome浏览器中支持汉字的最小像素是12px,如何让显示更小的字体
    [HTML,CSS]div+css垂直水平居中
    promise经典题目
    HTML5新兴API
    使用MessageChannel(消息通道)进行深拷贝
    原生js手写Promise
    github图片显示不出来-已解决
    前端原生js加密解密
    vue-cli3前端工程静态文件下载
  • 原文地址:https://www.cnblogs.com/gongxr/p/9179078.html
Copyright © 2011-2022 走看看