论坛首页 综合技术论坛

xml小结3

浏览 1130 次
锁定老帖子 主题:xml小结3
该帖已经被评为隐藏帖
作者 正文
   发表时间:2010-03-27  

xml小结3

十三、在类型中添加属性

                                            <xs:attribute name="id" use="required" type="xs:ID"></                              xs:attribute>

                                          <xs:attribute name="name" default="aaa"></xs:attribute>

                     </xs:attributeGroup>

   解析:use=”required” 代表必填项

                Type=”xs:ID” 代表主键 xml中主键必须以字母或_下划线开头

                Default 代表默认值

十四、将属性添加到组中

         定义:

                   <xs:attributeGroup name="stugroup">

                                   <xs:attribute name="id" use="required" type="xs:ID"></                              xs:attribute>

                                          <xs:attribute name="name" default="aaa"></xs:attribute>

                     </xs:attributeGroup>

       引用:

                   <xs:attributeGroup name="stugroup">

                                   <xs:attribute name="id" use="required" type="xs:ID"></                              xs:attribute>

                                          <xs:attribute name="name" default="aaa"></xs:attribute>

                     </xs:attributeGroup>

 

 

论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics