<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=XML_Tutorial%2FXML_Schema%2FGlobal_Local</id>
		<title>XML Tutorial/XML Schema/Global Local - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=XML_Tutorial%2FXML_Schema%2FGlobal_Local"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=XML_Tutorial/XML_Schema/Global_Local&amp;action=history"/>
		<updated>2026-04-04T09:01:00Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=XML_Tutorial/XML_Schema/Global_Local&amp;diff=10691&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=XML_Tutorial/XML_Schema/Global_Local&amp;diff=10691&amp;oldid=prev"/>
				<updated>2010-05-26T08:26:48Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 08:26, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=XML_Tutorial/XML_Schema/Global_Local&amp;diff=10690&amp;oldid=prev</id>
		<title> в 18:22, 25 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=XML_Tutorial/XML_Schema/Global_Local&amp;diff=10690&amp;oldid=prev"/>
				<updated>2010-05-25T18:22:32Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== An XML Schema Using Inline (or Local) Declarations==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;xsd:schema&lt;br /&gt;
   xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;br /&gt;
   elementFormDefault=&amp;quot;qualified&amp;quot;&lt;br /&gt;
   targetNamespace=&amp;quot;http://www.wbex.ru/namespaces/pub&amp;quot;&lt;br /&gt;
   xmlns=&amp;quot;http://www.wbex.ru/namespaces/pub&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:element name=&amp;quot;publications&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;
       &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;xsd:element name=&amp;quot;book&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
           &amp;lt;xsd:element name=&amp;quot;title&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
           &amp;lt;xsd:element name=&amp;quot;author&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
           &amp;lt;xsd:element name=&amp;quot;description&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
          &amp;lt;xsd:attribute name=&amp;quot;isbn&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
         &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
        &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;
       &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
      &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
    &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;
&amp;lt;/xsd:schema&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Global type versus Local type==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
Global declarations are declarations that appear as direct children of the &amp;lt;schema&amp;gt; element. &lt;br /&gt;
Global element declarations can be reused throughout the XML Schema. &lt;br /&gt;
Local declarations do not have the &amp;lt;schema&amp;gt; element.&lt;br /&gt;
Local types can be used only in their specific context. &lt;br /&gt;
Referring to an Existing Global Element &lt;br /&gt;
To refer to a global element declaration, include a ref attribute and specify the name of the global element as the value.&lt;br /&gt;
&amp;lt;element ref=&amp;quot;target:first&amp;quot;/&amp;gt; &lt;br /&gt;
An XML Schema Document Referencing Globally Defined Declarations&lt;br /&gt;
&amp;lt;xsd:schema&lt;br /&gt;
   xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;br /&gt;
   elementFormDefault=&amp;quot;qualified&amp;quot;&lt;br /&gt;
   targetNamespace=&amp;quot;http://www.wbex.ru/namespaces/pub&amp;quot;&lt;br /&gt;
   xmlns=&amp;quot;http://www.wbex.ru/namespaces/pub&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:element name=&amp;quot;publications&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;
       &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;xsd:element ref=&amp;quot;book&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
      &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
    &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;xsd:element name=&amp;quot;book&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;
       &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;xsd:element ref=&amp;quot;title&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;xsd:element ref=&amp;quot;author&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;xsd:element ref=&amp;quot;description&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
       &amp;lt;xsd:attribute name=&amp;quot;isbn&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
    &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;xsd:element name=&amp;quot;title&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:element name=&amp;quot;author&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:element name=&amp;quot;description&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xsd:schema&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Local and Global Declarations==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;xsd:schema xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;xsd:element name=&amp;quot;animal&amp;quot; type=&amp;quot;endType&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;xsd:element name=&amp;quot;name&amp;quot; type=&amp;quot;xsd:string&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;xsd:complexType name=&amp;quot;endType&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
      &amp;lt;xsd:element name=&amp;quot;animal&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
            &amp;lt;xsd:element ref=&amp;quot;name&amp;quot; minOccurs=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;xsd:element name=&amp;quot;source&amp;quot; type=&amp;quot;xsd:string&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
      &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;
    &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
  &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
  &amp;lt;xsd:complexType name=&amp;quot;habitatType&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
      &amp;lt;xsd:element name=&amp;quot;river&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
            &amp;lt;xsd:element ref=&amp;quot;name&amp;quot; minOccurs=&amp;quot;1&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;xsd:element name=&amp;quot;source&amp;quot; type=&amp;quot;xsd:string&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
      &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;
    &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
  &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
&amp;lt;/xsd:schema&amp;gt;&lt;br /&gt;
Globally components appear on the first level below the xsd:schema element.&lt;br /&gt;
You can have two locally declared elements with the same name but different definitions.&lt;br /&gt;
Their context keeps them distinct. &lt;br /&gt;
Global element declarations must have unique names. &lt;br /&gt;
You must reference a global element in order to have it appear in a corresponding XML document.&lt;br /&gt;
When you define a complex type, you can either reference existing globally declared elements, or you can declare and define newelements on the spot. &lt;br /&gt;
Locally declared elements are limited to the complex type definition in which they are declared.&lt;br /&gt;
Locally declared elements may not be used elsewhere in the schema.&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== XML Schema Structures==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;xsd:schema&lt;br /&gt;
  xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;br /&gt;
  elementFormDefault=&amp;quot;qualified&amp;quot;&lt;br /&gt;
  targetNamespace=&amp;quot;http://www.wbex.ru/namespaces/pub&amp;quot;&lt;br /&gt;
  xmlns=&amp;quot;http://www.wbex.ru/namespaces/pub&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:element name=&amp;quot;publications&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;
       &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;xsd:element name=&amp;quot;book&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
          &amp;lt;xsd:element name=&amp;quot;title&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;xsd:element name=&amp;quot;author&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;xsd:element name=&amp;quot;description&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
         &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
        &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;
       &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
      &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
    &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;
&amp;lt;/xsd:schema&amp;gt;&lt;br /&gt;
XML Document Instance&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;publications&amp;gt;&lt;br /&gt;
  &amp;lt;book&amp;gt;&lt;br /&gt;
   &amp;lt;title&amp;gt;Mastering XHTML&amp;lt;/title&amp;gt;&lt;br /&gt;
   &amp;lt;author&amp;gt;B&amp;lt;/author&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;XML.&lt;br /&gt;
   &amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;/book&amp;gt;&lt;br /&gt;
  &amp;lt;book&amp;gt;&lt;br /&gt;
   &amp;lt;title&amp;gt;Java&amp;lt;/title&amp;gt;&lt;br /&gt;
   &amp;lt;author&amp;gt;A&amp;lt;/author&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;Java&amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;/book&amp;gt;&lt;br /&gt;
&amp;lt;/publications&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>