15.2.5. XSD-< schema > element

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

Page Views: 10 views

The < schema > element is the root element of every XML Schema.

< schema > element

The < schema > element is the root element of each XML Schema:

  ... ...  

< schema > elements can contain attributes. An schema declaration often looks like this:

  ... ...  

The following code snippet:

xmlns:xs="http://www.w3.org/2001/XMLSchema" 

Shows that the elements and data types used in schema come from the namespace “ http://www.w3.org/2001/XMLSchema ”.” It also specifies that elements and data types from the namespace “ http://www.w3.org/2001/XMLSchema ”” should use the prefix xs:

This snippet:

targetNamespace="http://www.runoob.com" 

Shows that the elements defined by this schema (note, to, from, heading, body) come from the namespace: “ http://www.runoob.com ”.

This snippet:

xmlns="http://www.runoob.com" 

Indicates that the default namespace is “ http://www.runoob.com ”.”

This snippet:

elementFormDefault="qualified" 

Indicates that elements used by any XML instance document and declared in this schema must be namespace qualified.

Reference Schema in an XML document

This XML document contains a reference to XML Schema:

  Tove Jani Reminder Don't forget me this weekend!  

The following code snippet:

xmlns="http://www.runoob.com" 

Specifies the declaration of the default namespace. This declaration tells the schema validator that all elements used in this XML document are declared in the “ http://www.runoob.com ”” namespace.

Once you have the available XML Schema instance namespace:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

You can then use the schemaLocation property. This property has two values. The first value is the namespace that needs to be used. The second value is the location of the XML schema used by the namespace:

xsi:schemaLocation="http://www.runoob.com note.xsd" 
《地理信息系统原理、技术与方法》  97

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