锁定老帖子 主题: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>
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
浏览 1130 次