1.About <choice>, <sequence>, <all> and <group>, also about "max/min occurs". What and why <all> special? There are also <element> and <any>.

2.About namespace. The "namesapce" attribute in <any> and <anyAttribute>.
3.For <group> and <attributeGroup>, usage and why <group> can not contain <element> directly?
4.About attributes, how to declare them?
5.<annotation> contains <appinfo> (for machine) and <documentation> (for human). Each contains a "source" attribute refer to a URI, <documentation> may has "xml:lang" attribute.
6.Which tag can be global and can use "ref" (or "type", "substitution", maybe there's other?) to refer to? DTD dose not support local type. So note that global element or type can provide extra features (which?) than the local ones.
7.Notice the "block" and "abstract" attribute for <complexType> and <element>, why <element> need to use "final" for restriction or extension? Substitution and be used together with derived type, and element's "final" prohibit substitution with certain type, note that there seems no way to prohibit an element from being substitution head. What's the usage of substitution?
8.Why both <complexType> and <complexContent> has "mixed" attribute? Can not specify datatype for "mixed" content.
9.Notice the "default", "fixed", "subsitutionGroup", "form" and "nillable" attributes for <element>. "xsi:nil" attribute is used to expicitly specify that the elements content (not matter it's simpleContent or complexContent) is null, for example, if a element is type of "long", you can not set it to null unless you use "xsi:nil".

2.About namespace. The "namesapce" attribute in <any> and <anyAttribute>.
3.For <group> and <attributeGroup>, usage and why <group> can not contain <element> directly?
4.About attributes, how to declare them?
5.<annotation> contains <appinfo> (for machine) and <documentation> (for human). Each contains a "source" attribute refer to a URI, <documentation> may has "xml:lang" attribute.
6.Which tag can be global and can use "ref" (or "type", "substitution", maybe there's other?) to refer to? DTD dose not support local type. So note that global element or type can provide extra features (which?) than the local ones.
7.Notice the "block" and "abstract" attribute for <complexType> and <element>, why <element> need to use "final" for restriction or extension? Substitution and be used together with derived type, and element's "final" prohibit substitution with certain type, note that there seems no way to prohibit an element from being substitution head. What's the usage of substitution?
8.Why both <complexType> and <complexContent> has "mixed" attribute? Can not specify datatype for "mixed" content.
9.Notice the "default", "fixed", "subsitutionGroup", "form" and "nillable" attributes for <element>. "xsi:nil" attribute is used to expicitly specify that the elements content (not matter it's simpleContent or complexContent) is null, for example, if a element is type of "long", you can not set it to null unless you use "xsi:nil".
本文深入探讨了XML中关键概念的使用与理解,包括<choice>、<sequence>、<all> 和 <group> 的特性,以及 max/minoccurs 的应用。此外还解析了命名空间的作用、如何声明属性、<complexType> 和 <element> 的特殊属性等,并对比了全局与局部元素的区别。

被折叠的 条评论
为什么被折叠?



