xml http://www.w3school.com.cn/xml/xml_dtd.asp
dtd http://www.w3school.com.cn/dtd/index.asp
Schema http://www.w3school.com.cn/schema/index.asp
xml 也是可以通过css进行美化,在网页中显示d
XSLT 是首选的 XML 样式表语言。
XSLT (eXtensible Stylesheet Language Transformations) 远比 CSS 更加完善。
XSLT http://www.w3school.com.cn/xsl/index.asp
一、定义元素如何出现:包括all,sequence,choice 这三个。
1、all:默认值。不限制子元素的出现顺序,每个子元素必须出现且只能出现一次。例如:
<xs:element name="person">
<xs:complexType>
<xs:all>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="lastname" type="xs:string"/>
</xs:all>
</xs:complexType>
</xs:element>
2、sequence:子元素在XML文件中按照XML Schema定义的顺序出现。前面已经提过。
3、choice:两个子元素中仅出现一个。例如:
<xs:element name="gender">
<xs:complexType>
<xs:choice>
<xs:element name="male" type="male"/>
<xs:element name="female" type="female"/>
</xs:choice>
</xs:complexType>
</xs:element>
二、次数限定类,包括minOccurs和maxOccurs,前者指定最少出现次数,后者指定最多出现次数。例如:
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="full_name" type="xs:string"/>
<xs:element name="child_name" type="xs:string" maxOccurs="10" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
http://blog.donews.com/chouchy/archive/2006/06/26/926985.aspx