15.2.13. XSD mixed content

发布时间 : 2025-10-25 13:35:23 UTC      

Page Views: 9 views

Mixed compound types can contain attributes, elements, and text.

Composite types with mixed content

The XML element, “letter”, contains text and other elements:

<letter> Dear Mr.<name>John Smithname>. Your order <orderid>1032orderid> will be shipped on <shipdate>2001-07-13shipdate>. letter>    

The following schema declares the “letter” element:

<xs:element name="letter"> <xs:complexType mixed="true"> <xs:sequence> <xs:element name="name" type="xs:string"/> <xs:element name="orderid" type="xs:positiveInteger"/> <xs:element name="shipdate" type="xs:date"/> xs:sequence> xs:complexType> xs:element>    

注意: In order for character data to appear between children of “letter”, the mixed property must be set to “true”. The < xs:sequence > tags (name, orderid, and shipdate) mean that the defined elements must appear within the “letter” element in turn.

We can also give a name to the complexType element and have the type attribute of the “letter” element refer to the name of complexType (in this way, several elements can refer to the same compound type):

<xs:element name="letter" type="lettertype"/> <xs:complexType name="lettertype" mixed="true"> <xs:sequence> <xs:element name="name" type="xs:string"/> <xs:element name="orderid" type="xs:positiveInteger"/> <xs:element name="shipdate" type="xs:date"/> xs:sequence> xs:complexType>      
                
                
            
        
        
《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。