以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DTD/XML Schema 』  (http://bbs.xml.org.cn/list.asp?boardid=23)
----  如何定义一个以string为基,又包含属性的元素类型  (http://bbs.xml.org.cn/dispbbs.asp?boardid=23&rootid=&id=25007)


--  作者:今天我有空
--  发布时间:12/5/2005 1:58:00 PM

--  如何定义一个以string为基,又包含属性的元素类型
RT
--  作者:98900969r
--  发布时间:12/5/2005 4:32:00 PM

--  
 <xs:complexType name="a">
  <xs:simpleContent>
   <xs:extension base="xs:string">
    <xs:attribute name="a1" type="xs:int"/>
   </xs:extension>
  </xs:simpleContent>
 </xs:complexType>

--  作者:syluke
--  发布时间:4/11/2006 10:12:00 AM

--  
非常好,谢谢!
--  作者:gemingke
--  发布时间:4/11/2006 11:50:00 AM

--  
假如想对以string为基础的类型进行约束后再扩展,可以参考我的帖子“心得分享,关于数据约束于扩展”
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
7,255.859ms