`
luhai1992
  • 浏览: 56882 次
  • 性别: Icon_minigender_1
  • 来自: 天津
社区版块
存档分类
最新评论

xml小结3

 
阅读更多

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