ITYourself! - компьютерная документация, книги, мануалы, it-тематика

??? ????? XML?

E-mail Печать PDF
Рейтинг пользователей: / 0
ХудшийЛучший 
Индекс материала
??? ????? XML?
?????????? ????? ??????????????? ???????.
?????????? XML
????????? XML-?????????
8.1.3.2. ?????? ? ?????????
8.1.3.3. ???????????
8.1.3.4. ????? ? ??????
Page 8
8.1.3.6. ?????? CDATA
??????? ? ?? ??????????
?????????? ???? ?????????
8.1.6. ?????? XML-?????????
8.2.1. ????? ????????
8.2.2. ?????????? ????? ?????????
8.2.3. ?????????? ??????? ?????????
8.2.4. ?????????? ???????
8.2.5. ?????? DTD
8.2.6. ??????????????? ???????
8.2.7. ???????? ??????
XML-????? - ?????????, ?????????? ?? ???????????? ?????
8.3.3. ??????? ???????? ???????????? ????
8.3.4. ??????? URI ?????????? XML-?????????
???????? ???????: ????????
2.1 ????? ?????? ?? ???????
2.2 ??????????? ??????????? ?????, ?????????? ????????? ? ?????????
2.2.1 ??????????? ?????????
2.2.2 ?????????? ???????? ? ????????
2.2.3 ????????? ????
2.3 . ??????? ????
2.3.1 ??? List
2.3.2 ??? Union
2.4 ??????????? ????????? ?????
2.5 ?????????? ????????
2.5.2 ????????? ??????????
2.5.3 ?????? ??????????
2.6 ?????????
Page 37
2.8 ?????? ?????????
2.9 ???????? Nil
3 ?????????????? ??????? I: ??????? ????????????, ????? & ????????????
3.1 ??????? ??????? ???????????? ? ?? ??????????????? ????????? ???????
3.2 ??????????????? ????????? ???????
3.3 ?????????? ?????????? ? ????????? ? ?????????? ????????????
3.4 ????????????? ??????? ??????? ????????????
4 . ?????????????? ??????? II: ????????????? ????? ?? ???????
4.1 ????? ? ?????????? ??????
4.2 ????????? ??????????? ????? ???????????
4.3 ????????????? ??????????? ????? ? ??????????
4.4 ??????????? ??????? ????, ?????????? ????? ???????????
4.5 ??????????????? ????? ? ?????
4.6 ?????? ??????
4.7 ??????????? ???????? ? ????
4.8 ?????????? ????????? ? ?????????????? ??????????? ?????
5 ?????????????? ??????? III: ??????????? ?????
5.1 ??????????? ????????????
5.2 ??????????? ?????? ? ?????? ?? ???
5.3 ??????????? XML-????? ? ????????? ? ????????? ID XML 1.0
5.4 ?????????????? ?????
5.4.1 ?????????? ?????
5.5 ????? ???????, ????? ???????
5.6 schemaLocation
5.7 ????????????
A ?????????????
B ??????? ???? ? ?? ??????
C ????????????? ?????????
D ?????????? ?????????
Все страницы

??? ????? XML?

XML (eXtensible Markup Language)- ??? ?????????? ??????? ????? SGML, ??????????????? ??? ???????? ????????????? ???????? ?????? ? World Wide Web. ?? ??????????????? ??????? ??????? W3C ? 1996 ?.; ? ????????? ????? ???????? ????????????? ???????? ?????? ???????? ????? XML 1.0 (??????? 2000 ?.), ?? ??????? ? ????????????? ?????????? ?????????.

Standard Generalized Markup Language (SGML) ??? ????? ????????, ?? ??????? ????? ?????????? ???? ???????? ??? ??????????. SGML - ????????? ?????????????? ? 1960 ???? ? IBM ????? GML (Generalized Markup Language

SGML - ??? ??????? ??????????? ?????? ????????. ?????? ????????? ???? ?????????, ??????????? ?????????? ? ?????????, ????????????? ? ????????? ? ????? ?????????. HTML ???????? ????? ?? ???????? ????? ????????.

HTML ?? ???????? ?????? ??????????.

???? HTML ??? ?????? ??? ???????? ????????? ?????????? (????????, ?????????, ??????, ?????? ? ?.?.) ?, ? ????????? ???????, ?????? ?? ??????????? (?????????? ?????, ????????? ????? ? ?.?.). ?? ?? ? ???? ???? ?? ???????????? ??? ???????? ?????? ?????????? ?? ??? ??????????, ? ?? ?????? ??????? ?????? ?????? ?????????? ???????? ?????????, ????-?? ???????? ?????? ??? ??????? ??????????. ??????? ????????? ????????????? ? ????? ???????? ??????, ?????? ??????, ?????????????? ? ????????????? ?????????.

????? ?????????? ?????????? ??????? ????? ??????.

??? ?? ????????? ?????????? ?????????? ????????? ? ????????? ?????? ?? ?? ?????????? ??????. ????????, ??? ??? ????? ??? ?????? ???? ?????? ?????????, ????????? ? ????. ??????? ?????? ?? ????? ?????? ???????? ? ????, ??? ? ?????? ?????? ???? ?????? ? ???? ??????, ??????? ???????????? ? ?????????, ???????? ?? ??? ????? ? ?.?. ??????? ??????? ???? ?? ??????????????? ??????????? ????? <AUTHOR>, ????? ???????, ??? ?????? ? ???.


?????????? ????? ??????????????? ???????.

???????? ??????, ??? ? ??? ?? ????? ????????? ????????? ?????????, ??????? ???? ?????????? ?????? ???????. ??????, ???? ??? ???????? ?????? ?? ??????????, ?? ????? ??? ?? ???. ??????? ????????? ?????? ???????? ????, ??? ?????? ?????? ??????? ?????????? ?????? ?????? ? ?????? ?????????????? ??????????????. ??? ????? ?????????? ????????????????? ? ???????? ??????? ?????????????? ???-???????.

XML- ??? ??????? ?????? ????????????? ???????? ????? ???????? ???????? ????? ????????, ???????????? ???????????? ????????????????? ??????. ?????? ??????, ??? ????????, ?? ??????? ??????? ?????????????????? ?????, ??????????? ?????? ???????????? ?????????. ????? ????? ?????????? XML-?????????. ? ??????? ?? HTML, XML ?? ???????? ??????? ???????? ?? ??, ??? ????????? ? XML-????????? ?????? ?????? ????????????. ?????? ??????????? ?????? ??? ????????? ????????? ???????? ?????? ???????? ?????? XSL, ??????? ?????? ??? XML ???????? ?? ?? ????, ??? CSS ?? HTML. ?????? ?????????????? ??? ??????? ?? HTML ??????? ? ???, ??? XML ????? ????????? ????? ????, ??????? ?????? ?????? ???????????? ????????? XML-???????. ???????? ?????? ???? ?????????? ?????????????????? ?????? ?? ???? XML, ??????? ??????? ????????? ? ?????? ??????? ?????????? ???????? ???????? W3C:

MathML- ???? ?????????????? ??????;

SMIL- ???? ?????????? ? ????????????? ?????????????? ???????;

SVG- ???? ????????? ????????? ???????;

RDF- ???? ???????????? ????????;

XHTML- ???????????????? HTML ? ???????? XML.

??????? ????????? XML-????????? ??????? ? ?????????. ??? ????? ????????????? ??????????? ??????????, ??????? ?????????? XML-???????????. XML-????????? ?????? ?? ????? ? ????????? ?????? ? ?????????; ?? ?????? ?????????? ?????????????? ?????? (parsing) ?????? ????????? ? ????????? ??? ???????????? ? ????? ????? ?????? XML. ???? ???????? ????????? ???????? (well-formed), ?? ?????????? ??????? ?????? ?????????? XML-??????????? ?????????? ?????????, ??????? ????????? ?? ?????????????? ?????????; ???? ?? ???????? ???????? ???????, ?.?. ???????? ?????????????? ??????, ?? XML-????????? ?????? ???????? ? ??? ????????????.


?????????? XML

????????? ??????: ? ????? ????? ? ????????????? "??????? ?????", ????????? ???????????? ??????????? ???? ? ???, ???, ???????? ?? ??????? ????????, XML ???????? ?????????? ??????????? ??????????? ???????? ???????????? ??????, ????????? ??????????? ???????? ????????????? ????????? ?????? ?????????, ?, ????? ???????, ????????????? ?????? ???????? ??? ??????????, ???????? ??????, ?????? ?? ?? ???? ??????? ???? ??????. ??????????? ????????? ?? ????????? ?????? ?????????? ????? XML.

???????????? ????????? ??????

????????????? ???? ??????????? ????????? ????????????? XML ??? ?????????-??????????? ???????? ???????? ? ????????????? ??????????, ??????? ? ????????? ? ??????? ???????????? ???????????? (? ?????????, ? ???????????? Java) ???????? ????? ??????? ??? ???????? ????? ???????-??????????? ??????????, ? ?.?. ??? ?????? ??????? ????? ???????? ? ????????. ????? ????, ??????? ??????????????? ??????? ????? ???????? ?? ???? XML ????? ????????? ????????? ??????????? ????? SQL.

????????????????, ??????????? ??????????

XML-????????? ????? ??????? ???????????? ??? ?????????? ?????????? ?? ???????????? ??????????? ? ???????????. ? ???? ?????? ???????? ??????? ?? ?????? ?? ?????????? ????????????????? ?????????? ? ?????? ????????? ??????, ??????? ??????????? ? ???????? ??????????? ???????? ?? ??????.

????????????? ???????????

??????????? ???????????????? ?????????? ?? ????????????? ???????????, ??????? ? ?????? ?????? ????? ?????????? ? ?????? ????? ? ??????? ?????????? ??????????????? ???????????. ??????? ??? ????? ?????? ????????????? ???????????, ???????, ? ???? ???????, ??????? ?????????????? ??????? ? ?? ???????? ? ???????????? ?????????????. ???? ??? ????????? ????????, ??? ? ????????? ??????? XML-????????? ???????? ????????????? ????????????????? ??????? ???????? ??????????? ? ???? ???????? ???????.

????????? ??????

????? ????, ??? ?? ?????????? ????????? ?????? XML, ????????????? ???????? ???????? ????????? ????, ??????????????? ??? ??????. ?? ???? ???????? ???????? ??????????? ??????? ??? ???????? ????????? ?????? (??????? ???????? ?? ????????????, ????????????? ? ?????? ??????? ? ?.?.) ????? ???? ????????????????, ???????? ????????????? ??????????????? ?? ????????????? ?????? ???????????? ????????.


????????? XML-?????????

XML-???????? ??????? ?? ??????????, ?????????, ????????????, ??????????? ???????? ? ????????. ??? ??? ???????????? ????????? ??????? ? ?????? ?????.

8.1.3.1. ???????? ? ????????

XML- ??? ??????? ???? ???????? ??????????. ????? ???????, ????? ???????? ?? ????? XML ???????????? ????? ????? ?????????, ?????? ?????? ? ????? ??????? ???????? ???????????? ???????????? ?????????, ??????????? ??????.

??????? ??????? ?? ???? ??????:

?????????? ????, ??????????? ? ????????? ????.

???- ??? ?????, ??????????? ? ??????? ?????? "<" ? ">". ???????? ??? ????? ?? ?? ???, ??? ????????? ???, ?? ?????????? ? ????? ????? "/". ?????? XML-????????:

<?????>????????? ??????</?????>

????? ????????? ??????? ?? ????????, ?.?. <author>, <Author> ? <AUTHOR>- ??? ????? ????????? ?????????. ??????? ???????????? ???? ?????? ???????????. ???? ??? ???????? ??????, ?. ?. ?? ????? ??????????? ? ???????????? ????, ?? ?? ????? ??????????? ?????:

<???????/>

????? ??????? ????? ????? ????????, ?????????? ?????????????? ?????????? ?? ????????. ???????? ?????? ?????????? ? ????????? ??? ???????? ? ????? ???:

???_????????="????????_????????"

???????? ?????? ????? ????????, ??????? ?????? ?????? ???? ????????? ? ????????? ??? ??????? ???????. ????? ????????? ????? ??????? ?? ????????. ?????? ????????, ???????? ???????:

<????? ??????="??????">??????</?????>

???????? ?????? ???? ????????? ???? ?? ??????, ???? ???? ??????? ???? ? ??????:

<?????>
 <????? isbn="5887821192">
 <?????????>??????? ??????</?????????>
 <?????>??????</?????>
 <???????/>
 </?????>
 <????? isbn="0345374827">
 <?????????>?????</?????????>
 <?????>???????????</?????>
 <???????/>
 </?????>
</?????>

????? ??????? (?????) ???????? ??? ????????? ???????? (?????), ???????, ? ???? ???????, ????? ??????? isbn ? ???????? ??? ???????????????? ????????: ?????????, ????? ? ???????, ?????? ????????? ????, ?.?. ? ?????? ?????? ????????????? ??????????? ??????.

?? ???????????? ???????? ?????, ??? ????????? XML ?????????? ????????? HTML (??? ???????????, ?.?. ??? ??? ???????? ?????????? ?????? ????? SGML), ?? ?????????? ? ?????????? ?????????? XML-?????????? ????. ??? ????? ????? ?????? ???????? XML ?? HTML ???????? ??, ??? ?????????? ?????????, ?.?. ???, ??? ?????????? ????? ????????? ? ???????? ??????, ????????? ???????. ??? ????????, ??? XML ?? ?????????? ??????? ??????? ? ??????? ?????, ??? ??? ?????? HTML.


8.1.3.2. ?????? ? ?????????

????? XML-???????? ??????? ?? ??????? ? ????????? ????????, ????????:

<?xml version="1.0"?>
<?????>
 <????? isbn="5887821192">
 <?????????>??????? ??????</?????????>
 <?????>??????</?????>
 <???????/>
 </?????>
</?????>
   

? ???? ??????? ?????? ???????? ? ???????????? ????????? (?????? ?????? ?????????), ??????????? ?????? XML. ?? ??? ??????? XML-??????? ? ?????????? ??????, ??????? ???????? ? ???? ??? ????????? ???????? ? ?????????? ????????. ????????? (processing instruction)- ??? ?????????, ??????????? ? ??????????? ???? "<?" ? "?>", ??????? ???????? ???????? ?????????, ?????????????? XML-????????.

???????? XML ??????????? ?????? ???? ????????? <?xml version="1.0"?>, ??????????? ?? ?????? ????? XML, ??????? ????????????? ?????? ???????? (?????? ?????? XML ???? ???). ? ????????????????, ??? ????????? ????????? ?????? ? ? ????? ????? ???? ???????? ???:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>

????? ??????? encoding ?????? ????????? ???????? ?????????. ?? ????????? ?????????, ??? XML-????????? ?????? ??????????? ? ??????? UTF-8 ??? UTF-16. ???? ?? ???????????? ?????-???? ?????? ????????? ????????, ?? ?? ???????? ???????? ??????? ?7.1 ?????? ???? ??????? ? ?????? ????????, ??? ???????? ? ???????. ??????? standalone ??????? ? ???, ???????? ?? ?????? ???????? ??????? ???????. ???????? yes ????????, ??? ????? ???????? ???, ???????? no- ??? ??? ????.

? ????? ??????, ?????? ????? ????????? ????? ?????????? ???? ?????????.


8.1.3.3. ???????????

XML-????????? ????? ????????? ???????????, ??????? ???????????? ???????????, ?????????????? ????????. ??????????? ???????? ?? ??? ?? ????????, ??? ? ? HTML:

????????? ??????????? ? ???????? "<!--",

?????????? ??????????? ????????? "-->",

?? ??????????? ?????? ??????????? ???????? "--".

?????? ????????????:

<!-- ??? ??????????? -->
<!-- ? ??? ??? ???????????,
 ?????????? ????? ????? ?????? -->

8.1.3.4. ????? ? ??????

??? ????? ?????????, ????????? ? ???????? ?????? ?????????? ? ????? Unicode ? ???????? ?? ????, ????, ???????? ????? (.), ????????????? (_) ? ?????? (-). ???????????? ??????????? ??????? ? ???, ??? ??? ?? ?????? ?????????? ? ?????????? ???? xml ? ????? ????????; ???????? ????? ??????????????? ??? ??????? ?????????? ?????. ???????????, ??? ???????? ????????? ????????????? ? ?????? ?? ?????? ?????????? ????, ?? ? ????? ??????, ???? ???????????? XML-?????????? ????? ?????????? ???? ????????? ?????????, ??????? ? ??? ???????? ???????????. ??????? ?? ? ????? ???????? ????? ????? ??-?????????.

??????, ?.?. ?????????? ????????? ? ???????? ?????????, ????? ???????? ?? ????? ????????, ????? ????????????? ? ????????? ???????.


8.1.3.5. ??????????? ???????

??? ???????? ? ????? XML ?????????????? ? ?????? ?????????????? ??????????? ???????:

????? ??????? ?????? ("<")

<

?????? ??????? ?????? (">")

>

????????? ("&")

&

??????? ??????? (") ? ????????? ?????????

"

????????? ??????? (') ? ????????? ?????????

'

??? ??????? ????? ???????????? ???????? ?????????? ???????? ? ????????? Unicode. ??? ???? ?????? ????? ???? ????? ????? ?????????? ????? (&#???;) ??? ????????????????? ????? (???;). ???????? ???????????? ?????? ?????????? ????? c, ? ? - ??????? ????? ?. ??? ?? ?????? ? ??????????, XML ??????? ??????, ??? HTML, ? ????????????? ???????? ???????????, ????????? ????????? ???????????? ??????????? ? ????? ?????????? ????? ?????????? ?????????.


8.1.3.6. ?????? CDATA

??? ????? ???????? ????????? ? ?????????? XML-????????? ???????????? ???????? ???????? ????????????? ?.?. ?????? CDATA (????. ?? Character DATA, ?.?. ?????????? ??????). ????????, ??? ?? ????? ??????? ?????????? ???????? layout ???????? HTML-??????, ????????:

<layout>
 <H1>?????????</H1>
</layout>

???????? ??????????? ???????, ?.?. HTML-??? H1 ????? ? ?????? ?????? ????????? ??? ??? XML. ??? ????, ????? ??? ?????????? ???????? layout ?????????????? ??? ??????, ?? ?????? ????????? ??? ? ?????? CDATA:

<layout>
 <![CDATA[<H1>?????????</H1>]]>
</layout>

??? ?? ????? ?? ????? ???????, ?????? CDATA ??????????? ? ???????????? <![CDATA[ ? ]]>. ??? ?????? ???? ?????? ????????? ??????????? ???????; ? ?????????, ?????? CDATA ?? ????? ???????????? ???? ? ?????.


??????? ? ?? ??????????

??????? XML-?????????

????????? XML-???????? ????? ???????? ?? ????????? ???????? (entities). ??? ???? ???????? ??????? ????????? ????? ???????? ????????, ??????? ?????????? ???????? ?????????, ???? ?? ????? ?????????? ?? ????????. ??? ??????? ????? ??????????; ??? ???, ????? ??????? ????????? ? ??????? DTD, ????? ???.

? ????? ?????? ??????????????? ??????? ????????? ??????? ?????????????? ?? ????????????? ? ???????????????. ??????????????? ?????? (unparsed entity)- ??? ??????, ?????????? ???????? XML-????????? ???????????? ??? ??????? ?????? ??? ?? ??????????????? ??????? (????????, ?????, ?? ?????????? XML-??????????). ??????????????? ??????? ?????? ????? ???????, ??????????? ?? ?? ??????. ????????????? ??????? (parsed entities) ????????????? ??? ????????? ???????????: ?????? ???, ????? XML-????????? ????????? ? ????????? ??? ?????? ???????, ?? ???????? ??? ?? ?????????? ????? ???????.

8.1.4.2. ?????????? ???????

?????????? ???????? ?????????????? ?? ?????????? ? ???????. ?????????? ??????????? ??????? ???????? ???:

<!ENTITY ??? ????????>

??? ???????? ? ???? ?????????? ??????? (???????? ????????) ? ???????????? ??? ??????????? ????? ???????? ?????? ????? ???????. ?? ?????, ????????, ?????? ? ?????? ? ??????? ??????? ???? ? ???????????? ??? ??????? ????? ?????????? ???????:

<!DOCTYPE spec [
 <!ENTITY pr "?????">
 <!ENTITY po "??????">
]>
<books>
 <book genre="&po;">
 <title>????? ????</title>
 <author>????????, ?????</author>
 </book>
 <book genre="">
 <title>???? ????????</title>
 <author>????????, ??????</author>
 </book>
</books>

?? ????? ??????? ?????, ??? ?????? ?? ?????? (entity reference) ???????? ????? ??? ??, ??? ?????? ?? ??????????? ??????, ?.?. ????? ??? &???;. ?? ????? ????, ??????????? ???????- ??? ????? ????? ?? ??????, ?? ??????????????? ??????? ?????? ?????? ?? ?????????? ?????????? ????? XML. ???????? ????????? ??????????? ?????? ??? ??????? ??????????, ??????????? ????????? ????? ?????????, ? ??? ???????? ??????????? ??? ????? ?????????? ????? ?????????. ???, ????????, ?? ????? ??????? ?? ?????????? ?????? ???? ????????? ??????? ?????????? ? ????? ???????? ?????? ???????? ????? ???????.

8.1.4.3. ??????? ???????

?????????? ??? ???????? ?????????? ???????? ???????:

<!ENTITY ??? SYSTEM URI [NDATA ???????]?>
<!ENTITY ??? PUBLIC ??????? URI [NDATA ???????]?>

?????? ??????? ?????????? ????????? ????????, ??????- ????????? ????????. ??? ??? ????????? ??? ??????? ? ??????? ????????, ???????? ????? URI, ??????? ?????? ????? ???????????? ????? ? ?? ????????? ????????.

URI (????. Uniform Resource Identifier) - ????????????? ????????????? ???????. ?? ?????????? ????? ???????????? ??? [?-??-???], ??-?????? ???? ??????? [????]. URI - ??? ???????? ?????????????????? ????????, ???????????????? ??????????? ??? ?????????? ??????. ????? ????????? Universal Resource Identifier - ????????????? ????????????? ???????.

URI ???????? ??????? ?????????? ????????? ??????????????? ???????. ????????????? ???????? ??????? ??????? ?? ?????????? ????????:

  • ???? ?????????? ???????? ???????? NDATA, ???????? ??????? ???????, ?? ?????? ???????? ???????????????.
  • ???? ???????? NDATA ?? ?????, ?? ?????? ?????????????, ? ??????????????? ?????? ?????? ???? XML-??????????. ??? ????????, ??? ?????? ?????? ?? ?????? ? ????? ????????? ????? ?????????? ????? ???????????????? ???????.
  • ????????? ?????? ????? ????????? ??????, ???????? ????????? ????????????? ???????. XML-????????? ????? ???????????? ???? ????????????? ??? ????????? ??????????????? URI ??????? ???????. ???? ??? ??? ?? ???????, ?? ?? ?????? ???????????? ????????? ????????????? ??? ???????? ??????????? ???????.

??????? ?????????? ??????? ????????:

<!-- ??????????????? ??????: GIF-????? -->
<!ENTITY photo SYSTEM "images/photo.gif" NDATA gif>
<!-- ????????? ????????????? ?????? -->
<!ENTITY hatch SYSTEM "http://www.textuality.com/boilerplate/hatch.xml">
<!-- ????????? ????????????? ?????? -->
<!ENTITY hatch PUBLIC "-//Textuality//TEXT Standard hatch boilerplate//EN"
 "http://www.textuality.com/boilerplate/hatch.xml">

??????? ????????????? ?????? ?????? ?????????? ? ????????? <?xml :?>, ??????? ????? ?? ????????? ?????? ??????, ?? ??????? ????????? ????????? ????????. ??? ????????? ?? ?????? ? ?????? ?????????????? ??????.


?????????? ???? ?????????

?????????? ???? XML-????????? (document type declaration) ???????? ??????????? ???? ????????? (document type definition, DTD) ??? ????????? ?? ????. DTD- ??? ??????????? ??????????, ??????????? ????????? ????????????? ?????? ??????????; ??????? ???????? DTD ??????????? ? ??. 8.2. ????? ?? ?????????? ?????? ???????? ??????????, ??????? ???????????? ?????? ? DTD. ?????????? ???? ?????????, ??? ? ?????????? ???????, ????? ???? ?????????? ??? ???????. ?????????? ?????????? ????? ???:

<!DOCTYPE ??? [ ???? ]>

? ???????- ?? ?? ??? ????????, ??? ? ??????? ???????:

<!DOCTYPE ??? SYSTEM URI [ ???? ]>
<!DOCTYPE ??? PUBLIC ??????? URI [ ???? ]>

????? ???????, ??????? ?????????? ???? ????????? ?? ?????????? ??????? ??????? ?????? ? ???, ???:

  • ??? ?????????? ? ????????? ????? !DOCTYPE, ? ?? !ENTITY;
  • ??? ????? ????? ????, ??????????? ? ?????????? ??????.

??? ????? ?????????? ?????? ????????? ? ?????? ????????? ????????, ??????? ??? ?????????, ? ???? ?????? ??????????????? ???????? ?????????? DTD ? ????? ??????? ? ??. 8.2. ???? ???????, ??? ??? ????? ????????? ?????????? ????????. ?????? ?????????? ?????????? ??? ???????? ? ?. 8.1.4.2. ??????? ??????? ??????????:

<!DOCTYPE spec SYSTEM "xml/1998/06/xmlspec-v20.dtd">
<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification V2.0//EN"
 "/XML/1998/06/xmlspec-v20.dtd">

???????, ??? ??????? ?????????? ???? ????????? ????? ????????? ? ?????? ?? DTD, ??????? ?????????? ??????? ????????????? DTD, ? ????, ??????? ????????? ?????????? ? ??????? DTD (??? ?????????? ?????????? ????????????? DTD).


8.1.6. ?????? XML-?????????

????? ??????? ??? ????????? ???? ??????? ? ?????? ?????, ???????? ?????? ???????????? XML-?????????, ??????????? ??????????? ???????? ????????.

<?xml version='1.0' encoding="windows-1251" standalone="yes"?>
<!DOCTYPE bookstore [
 <!ENTITY po "??????">
 <!ENTITY pr "?????">
 <!ENTITY dr "???????????">
]>
<!-- ???? ???? ???????? ???????? ???? ?????? ???????? ???????? -->
<bookstore>
 <book genre="≺">
 <title>???? ??????????</title>
 <author>
 <first-name>??????</first-name>
 <last-name>????????</last-name>
 </author>
 <price>60.00</price>
 </book>
 <book genre="&po;">
 <title>????? ????</title>
 <author>
 <first-name>?????</first-name>
 <last-name>????????</last-name>
 </author>
 <price>55.00</price>
 </book>
 <book genre="&dr;">
 <title>????????</title>
 <author>
 <name>??????</name>
 </author>
 <price>103.50</price>
 </book>
</bookstore>

??? ?? ???? ???? XML ?? ?????? ???????? ????????? XML-??????????, ??? ?????????? ??? ?????? ??????? ????? ????????????. ????????? ??????, XML ???? ?????????, ????????, ????????? ????? ????? ? ???????? "????", ??, ??? ???????? ?????? ??????, ???? ??? ?? ????? ????????????. ????? ???????, ??? ?????????? ????????????? ??????????? XML-?????????? ?????????? ????? ???????? ??? ?????????.

?????????????? ???????? ???????? ??, ??? ????????????? ???????????? ????? ????????? ???????? ?????????? ???????, ???????????? ????????? ??????????? ?????? ????????? ? ???? ??????. ? ??????? ??? ??????????? ?????????? ????? ???? ?? ???? XML. ???????????? ????? ?????? ???????? XML-?????. ????? ????, ??? ?????? ?????????? XML-????????? ????? ????????? ????????? ?????, ????????? ???????? ???????????? ????, ?.?. ???? ???????? ????? ???????????? ????????? ????.

?????????? ????????? ??????, ?? ??????? ????? ??????? ????? ???????. ????? ????????????? ?? ?????? ?????? ????????? ???? XML Schema, ??????????? ????? ???????????? DTD (Document Type Definition), ??????????? ???????? ??????? ????????. ????? ?? ??????????? XML Schema ???????? ??, ??? ???? ???????? ????? ???????? XML- ??????????, ??????????????? ?? ???????????? ????????. ?????? ??????? ????? ? ????, ??? ???????? XML Schema ???? ?????????? ??? ?? ??????.

????? ?? ????????? ?????????? ????????? ???????? ???????????? XML-???? ?? ??????? CommerceML.ru, ? ???? ??????? ????????? ????? ???????.

??????????? ???? ?????????


8.2.1. ????? ????????

??? ???????? ?? ?????? XML ?????????????????? ?????? ?????????? ?????????????? ???????? ???????? ???? ??????. XML ???????????? ??? ????????? ???????? ????????: ??????????? ???? ????????? (document type definition, DTD) ? XML-????? (XML schema).

????????? DTD ????????????? ???????? ????? SGML. DTD ?????? ??? ???????, ?? ??????? ?????????? ?????????????? ?????? XML-?????????. ?????? DTD ????????? XML-?????????? ????????? ?? ??????, ????????? ?? ???????? ????????, ?? ? ????????????? ?? ?? ???????? ??????????? ?????. ?? ????????? ? DTD ??? XML-?????????? ??????? ?? ?????????????? (validating) ? ???????????????? (non-validating). ???????????????? ????????? ????????? ???????? ?????? ?? ???????????? ??????????; ??????????????, ????? ????, ????????? ??? ?? ???????????? ???????? ? ?????????? ???? ????????? DTD. ????????, ????????? ????? ????????, ?????????? ?????????? (valid).

DTD ???????????? ????? ????? ??????????, ??????? ????? ????

??? ?????????? ????? ??????????? (??? ??? ????????) ? ??????????????? ????????.


8.2.2. ?????????? ????? ?????????

?????????: <!ELEMENT ??? ????????????>

?????????? ???? ???????? ??????????, ????? ?????????? ????? ????? ??????? ? ?????? ??????. ????????? ?????????? ???????? ???????? ?????????????, ??????? ????? ????:

  • ???????? ?????? EMPTY, ??????????, ??? ??????? ????, ?.?. ?? ????? ????? ???????????;
  • ???????? ?????? ANY, ??????????, ??? ??????? ????? ????? ????? ??????????;
  • ??????? ?????????-?????;
  • ????????? ??????????.

?????? ?????- ??? ??????????? ? ??????? ?????? ?????? ???? ????????? ??? ?????? ?? ??????????????? ???????, ??????? ????? ??? ?????? ??????????? ? ?????? ????????. ?????? ????? ????? ????? ????????? ?????????, ? ???? ??????? ??????????? ? ??????? ??????. ???????? ??????? ??????????? ????????. ?????? ??? ???????? ??? ????????? ????? ?????????????? ???????????? ?????????:

  • ???? (+) ????????, ??? ?????? ??????? ????? ??????????? ???? ??? ????? ???;
  • ????????? (*) ????????, ??? ?????? ??????? ????? ??????????? ???? ??? ????? ???;
  • ?????????????? ???? (?) ????????, ??? ?????? ??????? ????? ??????????? ???? ??? ???? ???;
  • ?????????? ???????????? ??????? ????????, ??? ?????? ??????? ?????? ?????????????? ????? ???? ???.

????????, ??? ????????? book ? bookstore ?? ?????????? ????? ?? ????? ???????? ????? ?????????? ?????:

<!ELEMENT book (title, author+, price, present?)>
<!ELEMENT bookstore (book*)>

????? ???????, ??? ??????? book ??????? ?? ?????? ???????? title, ?????? ??? ?????????? ????????? author, ???????? price ? ??????????????? ???????? present, ? ??????? bookstore ??????? ?? ?????? ?????????? ????????? book.

??????? author ????? ????? ??????? ????????: ?? ????? ???????? ???? ?? ???? ????????? first-name ? last-name, ???? ?? ????????????? ???????? name. ???????? ???????? ?????????? ? ?????? ????????? ? ??????? ??????????? ???????????? ????? (|), ????????, ? ?????? ??????:

<!ELEMENT author ((first-name, last-name) | name)>

????????? ????????? ???????????? ? ??? ???????, ????? ??????? ?????? ?????? ????????? ????? ????? ????????? ??????????. ???? ?? ????? ?????? ?????????? ??????????, ??? title ? ????? ???????, ?? ??? ?????????? ????? ???:

<!ELEMENT title (#PCDATA)>

???????? ????? #PCDATA ?????????? ?? ?????????????? "parsed character data", ?.?. ???????????? ?????????? ??????, ?????????? XML-???????????. ? ????????? ??????? ??????? ????? ????? ?????????? ?????????? ?????????? ? ??????????. ????????, ???????? ?????????? ??????? ????? HTML, ?? ????? ?? ?????????? ??????? P (?????), ??? ?????, ????????? ???????? ????? ???? ???????? ????????? ??? ?????????? ??????? (???????? I ? B ??????????????). ????? ??? ?????????? ????? ?? ????????? ???:

<!ELEMENT P (#PCDATA|B|I)*>

???????? ?????? ?????? ?????????? ? #PCDATA ? ????? ????? ???? ?????????: ??? ????????, ??? ???????? ?????? ????? ??????????? ?????? ????????????? ???????? ???????????.

??????? ????????????? ?????? ?? ??????????????? ??????? ? ??????? ????????? ????????? ????.


8.2.3. ?????????? ??????? ?????????

?????????: <!ATTLIST ??? ????????????_????????*>
 ????????????_????????: ??? ??? ?????????

?????????? ?????? ????????? ????????? ?????? ?????? ?????????? ????????? ??? ???????? ? ?????? ??????. ??? ??????? ???????? ?? ?????? ??????? ??? ???, ??? ? ?????????????? ?????????).

8.2.3.1. ???? ?????????

???????? ? XML ?????? ???? ?????: ?????????, ??????? (tokenized) ? ?????????.

  • ????????? ???????? ????? ????????? ????? ????????? ???????? ? ???????????? ???????? ?????? CDATA.
  • ?? ??????? ???? ???????? ???????????? ??????????? ? ????????????? ???????????. ??? ???? ???????? ?????????? ????????? ???????:
    • ID- ?????????? ????????????? ????????. ??????? ????? ????? ?? ????? ?????? ???????? ????? ????; ????????? ??? ???? ?????? ????? ???????? #IMPLIED ??? #REQUIRED.
    • IDREF- ???????? ???????? ???? ID ??????? ????????.
    • IDREFS- ?????? ???????? ???? IDREF, ??????????? ?????????.
    • ENTITY- ??? ???????????????? ???????, ???????????? ? DTD.
    • ENTITIES- ?????? ???????? ???? ENTITY, ??????????? ?????????.
    • NMTOKEN- ????? ???.
    • NMTOKENS- ?????? ???????? ???? NMTOKEN, ??????????? ?????????.
  • ????????? ???????? ????? ????????? ???????? ?????? ?? ????????? ??????. ??? ?????????????? ??:
    • ????????????: ?????? ????, ??????????? ?????????, ??????????? ? ??????? ??????; ???????? ??????? ????????? ? ??????? ??????????? ???????????? ????? (|).
    • ?????? ???????: ???????? ????? NOTATION, ?? ??????? ??????? ???????????? ???? ???????. ??????? ????? ????? ?? ????? ?????? ???????? ????? ????; ?????????? ???????? ????? ???? ?????? ????? ???????, ??????????? ? DTD.

8.2.3.2. ?????????????? ????????? ?????????

????????? ????????? ????? ????????? ????????? ????????:

  • #REQUIRED- ????????, ??? ??????? ???????? ????????????;
  • #IMPLIED- ????????, ??? ??????? ?? ????? ???????? ?? ?????????;
  • ????????- ?????? ???????? ???????? ?? ?????????;
  • #FIXED ????????- ????????, ??? ??????? ?????? ????? ???????? ?? ?????????.

8.2.3.3. ??????? ???????? ?????????

? ???????? ??????? ?????????? ?????? ????????? ???????? button ? ????? XHTML.

<!ATTLIST button
 id ID #IMPLIED
 class CDATA #IMPLIED
 style CDATA #IMPLIED
 title CDATA #IMPLIED
 lang NMTOKEN #IMPLIED
 xml:lang NMTOKEN #IMPLIED
 dir (ltr|rtl) #IMPLIED
 name CDATA #IMPLIED
 value CDATA #IMPLIED
 type (button|submit|reset) "submit"
 disabled (disabled) #IMPLIED
 tabindex CDATA #IMPLIED
 accesskey CDATA #IMPLIED
 >

? ???? ?????? ??????? id ???????? ?????????? ??????????????? ????????, lang ? xml:lang ???????? ????? ?????, dir ????? ????????? ???????? ltr ??? rtl, ? type- ???????? button, submit ? reset, ?????? ??? ????????? ?? ????????? ???????? submit. ??? ????????? ???????? ???????? ?????????? ? ?? ????? ???????? ?? ?????????.

? ????? ??????? ? ??????? ????????? ??????? book ????? ???? ???????????? ??????? genre. ??????? ??? ?????????? ????????? ????? ????? ???:

<!ATTLIST book genre CDATA #REQUIRED>

8.2.4. ?????????? ???????

???????- ??? ?????, ???????????????? ?????? ??????????????? ????????, ?????? ?????????, ??????? ??????? ???????, ??? ?????????? ?????????, ??????? ?????????? ?????????. ?????????? ??????? ????? ??? ?????:

<!NOTATION ??? SYSTEM URI>
<!NOTATION ??? PUBLIC ?????? URI?>

? ?????? ???????? ??? ??????? ??????????? ? ??????? ????????, ???????? ????? URI, ?? ??????- ? ????????? ??????????????? ??????? ?, ????????, ? ??????? ????????. ??? ???????, ??? ? ????????? ?????????????? ????? ?????????????? XML-??????????? ??? ?????? ??????????????? ?????????? ?????????, ?????????????? ??????? ??????? ???????. ??? ??????? ????? ??????? ????????? ?????? ???? ??? ??????????.

?????? ????????????? ???????:

<!NOTATION gif SYSTEM "gifview.exe">
...
<!ENTITY photo SYSTEM "photo.gif" NDATA gif>

? ???? ??????? ???????, ??? ??? ????????? ???????? ? ??????? gif ??????? ???????? ????????? ??????????? GIF-??????? gifview.exe.


8.2.5. ?????? DTD

?????? ?? ????? ???????? ? ???? ??????????? DTD ??????? ???????? ????? ??????? ???? ??????. ? ?????? ????? ?????????? ???? ??? ????? ????? ???:

<!DOCTYPE bookstore [
 <!ELEMENT first-name (#PCDATA)>
 <!ELEMENT last-name (#PCDATA)>
 <!ELEMENT name (#PCDATA)>
 <!ELEMENT title (#PCDATA)>
 <!ELEMENT price (#PCDATA)>
 <!ELEMENT present EMPTY>
 <!ELEMENT author ((first-name, last-name) | name)>
 <!ELEMENT book (title, author+, price, present?)>
 <!ATTLIST book genre CDATA #REQUIRED>
 <!ELEMENT bookstore (book*)>
 <!ENTITY po "??????">
 <!ENTITY pr "?????">
 <!ENTITY dr "???????????">
]>

8.2.6. ??????????????? ???????

??????????????? ??????? (parameter entities)- ??? ????????????????, ?????????????? ????? ??????? ????????? ???????????, ??? ??????? ????????????? ???????. ????????????????? ?????? ????????????? ????????? ???????:

<!ENTITY % ??? ????????>

????? ???????, ??????? ??? ?????????? ?? ???????? ??????? ??????? ?????? ? ??????? ??????? ???????? (%) ????? ?????? ???????. ??? ?????? ?? ??????????????? ??????? ???????????? ??????????? %???; (? ?? &???;, ??? ? ??????? ???????). ??????????????? ??????? ??????????? ????????????? ? DTD, ?????? ? ???? ?????: ??-??????, ??? ????????? ???????? ? ?????? DTD ?????? DTD-?????, ??-??????, ??? ???????????? ??? ?????????? ??? ????????????? ??????????. ?????, ????????, DTD ???????? ???????? ???????? ? ????? bookstore.dtd. ????? ??? ?? ????????? ? ?????? DTD ?? ????? ?? ???????????? ????????? ?????????:

<!ENTITY % bookstore SYSTEM "bookstore.dtd">
%bookstore;

??? ?????????? ?????? DTD ?? ????? ?? ??????? ??????????????? ?????? text ????

<!ENTITY % text "(#PCDATA)">

? ????? ???????? ??????????? ???? ?????????? ???:

<!ELEMENT first-name %text;>
<!ELEMENT last-name %text;>

8.2.7. ???????? ??????

XML ????????? ???????? ?? ??????? DTD ?. ?. ???????? ?????? (conditional sections), ??????? ???? ??????????????, ???? ???????????? XML-??????????. ??? ??????????? ???????? ??????? ??? ??????? DTD, ?.?. ????????? ??? ???????? ? ????????? ????????? ????????? DTD, ?? ??????? ?? ??????????. ???????? ?????? ???:

<![IGNORE[ ?????????? ]]>
<![INCLUDE[ ?????????? ]]>

?????? ?? ??? ????????? XML-??????????, ??? ?? ?????????? ?????? ?? ??????????????, ? ??????- ??? ?? ?????????? ?????? ?????????????? ??????? ???????. ?????????? ???? ?????? ????? ???? ????? ????????????? ??????????? ??????????, ?????????? ? DTD. ??????? ????????????? ???????? ?????? ?? ???????. ????????, ??? ? ???????? ??????? bookstore.dtd ?? ?????? ??????? ??? ???????? ???? DTD: ?????????? (draft) ? ????????????? (final). ????? ??? ??????? ?? ????? ???????? ?????????:

<!ENTITY%draft'INCLUDE'>
<!ENTITY%final'IGNORE'>
<![%draft;[
<!ELEMENTbook(comments*, title, author+, price, present?)>
]]>
<![%final;[
<!ELEMENTbook(title, author+, price, present?)>
]]>

?????? ????????? ????? ???????? ? DTD ?????? ?? ??????????? ?????????? ???????? book ? ???????????? ??????. ????? ?????????? ??????? ??? ?????????? ???????? ?????? ?????????? ???????? draft ? final:

<!ENTITY%draft'IGNORE'>
<!ENTITY%final'INCLUDE'>

XML-????? - ?????????, ?????????? ?? ???????????? ?????

?????????? XML-????? ???????? ????????? ?????? ???????? ?????????? ?????????? ?? ???????????? ?????. ??? ????, ? ??????? ?? ???????? ?????? ?????? ? ??????? ? ??????, ????? ?? ?????? ??????????? ????? ??????????, ?? ????? ? ???????????????? ???? ???????????? ??? ???????? ?? ?????????? ? ??????????? ?????????. ????? ???????? ????? ???????? ???????? ??????????????? (validation). ??? ???????? ??????????? ???????????- ?????????????, ???? ????????????? ? ???????? ???????? ? ????????? ?????????, ???? ?? ??????? ?? ??????????.

????? 8.3. ???????????? ????

8.3.1. ?????????? ????????

?? ?????? ??????????? ????? XML ????????, ??? ???????? ??? ???????????? ???????? ??????????? ?????????? ??????????? ????? ????????? ? ?? ?????????. ????? ????? ????, ???????????? ? DTD ??????????????????? XML-?????, ?????????? ??? ????????. ??????, ?????????????? ???????? ???????? ???????? ? ????, ??? ??? ???????? ???????? ?????????? ????? ??? ????????? ?????????. ?????????? ????????? ??????:

<book>
 <title>????????</title>
 <author>??????</author>
 <price title="?????">103.50</price>
</book>

????? ???????????? ??????? title (???????? ?????) ? ??????? title (???????? ???????? ???????), ??????? ???? ????????? ? ?????? ????????. ?? ??, ??? ???????? ??? ????????????? ?????, ?????????? XML-??????????, ??????????? ?????????? ?????? ?????????. ??? ????, ????? ???????? ???????????????? ? XML-?????????, ??????? ?????????? ??????????? ?????????, ? ???? ??????? ???????????? ???? (namespaces), ????????? ? ???? ?????.

?? ????????, ???????????? ???? XML- ??? ???????, ???????????????? ??????? ?? URI ???????, ??????????? ???????? ??????? ???????. ??????? ?????? ??????? ????????????? ??????? ???????????? ????, ?????????? ? ???????? ??????? ?????????. ??????, ????? ???????? ???????????????, ?? ????? ???????????? ?????? ????? ???? ????????? ? ?????????, ??????? ??????? ?? ????????, ???????????? ?? ???????????? ????, ????????? ? ?????????? ?????. ????? ???????????? ??? (qualified name) ?????????? ?????????????? ??????? ??? ??????? ? ?????????, ? ?????? ???????????? ???? ?? ?????????.

8.3.2. ?????????? ??????????? ????

?????????? ??? ??????? ?????????? ???????????? ????: ?????????? ?? ????????? ? ????? ??????????. ?????????? ?? ????????? ????????? ???????????? ???? ??? ???? ????????? ? ?? ?????????, ??????? ?????????? ? ?????? ????????. ??? ????? ???:

xmlns=URI

??? xmlns- ???????? ????? XML, ? URI- ??? ????? ???????, ??????????? ??????????????? ???????. ? ????????? ??????? ??????? book ? ??? ???????? ? ???????? ?????? ???? ????? ??????? XML-???????????? ?? ???????????? ???? "http://www.booker.com/schema".

<book xmlns="http://www.booker.com/schema">
 <title>????????</title>
 <author>??????</author>
 <price>103.50</price>
</book>

????? ?????????? ????? ???:

xmlns:???=URI

??? ?? ?????, ??? ?????????? ???????? ?????, ??????? ?????? ??????? ??????? ???????????? ????. ?????????? ????????? ??????:

<book xmlns:bk="http://www.booker.com/schema"
 xmlns:money="http://www.finance.org/money">
 <bk:title>????????</bk:title>
 <bk:author>??????</bk:author>
 <money:price money:title="?????">103.50</money:price>
</book>

????? ??????? book ???????? ?????????? ???? ??????????? ????: ?????? ?? ??? ????? ??????? bk, ??????- money. ??? ???? ???????????? ? ??? ???????? title ? author ????????? ? ??????? ???????????? ????, ? price ? ??? ??????? title ?? ???????.

?? ??????????? ???????? ?????, ??? ?????????? ???????????? ???? ???????? ??? ??????? ??????? ?? ??????????? ?????? xmlns, ?? ????? ????????? ????????????? ???????, ??????? ????????? ??? ????????, ? ?????? ???????????? ????????? ?? ??? ???? ???. ??? ???????? ????, ????? ? ????????? (???? bk:author) ?????????? ?????????????. ??? ???? ???, ????????? ?? ??????????, ?????????? ?????????. ???????? ? ????????, ??? ????? ?? ???????? ????????, ????????? ???????????? ? ???????????? ???? ?? ?????????.

??????? ????? ????????, ??? URI ???????????? ???? ?? ?????? ????????? ?? ???????? ?????? (??????????, ?????????? URI ??????????? ??????????? ?????? ? ?????? ????); ? ??????????? ??????? ?? ?????? ?????? ??????????????? ??????? ????????????, ?.?. ??? ???????????? ???? ????????? ??????????? ????? ? ?????? ?????, ????? ?? URI ??????????? ?????????.

?????????? ?????? ??????? xml, ??????? ?? ??????? ??????????. ?? ?????????????? ??? ?????????? ????? XML ? ?????? ????????? ? ???????????? ???? "http://www.w3.org/XML/1998/namespace". ?????? ????????????? ????? ???????? ???????? ????.


???????????? ???? ????????? ?????? ? ???????? ???? ????????, ????????? ???????? ???????? ??? ??????????. ?????????? ?? ???????, ??? ??? ????????.

<Trees>
 <!-- ??????? ????????????? ???? ?? ????????? ????? HTML -->
 <table xmlns="http://www.w3.org/TR/REC-html40">
 <tr><td>????????</td><td>?????????????</td><td>????????</td></tr>
 <tr>
 <td><author xmlns="http://flora.com/trees">?????</author></td>
 <td><title xmlns="http://flora.com/trees">??? ??????</title></td>
 <td>
 <details xmlns="http://flora.com/trees">
 <areal>???? ? ????? ???????? ???????</areal>
 <use>???????????? ????????? ? ??????</use>
 </details>
 </td>
 </tr>
 </table>
</Trees>

? ???? ??????? ????? ????????? ?? ??????????, ?.?. ?? ????? ?????????. ??????? ??????? Trees ?? ????????? ?? ? ?????? ???????????? ????, ???????? tr ? td ????????? ? ???????????? ???? "http://www.w3.org/TR/REC-html40", ? ??? ????????? ???????? ? ???????????? ???? "http://flora.com/trees".

??? ????????????? ??????????? ???? ????? ?????????, ??? ???????? ???????? ?? ????????? ??? ???????????? ????. ????? ???????, ???? ??????? ???????????? ???? ??? ???????? ?? ??????, ?? ??? ??? ?? ????????? ?? ? ?????? ???????????? ????.


8.3.4. ??????? URI ?????????? XML-?????????

???????????? ???? ? XML ????, ? ?????????, ???????????? ??? ??????? ? XML-????????? ???????? URI ?????? ?? ??? ??????????. ??? ?? ??????, ? HTML ??? ????? ???????????? ??????? BASE, ?????? ?? ????????? ? HTML-????????? ? ?????. XML ? ???? ????????? ????? ?????; ? ??? ?? ????? ?????? ??????? URI ?????? ???????? ? ??????? ???????? xml:base ?????????? ???? (????????, ??? ??????? xml ????????? ? ???????????? ???? "http://www.w3.org/XML/1998/namespace"):

xml:base=URI

?????????? ????? ??????:

<?xml version="1.0"?>
<doc xml:base="http://example.org/today/">
 <head>
 <title>??????????? ??????????</title>
 </head>
 <body>
 <para>?????? ??????? ??????? ???!</para>
 <olist xml:base="/hotpicks/">
 <item xml:base="pick1.xml">??????? ??????? ?1</item>
 <item xml:base="pick2.xml">??????? ??????? ?2</item>
 <item xml:base="pick3.xml">??????? ??????? ?3</item>
 </olist>
 </body>
</doc>

????? ???????? ??????? doc ???????? ???????? ?? ???? ??????? URI "http://example.org/today/", ? ????????????? URI ????????? ? ???? ????????? ????? ??????????? ???:

  • ??????? URI ???????? olist ???????? "http://example.org/today/hotpicks";
  • ??????? URI ????????? item ???????? "http://example.org/today/hotpicks/pick1.xml" ? ?.?.

????? ?? ????? ?????????????? ??????? ??????? ???????? ??????? URI. ??-??????, ?? ????????? ? ????????? ?????????????? ????? ????????, ???????? ??? URI (??. ?????????? 2). ??-??????, ????????? ????????? ?????????? ? ?????????? ????????? ??????? URI:

  • ???? ??????? ????? ??????? xml:base, ?? ??? ??????? URI ????????; ? ????????? ??????
  • ???? ?????? ???????? ????? ??????? xml:base, ?? ??? ??????? URI ????????; ? ????????? ??????
  • ??????? URI ???????? ???????? URI ??????? ????????? ??? ???????? ???????, ??????????? ?????? ???????.

???????, ?-???????, ????????????? URI ??????????? ? ?????? ??? ??, ??? ??? ????????????? URI, ?? ?? ?????????? ???????????:

  • ??????? URI ??? ?????? ?????? ?????? ???????? ??????? URI ??????????? ???? ????? ????????;
  • ??????? URI ??? ?????? ?????? ???????? xml:base ???????? ??????? URI ?????? ????? ????????;
  • ??????? URI ??? ?????? ?????? ?????? ??????? ???????? ???????? ??????? URI ????? ????????;
  • ??????? URI ??? ?????? ?????? ????????? ???????? ??????? URI ?????? ???? ?????????.

???????? ???????: ???????? "????? ?? ???????"

?????????? XML-????? ??????? ? ???, ????? ?????????? ????? XML-??????????. ? ????? ? ???? ?????? "????????" ????? ???????????? ??? ????, ????? ?????????? XML-????????, ??????? ????????????? ???????????? ?????. ? ???????????????? ????? ?????????? ?? ?????????? ???? ?? ????. ?????? ??? ???????????? ????? ?????? ??????, ???????? ???????????? ????? ????? ??????????, ????? ????? ? XML-?????? ??? ???? ? ??????? ??? ??????. ?? ??? ????????? ?? ????? ????????????? ??????? ?????????? ? ?? ????? ??? ?????? ????????? ? ?????.

??? ?????? ?????????? ???????? "????? ?? ???????", ?????????????? ? ????? po.xml. ???? XML-???????? ????????? ?????, ??????????????? ? ??????? ????????, ?????????????? ???????????? ?????? ?? ???????.

????? ?? ???????. ???? po.xml:

????? ??????? ?? ????????? ????????, purchaseOrder, ? ???????????? shipTo, billTo, comment ? items. ??? ??????????? (????? comment) ? ???? ??????? ???????? ?????? ???????????, ? ??? ?????, ???? ?? ?????????? ?????????? ???? USPrice. ??????? USPrice ???????? ?????, ? ?? ?????? ???????????. ????????, ??????? ???????? ??????????? ??? ????? ????????, ???????? ?????????? ???????????? ????, ????? ??? ????????, ??????? ???????? ????? (??????, ????, ? ?.?.), ?? ?? ???????? ???????????? ??? ?????????, ?????????? ?????????? ???????? ????. ??? ????? ?? ???????, ????????? ???????? ????? ????????. ???????? ?????? ???????????? ????? ???????? ???????? ????.

? ??????????? ??????? ?????????, ??????????? ????, ? ????????? ??????? ????, ?????????? ? ??? XML-?????. ?????? ? ??? ? ????????? ??????? ??????? ????, ??????? ???????????? ????? ????, ?????????? ? ???? XML-????.

?????? ??? ?????????? ???????????? ????? ?? ???????, ??????? ????????? ???????????, ????? ??????????? ????? ????? ??? ? ??? ??????. ??? ?? ?????? ????????, ? ??????????? ???? ?????? ?????? ??? ?????????? ? ??? ?????. ??? ??????? ? ???, ???????? ?? ?????? ????? ?????? ?? ???? ?????, ???? ????? ????? ????? ?????? ????? ??????????????. ??? ?????? ?? ???????? ??????, ? ?? ????? ????????????? ??, ????? ??????? ?????????? ????????? ???????? ?????? ?? ??? ?????. ??????? ?? ??????????, ????? ??????? ??????????????? ????? ????????? ? ??? ??????.


2.1 ????? ?????? ?? ???????

????? ????????? "????? ?? ???????" ?????????? ? ????? po.xsd.

????? ?????? ?? ???????. ???? po.xsd:

????? ?????? ?? ??????? ??????? ?? ???????? schema ? ????????? ????????????, ????? ??????? ???????? ????? ??????????? element, complexType ? simpleType. ???????? ????? ?????????? ??????? ?????????? ????????? ? ?? ?????????? ? ?????????? ???? "????? ?? ???????".

?????? ?? ????????? ? ????? ????? ??????? xsd:. ???? ??????? ?????? ? ??????? ????????????? XML-????? ????? ?????????? xmlns:xsd=http://www.w3.org/2001/XMLSchema, ??????? ?????? ? ???????? schema. ??????? xsd: ???????????? ? ???????????? ? ??????????? ?? ????????????? ????? ???????? ???????????? ??? ??????????? ????????? XML-?????, ???? ????? ???????????? ????? ???????. ??? ?? ????? ???????, ? ?????????????, ?? ?? ????? ?????????? ? ??????? ?????????????, ???????????? ? ? ????????? ?????????? ??????? ?????. ????????, xsd:string. ???? ?????????? ??????? ? ???, ????? ???????????????? ?????????????? ????????? ? ??????? ????? ??????? ????? XML-????, ? ?? ??????? ?????? ?????. ??? ?????????, ?? ????? ????????? ?????? ???????? ????????? ? ??????? ?????, ??????? ???????. ????????, simpleType ?????? xsd:simpleType.


2.2 ??????????? ??????????? ?????, ?????????? ????????? ? ?????????

? XML-????? ???? ???????? ????? ???????????? ?????? ?????????, ??????? ????? ????? ????????? ???????? ? ????????, ? ???????? ??????, ??????? ?? ????? ????? ????????? ????????? ??? ?????????. ????? ??????? ???????? ????? ????????????? ? ????????????. ??????????? ??????? ????? ???? ????????? (??????? ? ???????????). ?????????? ?????? ????? ? ?????????? ????????? ? ????????? (??????? ? ???????????), ??????? ????? ?????????????? ? ??????????, ??????????????? ?????? ?????. ? ???? ???????, ?? ?????????????? ?? ??????????? ??????????? ????? ? ?????????? ????????? ? ?????????, ??????? ????? ????????? ?????? ???.

????? ??????????? ???? ???????????? ? ??????? ????????? complexType. ????? ??????????? ?????? ???????? ????? ?? ?????????? ?????????, ?????? ?? ????????, ? ?????????? ?????????. ?????????? ?? ?????? ?????????????? ????. ?????? ??? ??????? ?????????? ????? ?????? ???????? ? ?????????????, ??????? ????????? ?????????? ????? ????? ? ??????????, ??????????????? ?????? ?????. ???????? ???????????, ? ??????? ????????? element. ???????? ???????????, ? ??????? ????????? attribute. ? ???????? ??????? ?????????? ??????????? ???????????? ???? USAddress. ?????? ??????????? USAddress ?? ????? ???? ?????????? ???????? ? ???? ?????????? ????????.

??????????? ???? USAddress:

? ?????????? ????? ??????????? ????? ??????? ???? USAddress, ???????????? ? ????????? (????????, ??????? shipTo ? ????? po.xml), ?????? ???????? ?? ???? ????????? ? ?????? ????????. ????? ???? ???? ????????? (name, street, city, state ? zip) ??????????? ? ??????? ???????? name ????????? element, ?????? ???????? ?????? ????????? ? ??? ?? ????? ??????????????????, ? ??????? ??? ?????????. ?????? ?????? ?? ???? ????????? ????? ????????? ????????? ????????, ? ????? - ?????????? ?????. ???????, ??? ???????? ????????? ??? USAddress, ????? ????????? ? ????????? country, ??????? ?????? ????????? ????????? ????????? US.

??????????? USAddress ???????? ??????????, ?????????? ?????? ??????? ????: string, decimal ? NMTOKEN. ????????, ??????????? PurchaseOrderType ???????? ?????????? ?????????, ??????? ??????????? ????. ????????, USAddress. ???? ??? ???? ?????????? (??????? ? ???????????) ?????????? ??? ?? ????? ??????? type.

??????????? ???? PurchaseOrderType:

? ??????????? PurchaseOrderType, ?????????? ????????? shipTo ? billTo, ????????? ????????? ????? ????????? ? ????? ? ??? ?? ??????????? ?????, ? ?????? ? USAddress. ?????????? ????? ??????????? ????? ??????? ???? PurchaseOrderType, ???????????? ? ????????? (????????, ? po.xml), ?????? ???????? ?? ????????? shipTo ? billTo. ?????? ?? ???? ????????? ?????? ????????? ???? ???????????? (name, street, city, state ? zip), ??????? ???? ????????? ? ??????????? USAddress. ???????? shipTo ? billTo ????? ????? ??????? country, ??????? ??? ???????? ??? ????? ??????????? USAddress.

??????????? PurchaseOrderType ???????? ?????????? ???????? orderDate, ???????, ??????? ?????????? ???????? country, ???????? ? ??????? ???????? ????. ??????????, ??? ?????????? ????????? ?????? ??????????? ? ??????? ??????? ?????, ?????? ???, ? ??????? ?? ?????????, ???????? ?? ????? ????????? ?????? ???????? ??? ?????? ????????.

?????????? ?????????, ??????? ?? ????? ?????????, ???????????? ????? ???, ????????? ? ???????? ???? ????? ????????. ?????? ??????????????? ???????????? ?????? ?? ???????????? ??? ????????, ? ?? ????????? ?????, ????????:

< xsd:element ref="comment" minOccurs="0"/>

? ???? ?????????? ?????????? ?????? ?? ???????????? ??????? comment, ??????? ???????? ???-?? ? ?????? ????? ????? ?????? ?? ???????. ???????? ???????? ref ?????? ???????????????, ??? ????????? ?? ?????????? ???????, ??????? ??? ???????? ? ???????? schema, ? ?? ??? ????? ??????????? ???????????? ????. ?????????? ????? ??????? comment ????? ????????? ? ????????? ?????? ???????? PurchaseOrderType, ?????? ??? ?????????? ?????? ???? ?????????? ? ????? string.


2.2.1 ??????????? ?????????

???????? ????????? minOccurs ?????? 0 ? ???????? comment ??????? ? ???, ??? ?? ?? ??????????? ????? ?????????????? ? ??????? ???????? PurchaseOrderType. ??????, ??????? ???????? ????????????, ???? ???????? minOccurs ?????? ??? ????? 1. ???????????? ????? ????????? ???????? ???????????? ?????????, ?????????? ?????????? maxOccurs. ??? ???????? ????? ???? ????????????? ????? ?????? ???? 41, ??? ?????? unbounded, ??? ???????? ?????????? ??????????? ????????????? ????? ?????????. ???????? ?? ????????? ??? minOccurs ? ??? maxOccurs ????? 1. ????? ???????, ????? ??????? ???? comment ???????? ??? maxOccurs , ?? ??? ????????, ??? ??????? ????? ????????? ?? ????? ?????? ????. ???? ?? ??????????? ???????? ?????? ??? minOccurs, ?? ????????? ??? ??? ???????? ?????? ??? ????? ???????? ?? ????????? maxOccurs. ?? ???? ??? ???????? ?????? ???? 0 ??? 1. ????? ??? ??, ???? ?? ??????????? ???????? ?????? ??? maxOccurs, ?? ??? ???????? ?????? ???? ?????? ??? ????? ???????? ?? ????????? minOccurs, ?? ???? 1 ??? ??????. ???? ??? ???????? ???????, ??????? ?????? ????????? ? ????????? ????? ???? ???.

????????, ? ??????? ?? ?????????, ????? ????????? ?????? ??????? ??? ?? ????. ??????? ? ????????? ??? ??????????? ????????? ????????? ?????????? ?? ?????????? ??? ??????????? ????? ????????? ?????????. ? ????????? ???????? ????? ???? ????????? ? ?????????? use. ? ??????????? ?? ???????? ????? ????????? ??????? ?????????? (use="required"), ???????????? (use="optional"), ??? ???????? (use="prohibited"). ????????, ?????????? ???????? partNum ? po.xsd.

???????? ?? ????????? ? ????????? ? ????????? ????? ???? ????????? ? ?????????????? ????????? default, ???? ???? ???????? ? ??? ??? ???? ?????? ???????? ?? ???????. ??????? ?? ?????????, ???????????? ?? ?????????, ????? ?????????? ??? ?? ?????????? ? ?????????. ???? ??????? ?? ?????????? ? ?????????, ?? ?????????? ????? ????????????, ??????? ?? ????????? ?????? ???????? default. ???????? ????????, ??? ???????? ?? ????????? ??? ????????? ????? ?????, ?????? ???? ???? ???????? ???????? ???????????????, ??????? ????? ??????? ?????????? ???????? ?? ????????? ?????? ? ?????????? use ???????? ?? use="optional".

???????? ?? ????????? ??? ????????? ?????????????? ??????? ??-???????. ???? ??????? ?????????? ? ?????????, ?? ?? ???????? ?????? ???? ????????, ?? ? ???????? ??? ???????? ????????????? ???????? ?? ?????????. ?????? ???? ??????? ?? ?????????? ? ?????????, ?? ?????????? ????? ?? ???????????? ??? ???????? ??????. ? ?????, ???????? ????? ?????????? ?? ????????? ???????? ? ???????? ? ?????????: ???????? ?? ????????? ???????? ???????? ??????????? ?????, ????? ??????? ???????????, ? ???????? ?? ????????? ???????? ???????? ??????????? ?????, ????? ??????? ???????????? ? ?????????, ?? ?? ????? ???????? (????).

??????? fixed ???????????? ? ??????????? ? ????????? ? ?????????. ?? ????????????, ????? ???????, ??? ??????? ??? ??????? ????? ????????? ????????????? ????????. ????????, ? po.xsd ???????? ??????? country, ?? ????????? ?????? US. ??????????? ? ??????? ?????????? ????????, ??? ??????? country ???????? ?????????????? (?? ????????? ???????? ????????? use ????? optional), ????, ???? ??????? ?????????? ? ?????????, ?? ??? ????????? ?????? ???? US. ???? ??????? country, ?? ?????????? ? ?????????, ?????????? ????? ????????? ??????? country ?? ????????? US. ???????? ????????, ??? ??????? ?????????????? ???????? ? ???????? ?? ????????? ???????? ??????????????????, ??????? ?????????? ?? ????? ???????????? ????????? ???????? fixed ? default.

??????? ????????????? ????????? ???? ?????????? ? ??????????? ????????? ? ????????? ????????? ? ??????? 1.

??????? 1 . ??????????? ?? ????????? ????????? ? ????????? ? ?????????

????????
(minOccurs, maxOccurs) fixed, default

????????
use, fixed, default

??????????

(1, 1) -, -

required, -, -

???????/??????? ?????? ????????? ???????, ????? ????? ????? ????????

(1, 1) 37, -

required, 37, -

???????/??????? ?????? ????????? ???????, ??? ???????? ?????? ???? 37

(2, unbounded) 37, -

n/a

??????? ?????? ????????? ?? ????? 2 ???, ??? ???????? ?????? ???? 37; minOccurs ? maxOccurs ????? ???? ?????????????? ?????? ???????. maxOccurs ?????? unbounded ?????? ?????????????? ????????? ????????

(0, 1) -, -

optional, -, -

???????/??????? ????? ????????? ???????, ? ????? ????? ????? ????????

(0, 1) 37, -

optional, 37, -

???????/??????? ????? ????????? ???????. ???? ?? ????????, ?? ??? ???????? ?????? ???? 37. ???? ?? ?? ????????, ?? ??? ???????? ????? 37.

(0, 1) -, 37

optional, -, 37

???????/??????? ????? ????????? ???????. ???? ??????? ?? ?????, ?? ??? ???????? ?? ????????? ????? 37, ????? ??? ?????????? ???????? ????? ?????????

(0, 2) -, 37

n/a

??????? ????? ????????? ???????, ??? ??????, ??? ?? ????. ???? ??????? ?? ????????, ?? ??? ???????? ?? ??????????; ???? ????????, ? ??? ???????? ?? ??????, ?? ?? ????????? ??? ???????? ????? ????? 37; ????? ??? ?????????? ???????? ????? ????????? ? ?????????. ?????? ??????????, minOccurs ? maxOccurs ????? ???? ????????????? ????? ?????. ??? ???? ???????? maxOccurs ????? ????? ????????? ???????? unbounded (?? ??????????)

(0, 0) -, -

prohibited, -, -

???????/??????? ?? ?????? ????????? ? ?????????

???????? ????????, ??? ?? minOccurs, maxOccurs, ?? use ?? ????? ????????? ? ??????????? ?????????? ????????? ? ?????????.


2.2.2 ?????????? ???????? ? ????????

?????????? ????????, ? ?????????? ????????, ????????? ? ??????? ??????????, ??????? ???????? ????????? ?????????? ???????? schema. ??? ???? ??????? ????, ?? ?????????? ??????? ??? ?????????? ??????? ????? ????????? ? ??????? ????????? ref ? ????? ??? ????? ???????????.

??????????, ??????? ?????????? ?????? ?? ?????????? ???????, ????????? ????????, ?? ??????? ????????? ??????, ????????? ? ????????? ? ???????? ??????????? ??????? ??????????. ???, ????????, ??????? comment ?????????? ? po.xml ?? ??? ?? ????? ??????, ??? ? shipTo, billTo ? ???????? items, ??? ??????? ? ???, ??? ?????????? comment ????????? ? ??????????? ??????????? ???? ?? ??? ?? ????? ??????, ??? ? ?????????? ?????? ???? ?????????.

?????????? ??????????? ???????? ???? ??????????? ???????? ????????? ? ????????? ? ???????? ???????? ???????? ??????. ?????????????, purchaseOrder, ??????? ???????? ??? ?????????? ??????? ? po.xsd, ????? ????????? ??? ??????? ???????? ?????? ? po.xml. ???????? ????????, ??? ?????????? ???????? comment ??? ??????????? ????????? ??? ????????? ? ????????? po.xml ??? ???????? ???????? ??????, ? ?? ?????? ? ???????? ??????????? ???????? purchaseOrder.

???? ????????? ???????????? ???????????? ????????????? ?????????? ????????? ? ?????????. ???? ?? ??? ??????? ? ???, ??? ?????????? ??????????, ?? ????? ????????? ??????: ????? ?????????? ?????? ???????? ??????? ??? ??????? ???? ???????????????. ?????? ?????????, ?????????? ?????????? ?? ????? ????????? ???????? ref, ??? ?????? ???????????? ??????? type. ?????? ??????????? ??????? ? ???, ??? ? ?????????? ??????????? ?????? ???????????? ??????????? ?? ?????????? ????????? ?????????, ???? ??? ????? ???? ???????? ? ????????? ??????????, ??????? ?? ??? ?????????. ??????? ???????, ?????????? ?????????? ?? ????? ????????? ???????? minOccurs, maxOccurs, ??? use.


2.2.3 ????????? ????

?????? ????????, ??? ?????????? ????? ??????????? ???? (??., PurchaseOrderType), ???????? ???????? (??., purchaseOrder) ? ???????? ???????? (??., orderDate). ??? ??? ???????? ???????????? ? ???????, ??????? ?????? ????????? ??????, ??? ?????, ???? ???????? ??? ??????? ? ??????????? ????????

?????????? ????????? ????????. ???? ???????? ??? ??????? ? ??????????? ???????, ?? ??????? ??????, ?? ????? ?????????? ??????? ??????????? ????????. ????????, ???????? ???? ??????? ??????????? ??? ? ?????? USStates ? ??????? ??? ? ?????? USStates. ?????? ???? ?? ?????????? ??????????? ??? ? ?????? USAddress, ? ????????? ??????? ??? ??????? ? ?????? USAddress, ?? ???????? ?? ?????????. ???????? ????? ?? ?????????, ???? ???????? ? ??????????? ??????? ????????? ?????? ??????????? ????????? ?????. ????????, ???? ?? ??????? ???? ??????? ??? ????? ???? USAddress, ? ?????? ??????? ? ??? ?? ?????? ??? ????? ???? Item, ?? ???????? ???? ?? ?????????. ????? ?????????? ???????? ??????????. ???????, ???? ??????? ??? ????, ???? ?? ??????? ????????? ???? (????????, decimal), ? ?????? ??????? ? ???? XML-?????, ?? ???????? ???? ????? ?? ?????????. ?????????? ????????? ??????? ? ???, ??? ??? ??? ???? ??????????? ????????? ??????? ?????????????. ????? ???????? ????????????? ??????? ??????????? ? XML-?????? ????? ??????????? ?????.


2.3 . ??????? ????

XML-????? ?????? ?? ??????? ???????? ?????????? ?????????? ????????? ? ????????? ???????? ????. ????????? ?? ???? ??????? ?????, ???????? string ? decimal ???????? ? ???? XML-?????, ? ?? ????? ??? ?????? ?????????? ?????????? ??? ??????? ???? ?????????. ????????, ??????? partNum ????? ??? ?? ????? SKU (Stock Keeping Unit), ??????? ??????? ?? ??????????? ???????? ???? string. ?????????? ??????? ????, ? ?? ???????? ????? ?????????????? ? ??????????? ????????? ? ?????????. ? ??????? 2 ?????????? ?????? ??????? ?????????? ? ???? XML-????? ?????.

??????? 2. ?????? ??????? ?????

??????? ???

??????? (???????????? ????????)

??????????

string

Confirm this is electric

normalizedString

Confirm this is electric

??., 3)

token

Confirm this is electric

??., 4)

byte

-1, 126

??., 2)

unsignedByte

0, 126

??., 2)

base64Binary

GpM7

hexBinary

0FB7

integer

-126789, -1, 0, 1, 126789

??., 2)

positiveInteger

1, 126789

??., 2)

negativeInteger

-126789, -1

??., 2)

nonNegativeInteger

0, 1, 126789

??., 2)

nonPositiveInteger

-126789, -1, 0

??., 2)

int

-1, 126789675

??., 2)

unsignedInt

0, 1267896754

??., 2)

long

-1, 12678967543233

??., 2)

unsignedLong

0, 12678967543233

??., 2)

short

-1, 12678

??., 2)

unsignedShort

0, 12678

??., 2)

decimal

-1.23, 0, 123.4, 1000.00

??., 2)

float

-INF, -1E4, -0, 0, 12.78E-2, 12, INF, NaN

32-? ??????? ????? ??????????? ???????? ? ????????? ???????. NaN - ????? ?? ??????, ????. (2)

double

-INF, -1E4, -0, 0, 12.78E-2, 12, INF, NaN

64-? ??????? ????? ??????? ???????? ? ????????? ???????, ??., 2)

boolean

true, false 1, 0

time

13:20:00.000, 13:20:00.000-05:00

??., 2)

dateTime

1999-05-31T13:20:00.000-05:00

31 ??? 1999 ???? 13 ????? 20 ????? ???????????????????? ???????????? ???????, ??????? ?? 5 ????? ??????? ?? ?????????????? ???????. ??.,2)

duration

P1Y2M3DT10H30M12.3S

1 ???, 2 ??????, 3 ???, 10 ?????, 30 ?????, ? 12.3 ???????

date

1999-05-31

??., 2)

gMonth

--05--

???, ??., 2) ? 5)

gYear

1999

1999, ??., 2) ? 5)

gYearMonth

1999-02

??????? 1999 ????, ?? ???????? ?? ?????? ???, ??., 2) ? 5)

gDay

---31

31 ????, ??., 2) ? 5)

gMonthDay

--05-31

31 ???, ??., 2) ? 5)

Name

shipTo

XML 1.0 ??? Name

QName

po:USAddress

XML Namespace QName

NCName

USAddress

XML Namespace NCName, ?? ???? QName ??? ???????? ? ?????????

anyURI

http://www.example.com/, http://www.example.com/ doc.html#ID5

language

en-GB, en-US, fr

???????? ?????????? ??? xml:lang ??? ?????????? ? XML 1.0

ID

XML 1.0 ??????? ???? ID, ??., 1)

IDREF

XML 1.0 ??????? ???? IDREF, ??., 1)

IDREFS

XML 1.0 ??????? ???? IDREFS, ??., 1)

ENTITY

XML 1.0 ??????? ???? ENTITY, ??., 1)

ENTITIES

XML 1.0 ??????? ???? ENTITIES, ??., 1)

NOTATION

XML 1.0 ??????? ???? NOTATION, ??., 1)

NMTOKEN

US, Bresil

XML 1.0 ??????? ???? NMTOKEN, ??., 1)

NMTOKENS

US UK, Bresil Canada Mexique

XML 1.0 ??????? ???? NMTOKENS, ?? ???? ?????? NMTOKEN ??????????? ?????????, ??., 1)

??????????:
1) ??? ??????????? ????????????? XML-???? ? XML 1.0 DTD, ??????? ?????????????? ????? ( IDREF, IDREFS, ENTITY, ENTITIES, NOTATION, NMTOKEN, NMTOKENS), ?????? ?????????????? ?????? ? ?????????.
2) ???????? ????? ???? ????? ???? ???????????? ?????? ??? ????? ??????????? ????????. ????????, 100 ? 1.0E2 - ??? ???????? ???????????? ? ??????? ? ????????? ??????, ? ????????? ?????? "???". ??????, ??? ????? ???? ???? ??????????? ???????, ??????? ?????????? ???????????? ??????????? ?????? (??., "XML-?????. ????? 2: ???? ??????").
3) ??????? ???????? ??????, ?????????, ? ???????? ??????? ? ???? normalizedString ????? ?????????? ????? ????????????? ? ???????.
4) ??? ? ? normalizedString, ??????? ??????? ????????? ?? ????????????? ???????, ?????????????? ? ??????????? ??????? ?????????.
5) ??????? "g", ?????? ????? ?? ?????????????? ?????????.

????? ??????? ???? ????? ??????????, ??????? ?? ?? ???????????? ??????? ????? (?????????? ??? ????? ????????????). ? ????????? ?? ????? ???????? ????? ??????? ???, ??????????? ???????????? ??????? ???. ??????? ???????, ??? ?????? ???? ?? ????? ?????????? ??????????? ???????? ???????? ??? ???????????? ????????? ???????? ????????????? ????. ??? ??????????? ????? ? ???? ???????????? ???????? ???? ?????????? ???????? simpleType. ??? ???? c ??????? ????????? restriction ????????? ????????, ? ?????????????? ?????? (?????????), ??????? ???????????? ???????? ???????? ???????? ????. ?????? ??????? ?????????? ? ?????????? B.

???????????, ??? ?? ????? ??????? ????? ??? ?????? ?????, ?????????? myInteger, ??? ???????? ???????? ?????? ?????????? ????? 10000 ? 99999 (????????????). ?? ???????? ???? ??????????? ?? ?????????? ??????? ???? integer, ??? ???????? ???????? ???????? ??? ?? ? ????? ????? ??? ?????? ??? 10000, ??? ? ?????? ??? 99999. ????? ?????????? ??? myInteger, ?? ???????????? ???????? ???????? ???? integer, ????????? ??? ??????, ????????? minInclusive ? maxInclusive.

??????????? myInteger. ???????? 10000-99999:

??????????? ?????? ?????????? ????????????? ????? ?? ????????? ?????????? ???????? ????, ? ???? ???????, ??????? ???? ????????? ??? ??????????? myInteger. ?? ???????? ????????????? ? ?????? ?????????? ?????????? ??????? ????? ? ??????? (??., ?????????? B). ?????????? ????? ??????? ?????? ??????????? ???????? ????. ??? ?? ????? SKU ??????? ?? ???????? ???? string. ?? ???????????? ???????? SKU ????? ????????????? ?????? pattern, ??????? ???????? ?????????? ?????????, ???????????? ?????????? ?????? ?????? "\d{3}-[A-Z]{2}". ??? ????????? ???????? ????????? ???????: "?????? ?????????? ? ???? ????, ?? ???????? ??????? ?????, ?? ??????? ??????? ??? ASCII-????????? ???????? ????????".

??????????? ???????? ???? SKU:

????? ????? ???? ?????????? ????????? ?????? ? ?????????? D.

???? XML-???? ?????????? ?????????? ???????, ??????? ??????????? ? ?????????? B. ????? ??? ???????? ??????? ????? enumeration. ??? ????? ???????????? ??? ??????????? ???????? ????? ??????? ???????? ????, ????? boolean. ????? enumeration ???????????? ??????? ??? ??????? ????? ????????. ????????, ?? ????? ???????????? enumeration, ????? ?????????? ????? ??????? ??? ?? ????? USState, ?????????? ?? ???? string, ???????? ???????? ?????? ???? ????? ?? ??????????? ?????????? ???????????? ?????? ???.

????????????? ?????? enumeration:

????????????? ???? USState ???????? ??????? ??????? ???? string, ??? ????????????? ? ???????? state (???????? ???????????? ?????). ?? ???? ????? ?????? ?? ????? ?????????? ???????? ???????? state ? ???????????? billTo ? shipTo. ??? ???? ??? ???????? ?????????? ????????? ????????: AK, ?L, AR, ? ?.?. ???????? ????????, ??? ????????????? ????????, ????????? ??? ??????? ???? ?????? ???? ?????????.


2.3.1 ??? List

? ?????????? ? ??? ?????????? ????????? ?????, ??????? ?????????? ???????????, XML-????? ????? ??????? ??????. ???????? ????????? ????? ?????????? ? ??????? 2. ????????? ????, ????????? ????, ? ???? ???????????, ????????? ? ????????? ???????, ??? ?????? ?????????? ???????? ??????. ????????????? ????????? ????? ????????????????? ???????????? ????????. ????????, NMTOKEN ????????????????? ???????? US, ????? ??? ????????? ? ??? ??????, ??? ??????? ????? US, ???? ??????? "S", ?? ????? ???????? ???????? ?? ??????. ????????? ???? ??????? ?? ??????????????????? ????????? ?????, ?, ?????????????, ??????????? ?????????? ????? ???? ?????? "?????" ?? ???? ??????????????????. ????????, ????????? ??? NMTOKENS ??????? ?? ???????? ???? NMTOKEN, ??????????? ?????????. ????????, "US UK FR". ???? XML-???? ????? ??? ?????????? ????????? ????: NMTOKENS, IDREFS ? ENTITIES.

? ?????????? ? ?????????? ????????? ????? ?? ?????? ??????? ????? ????????? ???? ?? ???????????? ????????? ?????. ?????????? ??????? ????????? ???? ?? ???????????? ????????? ????? ??? ?? ??????????? ?????. ????????, ?????????? ????????? ??? listOfMyIntType, ????????? ?? ???????? myInteger:

??????? ? ?????????, ?????????? ???????? ????????????? ???? listOfMyIntType, ????? ????????? ????????? ???????:

??? ???????? ?????????? ???? ????? ???? ????????? ????????? ??????: length, minLength, maxLength, ? enumeration. ????????, ????? ?????????? ?????? ????? ?? ????? ?????? ??? (SixUSStates), ?? ??????? ?????????? ????? ????????? ??? (?????????? ?? ???? USState) ? ?????? USStateList, ? ????? ??????? ??? SixUSStates, ??????????? USStateList ?????? ?????? ??????????. ????????? ??? SixUSStates:

????????, ??? ??????? - SixUSStates, ?????? ????????? ????? ?????????, ? ?????? ?? ???? ????? ????????? ?????? ???? ????? ?? ????????? ???????? ????????????? ???? USState, ????????:

???????? ????????, ??? ?? ???????? ????????? ??? ?? ????????? ?????????? ???? string. ??????, ??? string ????? ????????? ???????, ? ??????? ?????????????? ???????? ? ????????? ????. ??????? ?? ?????? ???? ????????????, ????????? ????????? ????, ???????? ??? ??????? - string. ????????, ?? ?????????? ????? ????????? ??? ?? ?????? ???????? ???? string ? ?????? length ?????? 3. ????? ????????? ??? ???????? ?????? ???????? ?????????:

Asie Europe Afrique.

?? ????????? ??? ???????? ?????? ?????????:

Asie Europe Amerique Latine.

???? ???????? ??? "Amerique Latine" ????? ???????????? ??? ?????? ??? ????????? ??????, ????? ??? ???????? ???????? ? ??????, ?? ?????? ????? Amerique ? Latine ?????????? ??????? ????????? ??????? ??????. ??????? ????????? ?????? ?? ????? ??????????????? ?????????? ???? ? ????? ??????????.


2.3.2 ??? Union

????????? ???? ? ????????? ???? ???? ??????????? ???????? ??? ???????? ????????? ???????? (???? ??? ?????) ?????????? ?????? ?????????? ????. ??? Union ???? ??????????? ???????? ??? ???????? ????????? ???????? (???? ??? ?????) ?????? ????, ????????????? ????? ??????????? ????????? ????????? ? ????????? ?????. ????????, ???????? union-??? ??? ????????????? ?????? ??? ??? ??????????????? ?????????? ???????? ??? ?????? ???????? ?????. ?????????? ??? zipUnion. ?? ??????????? ?? ?????? ?????????? ????, ? ?????? ??????:

????? ?? ?????????? union-???, ?? ??????? memberTypes ????????? union ?????? ?????? ???? ????? ? ???????????. ???????????, ??? ?? ???????? ??????? ? ????????? zips ???? zipUnion, ????? ?? ????? ????????? ????????? ????????:

? ???? union ????? ???? ????????? ??? ??????: pattern ? enumeration.


2.4 ??????????? ????????? ?????

??? ???????? ???? ??????????? ??? ?????. ????? ????? ??????????? ????? ??????????? ????????????? ????? (????????, PurchaseOrderType) ? ??????????? ??????????? ????????? ????? ???? (????????, purchaseOrder). ??? ???? ??????????? ???????? ????????? ?? ????????????? ??? ? ??????? ??????????? type= . ???? ????? ???????? ?????????? ???????, ?? ????? ????? ?????????????, ???????? ???? ?? ??????????? ????? ?????, ?? ??????? ?????????? ?????? ???? ???, ? ??????? ???????? ??????? ???????????. ? ???? ???????, ??? ????? ???? ????? ?????? ????????? ??? ?????????. ????????? ??? ??? ????????????? ????????? ?, ?????????????, ???????? ?? ???? ??????. ??????????? ???? Items ? po.xsd ???????? ??? ?????????? item ? quantity, ???????????? ????????? ???. ??????? ? ????? ?????????? ???? ????? ???????????????? ?? ???? ?????????? ? ?????????? ????????? ??? ????????? ????????? type=, ? ??????????? ???????????????? ??????????? ???????? ??? ???????????? ????.

?????????? ???? ????????? ?????:

??????? item ???????????? ????? ????????? ??????????? ???, ????????? ?? ????????? productName, quantity, USPrice, comment, ? shipDate, ? ??????? ??????? partNum. ??????? quantity ???????????? ????? ????????? ??????? ???, ?????????? ?? integer. ??? ???? ??????? ???? quantity ????? ????????? ???????? ????? 1 ? 99.


2.5 ?????????? ????????

????? ?????? ????? ????? ???????? ?????????, ?????????? ?????? ???????? (????????, items); ?????????, ??????? ???????? ? ?????????? ?????? ???????? (????????, shipTo); ? ?????????, ?????????? ?????? ???????? ???????? ???? (????????, USPrice). ?????? ?? ??? ?? ????????????? ????????, ??????? ????? ????????, ?? ???????? ???????? ???????? ????; ????????, ??????? ???????? ?????? ????????, ????????? ? ??????????? ???????????; ????????, ??????? ?????? ?? ????? ???????? ??????????. ? ???? ??????? ?? ????????? ??? ????????????? ?????????.

2.5.1 ??????????? ???? ?? ??????? ?????

??????? ??????????, ??? ???????? ???????, ??????? ????? ??????? ? ???????? ???????? ???????? ????. ? ????????? ????? ??????? ??? ?? ????????? ???:

XML-????? ?????? ???????? ?????????? ???????? USPrice, ??????? ???????? ????????? ??????:

??????? ? ???????? ???????. ?????????, ??? ?? ?????? ????????, ??????? ???? ?? ????? ????? ???????, ? decimal - ??????? ???, ?? ????? ???????? ?????????? ????????, ?? ?????? ?????????? ??????????? ???. ????????? ?? ?????, ????? ?????????? ???????? ???? ??????? ?????? ???? decimal, ?? ????????? ???????? ?? ??????: ??? ?????? ??????????? ???????????? ????, ??????? ??????? ?? ??????? ???? decimal? ????? - ?? ?????? ???????? ????? ??????????? ??? ?? ???????? ???? decimal.

????????? ???????????? ???? ?? ???????? ????:

??? ???? ????? ?????? ???????? ?????? ?????????? ????, ?? ?????????? ??????? complexType. ????? ???????, ??? ????? ??? ???????? ?????? ?????????? ?????? ? ?? ???????? ????????????, ?? ?????????? ??????? simpleContent. ???????, ?? ???????? ????? ???, ???????? ??????? ??? decimal. ?????????? ???? decimal ??????????? ? ?????????? (????? ????????????? ???????????? ??????????) ???????? currency. ????? ???????? ??????????? ????? ????? ??????????? ? ??????? 4. ?????? ????????????? ? ????????? ???????? internationalPrice, ?????????? ? ??????????? ???? ??????? XML-?????, ????????????? ? ?????? ??????? ??????.


2.5.2 ????????? ??????????

????? ?????? ????? ???? ???????????????? ??? ??????????? ?? ?????????, ?????????? ???????????. ??? ???? ???????? ??????? ????????? ??????????? ???????? ?????????? ??????. XML-????? ????? ??????????????? ???????????, ??? ?????????? ?????? ????? ????????? ?????? ? ?????????????. ??? ??????, ??? ?????????? ?????? ????? ????????????? ? ????? ?????????.

??? ??????????? ?????????? ????????? ??????? ????????? "?????? ???????", ??????? ???????? ???? ????????, ??? ? ????? ?? ???????. ??????? ?????? ???????:

???????? ???????? ?? ?????, ???????????? ????? ?????????? ? ?? ????????? ?????????????. ????? ?????????? ????? ?????????? salutation, quantity, productName ? shipDate, ??????? ???????? ????????? ?????????? letterBody. ???? ?????????? ??????? ????? ?????????? ?????????? letterBody.

??????? XML-????? ????????? "?????? ???????" c ??????????? letterBody:

????????, ???????????? ? ?????? ??????? ?????????, ? ?? ???? ??????????, ? ??????? ?????????? element ? complexType ??????? ?? ??? ?????????????. ????? ????????? ?????????? ?????? ????????? ????? ????????? ?????????? letterBody, ??????? mixed ? ????????? ??????????? ???? ????? true.

???????? ????????, ??? ????????? ??????, ?????????? XML-??????, ??????????? ?????????? ?? ????????? ?????? ???????? XML 1.0 (http://www.w3.org/TR/2000/REC-xml-20001006). ? ????????? ?????? ?????????? XML-?????? ??????? ? ????? ???????? ?????????, ???????????? ? ?????????-??????? ?????? ??????????????? ? ???????? ? ??????? ???????? ?????????, ????????? ? XML-?????. ????????, ? ????????? ?????? XML 1.0, ??????? ? ????? ???????? ?????????, ???????????? ? ????????? ?? ??????????????. ? ?????, ?????????? XML-?????, ????????? ????????? ?????????????? ?????????? ????????? ?????? ??????????? ???????? ? ??????? ?? ????????? ?????? XML 1.0, ??????? ???????????? ????????? ???????? ??????????? ????????.


2.5.3 ?????? ??????????

?????? ???????????, ??? ??????? internationalPrice ????? ???????? ???????????? ?????? ? ???? ??? ???????? ?????????, ? ?? ??? ???????? ???????? ? ??????????? ????????. ????????:

????? ??????? ?????? ?? ????? ???????? ??????????. ????? ?????????? ???, ?????????? ???????? ?????, ?? ?? ????????, ?????????? ???, ??????? ????????? ???????? ? ??? ?????? ?????? ???????????, ?? ??? ???? ?? ????????? ??????? ?????????.

?????? ??????????? ???:

? ???? ???????, ?? ?????????? ????????? ??? ? ??????? ????????? complexContent, ?? ???? ??????????????, ??? ?? ????? ????????? ?????? ????????. ???????? complexContent ??????? ? ???, ??? ?? ???????????? ???????????? ??? ????????? ?????? ???????????? ????, ? ??????? restriction ? ?????????? anyType ????????? ??? ????????, ?? ?? ?????? ???????? ?????????? ???????? (????? ???????? ??????????? ??????????????? ? ?????????? 4.4). ? ??????????????? ??????? ???????? ??? ??????? internationalPrice, ??????????? ???? ????????, ????? ????????? ? ?????????.

?????????? ????????? ??? ?????????? ??????? ???????? ???????? ???????????? ?????????. ??????? internationalPrice ????? ???????? ??????.

?????????? ?????????? ??????? ???????????? ????:

???? ?????????? ????????? ???????? ??????, ??? ??????????? ???, ???????????? ??? simpleContent ??? complexContent ???????????????? ??? ?????????? ???????? ???????????? ????, ??????? ?? ????????? ?????????????? ?????????? anyType.

2.5.4 anyType

anyType ???????????? ??????????, ?????????? ?ur-typ (http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Type_Derivation), ??????? ???????? ??????? ????? ???????????? ???? ??????? ? ??????????? ?????. ??? anyType ?? ???????????? ???-???? ???? ??????????. ??? anyType ???????????? ??????? ?????? ?????, ????????:

?????????? ????????, ???????????? ???? ???????? ????? ?? ??????????????. ??????? ????? ????????? ???????? 423.46, ?? ??? ????? ???? ? ????? ?????? ?????????????????? ????????, ??? ????? ???????? ? ?????????. ??????????, anyType - ??? ???, ?????????? ?? ?????????. ??? ??? ????????????? ?????????? ????? ????????? ????????? ???????:

???????? ? ???????????? ??????????? ????? ???????????, ????????, ? ?????? ????????? ?????????? ???????????? ????? ? ????????? ???????????? ????????. ? ???? ?????? ???????? ?? ????????? ?????????? ??? ??????? ???????????? ??? ????? ?????????? ????? ???? ?????? ???????????. ??? text, ????????? ? ?????????? 5.5 - ?????? ?????? ????.


2.6 ?????????

???? XML-????? ???????????? ??? ???????? ??????????????? ??? ????????? ?????. ?????????? ???? ????????? ????????????? ??? ??? ?????? ?????????, ??? ? ??? ?????? ???????????. ? ????? ?????? ?? ???????, ?? ????????? ???????? ????? ? ?????????? ?? ????????? ????? ? ???????? documentation, ? ??????? ????????????? ????????? ?????????? ??? ?????? ????????? ?????????. ?? ??????????? ??? ???????? ????? ???????????? ???????????? ??????? xml:lang ?? ????? ?????????? documentation. ?????? ????? ????? ??????? ???? ???? ?????, ??????? ??????? xml:lang ? ???????? schema.

??????? appInfo, ??????? ?? ?? ????????? ? ????? ?????? ???????, ????? ??????????????, ????? ???????????? ?????????? ??? ???????????????? ???????, ?????? ?????? ? ?????? ??????????. ?????????? ??????, ????????????? appInfo ?????????? ? ????? (http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#schema), ??????? ? ????????? "XML-?????. ????? 2: ???? ??????" ????????? ??????? ????. ????????, ?????? ???????? appInfo ???????????? ?????????? ? ???, ????? ?????? ????? ???? ????????? ? ??????? ?? ??????? ?????. ???????????? ??? ?????????? ???? ???????????? ??????????? ??????????? ??? ?????????????? ????????? ?????? ????????? "XML-?????. ????? 2: ???? ??????".

? documentation, ? appInfo ???????? ????????????? annotation. ??????? annotation ?????? ????????? ? ?????? ??????????? ????. ? ??????????? ???? ??????? ???????? annotation ????????????? ??????? ?????????? ???????? ? ??????? ??????????? ???????????? ????. ???????? annotation ? ?????????? ???????? ? ??????????? ????:

??????? annotation ????? ????? ????????????? ? ?????? ?????? ?????????? ????? XML-?????, ????????, ????? ??? schema, simpleType, ? attribute.


2.7 ???????? ??????? ???????????

??? ??????????? ??????????? ????? ? ????? ?????? ?? ??????? ???????????? ????? ?????????????????? ?????????? ?????????, ??????? ?????? ????????? ? ?????????-???????. ????????? ? ???????? ??????? ????????, ???????????? ? ??? ?????????? ?????? ??????????? ??????? ????, ???????? ??????????????, ???? ??????? minOccurs ????? ???? ??? ????? ???? ?????????? ? ??????????? ?? ???????? ????????? minOccurs ? maxOccurs. XML-????? ????? ????? ?????????? ??????????? ????????? ?????? ????????? ? ?????? ?????? ???????????. ??? ??????????? ???????? ???????, ??????????? ? XML 1.0 ? ???? ????????? ?????????????? ???????????. ???????, ??? ??????????? ?? ????????? ? ?????????.

XML-????? ????????? ?????????? ????????????? ?????? ?????????, ??????? ????? ?????????????? ? ??????? ??????????? ???????????? ????. ????? ????? ???? ?????????? ??????????????? ?????? ?????????, ??????? ?????? ? ?????????? ?? ????????????? ?????? ????? ?????????? ? ????????? ? ??? ?? ????? ??????????????????, ? ??????? ???? ?????????. ?????? ? ???, ?????? ????? ????? ???? ?????????????? ????? ???????, ??? ?????? ???? ?? ????????? ?????? ????? ????????? ? ?????????-???????.

??? ??????????? ?????????????? ? ??????????? PurchaseOrderType ?? ????? ?????? ?? ??????? ?????? ??? ??????, ??? ??? ????? ?????? ????????? ???? ??????????? ???????? ??? ???????? ?????? ??????????? ? ????????, ???? ????? ? ??????????? ? ???????? ????? ?????????? ????? ? ??? ?? ?????????.

?????? ?????? ? ??????????????????:

??????? ?????? ? ?????? choice ???????????? ???????, ?? ???????? ? ?????????-??????? ????? ????????? ?????? ???? ?? ??? ???????? ?????????. ??????? choice ????? ???? ????????. ???? ?? ??? ???????? - ??????? group, ??????? ????????? ?? ????????????? ?????? shipAndBill, ? ??????? ?? ?????????????????? ????????? shipTo, billTo. ?????? ??????? - singleUSAddress. ?????????????, ? ?????????, ??????? purchaseOrder ?????? ????????? ??? ??????? shipTo, ?? ??????? ??????? ??????? billTo, ??? ??????? singleUSAddress. ?? ????????? ?????????? ?????? choice ??????? ?????????? ????????? comment ? items. ? ???? ??????? ? ??????? ?????????? ?????? ? ?????????? ????????? ???????? ????????? ?????????? ????????? ?????????????????? sequence. ?????????? ???? ??????????????????? ????????? ??????? ???????, ?? ???????? ?? ??????? ?????? ????????? ???????????, ? ?? ???? ???????????? ???????.

??? ??????????? ????????? ????????? ? ?????? ?????????? ??? ???? ???????????. ??? ???????? ?????? ?????? ????????? ???? ??? ??? ?? ?????? ????????? ?? ????, ?????? ?????????? ??? ????? ? ???????????? ???????. ????????? ??????? all ???????????? ?????? ??????????? ??????. ????? ????, ??? ???????? ???????? ?????? ?????? ???? ??????????????? ?????????? (?? ????????), ? ??? ???????? ?????? ????????? ?? ????? ?????? ????. ?? ???? ??? ????????????? ????????? minOccurs = 0 ? maxOccurs = 1. ????????, ????? ????????? ???????? ????????? purchaseOrder, ????????? ? ????? ???????, ????????????? PurchaseOrderType ????????? ???? ???????. ?????? 'All':

? ???????????? ? ???? ???????????? ??????? comment ????? ????????? ? ????? ????? purchaseOrder, ?????? ??? ??, ??? ? ????? ????????? shipTo, billTo ??? Items. ?? ??? ???? ?? ????? ????????? ?????? ???????. ????? ???? ?????????? ?????? all ?? ????????? ??? ????????? ???????? ????? comment ??? ??????, ??? ???????????? ??????????? ??? ????????????? ??? ????????????? ?????????. ???? XML-????? ????????????, ??? ?????? all ????? ?????????????? ??? ???????????? ??????? ? ?????? ?????? ???????????. ??????? ??????? ????????? ?????????? ???????.

?????? ????????? ????????????? ?????? 'All':

????????????? ? ??????????????? ??????, ??????? ???????????? ? ??????? ??????????? (group, choice, sequence, all) ????? ????? ???????? minOccurs ? maxOccurs. ?????????? ? ????????? ????????? ??????, ?????????????? ?????? XML-?????, ? ???????????? ???????? minOccurs ? maxOccurs, ???????? ??????????? ????? ?????? ???????????, ??????? ????? ???? ???????? ? ??????? XML 1.0 DTD. ????? ????, ?????? all ???????????? ?????????????? ??????????????? ????? XML-????? ?? ????????? ? XML 1.0 DTD.


2.8 ?????? ?????????

???????????, ??? ?? ????? ?????????? ????????? ?????????? ? ?????? ???????? ? ?????? ?? ???????. ????????, ??? ??????? ???????? ? ???????????????? ??????? ????????. ?? ????? ?????????? ?????, ??????? ? ??????????? ???? item (??????????) ?????????? ????????? weightKg ? shipBy .

????????? ????????? ??????????????? ? ??????????? ????:

?????? ?????, ?? ????? ??????? ????????????? ?????? ?????????, ?????????? ??? ??????????? ???????? ???????? item, ? ? ?????????? item ??????? ?????? ?? ??? ??????.

?????????? ????????? ? ?????????????? ?????? ?????????:

?????????? ?????? ????????? ???????? ?????????? ? ????????? ??????????? ?????, ??? ??? ?????? ????????? ????? ???? ?????????? ? ??????????????? ? ????? ?????, ? ?????? ?? ??? ????? ?????????????? ? ?????????? ???????????? ? ???????????. ??? ?????????????? ????? ????????? ?????? ?? ???????? ?? ???????? ????????? ? XML 1.0. ???????? ????????, ??? ?????? ????????? ????? ????????? ?????? ?????? ?????????. ???????? ????? ????????, ??? ? ?????????? ????????? ? ?????? ?? ?????? ?????????, ?????? ?????????? ? ????? ??????????? ??????????? ?????.


2.9 ???????? Nil

???? ?? ???????? ? ?????? ?? ???????, ????????????? ? po.xml, Lawnmower, ?? ????? ???????? shipDate. ????? ?????, ????????, ???????????? ????? ???????????, ????? ??????? ??? ?? ??????????? ???????. ?? ??????, ?????????? ???????? ?? ???? ?????-???? ???????????? ??????????. ??? ????? ????????? ?? ??, ??? ?????????? ???????????, ??? ?? ????????????? ????????????????, ??? ??????? ????? ????????????? ?? ?????? ???????. ?????? ?????????? ??????????? ?? ??????????? ???????, ??????????? ??? ???????????? ?????????? ???? ? ??????? ????????, ? ?? ????????????? ?????????. ????????, ??? ????? ???? ???????? ??? ?????? ? ??????? ?????????? ("Null") ??????????? ???? ??????. ??? ???? ????? ? ????? XML-????? ??????? Nil-????????. ???? ???????? ????????? ???????? ?????????? c ??? ??? ???????? ????????.

??? ????????? ??????????? ??????? ???????? ???????? Nil-???????? XML-????? ?????????? ??????????? ???????. ??????? ???????, ????????? ?????? ???????? ???????? ???????????? ?? ? ??????? ??????-???? ???????????? Nil-???????? ???????????, ? ? ??????? ???????????? ????????, ????????????? ??????????? ??????? ???????? ????????. ??? ??????????? ??????????????, ?????????? ???????? shipDate ??????? ???, ????? ????? ???? ???????????????? ??? ?????? ????????:

??? ???? ????? ???? ??????? ? ?????????, ??? shipDate ????? ?????? ????????, ????????????? ??????? nil ?????? true. ??? ????????????? ????, ??? ??????? xsi:nil ??????????? ????? XML-?????, ? ?? ????? ??????? ???? ????????? ? ????? ???????? ?????????? ??????? ???????????? ????? XML-????:

??????? nil ????????? ? ??????? ???????????? ????? XML-?????, http://www.w3.org/2001/XMLSchema-instance, ? ??????? ? ?????????-??????? ???????????? ? ????????? (????? ??? xsi:), ????????? ? ???? ??????? ?????????????. ??? ? xsd:, ??????? xsi: ???????????? ? ???????????? ?? ??????????? ???????????. ???????, ??? nil-???????? ???????? ?????? ? ????????? ?????????, ? ?? ? ????????? ?????????. ??????? ? xsi:nil="true" ?? ????? ????? ???????? ??????????, ?? ????? ????? ????????.


3 ?????????????? ??????? I: ??????? ????????????, ????? & ????????????

????? ????? ??????????????? ??? ????????? (???????) ??????????? ????? ? ?????????? ?????????, ????? ??????? ??????????? ????????????? ???????? ????????????, ??????????? ??????? ??????? ?????????????. ??????? ??????? ???????????? ???? ??????????? ????????? ??????????? ? ??????????, ????????????? ????????? ????????. ????????, ??????? ??????? ???????????? ????????? ???????? ??????? ??????????? ? ??????? ????? XML-????? ?? ????????, ???????????? ? ?????????????? ??????? ????? ???????? ?????????? ?????????. ?????? ??????? ??????????? ???????? ???????? ???????????? http://www.w3.org/2001/XMLSchema, ? ????????? - ????? ?????? ??????? ???????? ???????? ????????????.

????? ?? ????? ?????????, ??? ???????? ????????????? ????? ??? ????? ?????? (? ??????? ????????, ??????????? ???????????? ?????), ?? ?? ?????? ???????????????? ?????????? ????????? ? ?????????, ? ????? ??????????? ????? ? ?????? ??????? ????? ?????????????? ??? ???????? ??????????????? ????????? ? ????????? ? ?????????. ??????? ??????? ???????????? ?????? ?????? ???? ? ???????? ?????????????. ???? ???????? ???????? ???????????? ????? ??????????? ? ????????? ???????.

?????? ????? ??????????????? ??? ?????, ??????? ?????? ?? ??, ??? ????? ??????????????? ???????? ? ????????, ?????????????? ? ?????????. ????? ????? ??????, ????????????? ?? ????????? ???????? ??????????? ????????? ? ????????? ? ????????? ?????? ???? ??????????????? ????? ??? ??????? (???????? ?? ?????????) ????????? ???????? ????????????. ????? ?????? ????? ???????????? ???????????????? ????????? ????????? ? ????????? ????? ???????? ?? ????????? ???????? ?????????? ????????? ????? ? ??????????. ????????? ?? ???? ???????? ?? ?????????? ? ????????? ????????.


3.1 ??????? ??????? ???????????? ? ?? ??????????????? ????????? ???????

? ????? ???????? ????? ?????? ?? ??????? (po1.xsd) ?? ???? ????????? ??????? ??????? ????????????, ? ??????????, ??? ???????? ???????????? ???????? ? ???????? ???????????? ???????? ?????? ???? ?? ???????????????. ??????? ??????? ???????????? ? po1.xsd ???????? ????????? ???????? targetNamespace ? ????? "http://www.example.com/PO1".

???????????? ????????? ????????? ? ????????? ????? ???? ????????? ?????????? ????? ?????????, elementFormDefault ? attributeFormDefault, ???????? schema, ??? ????? ???? ?????????? ???????? ??? ??????? ?????????? ?????????? ? ??????? ???????? form. ???????? ??????? ?? ???? ????????? ????? ???? ??????????? ? unqualified ??? ? qualified, ??? ????????? ?? ??????? ????????????????? ???????? ??????????? ????????? ? ?????????.

? po1.xsd ????????? ????????? ???????? ??????????????????? ????????? ? ????????? ????? ?????????? ????????? elementFormDefault ? attributeFormDefault ???????? ??????? unqualified. ?????? ??????, ??? ???????? ? ????? ????????? ????? ?? ????????, ?????? ??? ??? ???????? ???????? ??? ????? ????????? ????????? ?? ?????????. ?? ?????? ?? ????? ? ????? ???? ??? ????, ????? ???????? ??????? ????? ???? ????????? ? ??????? ??????????, ??????? ?? ?????? ?????.

????? ?????? ?? ??????? ? ??????? ??????? ?????????????, po1.xsd:

????? ???????, ??? ??????????? ??????? ??????? ???????????? ??????????? ???? ?????, ?????????? ?????? ?? ?????????? ????????? ? ??????????? ?????. ?????? ? ????? ?????. ????? ?? ?????????? ??? ? ????????? USAddress, ??????? ??????? ?? ????????? name, street, ? ?.?. ? ?????????? ???????????, ??? USAddress ?????????? ? ?????? ???????? ???????????? ?????. ????? ?? ?????????? ??? ? ????????? PurchaseOrderType, ??????? ??????? ?? ????????? shipTo, billTo, comment, ? ?.?. PurchaseOrderType ????? ?????????? ? ?????? ???????? ???????????? ?????. ???????? ????????, ??? ?????? ?? ??? ? ??????????? ???? ????????? ????? ???????: po:USAddress, po:USAddress ? po:comment, ? ???? ??????? ?????? ? ??????? ????????????? http://www.example.com/PO1. ??? ?? ?? ????? ??????? ????????????, ??? ? ??????? ??????? ???????????? ?????. ??????? ?????????? ???? ????? ????? ?????, ??? ??????????? ???? USAddress ? ?????????? ???????? comment ????????? ? ???????? ?????? ?????. ?? ????? ?????? ????????? ?? ??????????? ????? ??????????? ? ?????? ????? ? ?????? ??????? ??????? ?????????????. ?????????????, ??????????? ????????? ??????????????? ????? ? ?????????????? ????????? ?? ????? ? ?????.

? ?????? ????? po1.xsd ?? ????????? ???????? purchaseOrder ? comment. ??? ?????????? ? ??????? ??????? ???????????? ?????. ??? ???????? purchaseOrder ????? ??????? ????? ??? ? ??? ???????? USAddress. ????????, ??????? ???? ? ???????? comment ???????? ??? string ?? ??????????.

???? ?????????? ?????? ????, ??? ??????? ??????? ???????????? ????? ??????????? ??????????????? ????????. ????? ?? ??????? ? ???????????????????? ?????????? ?????????, po1.xml:

? ????????? ????????? ???? ??????? ???????????? http://www.example.com/PO1, ??????? ??????? ? ????????? apo:. ???? ??????? ???????????? ??? ????, ????? ??????????????? ??? ???????? ? ?????????: purchaseOrder ? comment. ??????? ???????????? ????????? ?? ??, ??? ? ??????? ??????? ???????????? ????? ? ????? po1.xsd. ??????? ??? ??????? ????????? ?????????? ????? ?????, ? ????? ????? ?????? ?????????? purchaseOrder ? comment. ??????? ??????? ???????????? ??????? ? ??? ??????, ??? ??? ???????? ??????? ?????????????, ? ??????? ????????? ???????? purchaseOrder ? comment. ??????? ??????? ??????? ???????????? ????? ????????? ???????????? ??????????????? ??????? ??????????? ?????????.

??????? apo: ???????? ? ?????????? ????????? purchaseOrder ? comment. ????? ????, elementFormDefault ? attributeFormDefault ???????, ????? ??????? ?? ?????????? ?? ? ?????? ?? ????????? ????????? ????? shipTo, billTo, name ? street, ? ?? ? ?????? ?? ????????? (??????? ??? ????????? ????????). ???????? purchaseOrder ? comment ???????? ???????????, ??? ??? ????????? ? ????????? ????? ? ?????, ? ?? ? ???????? ????????? ??????-???? ????. ????????, ?????????? ???????? purchaseOrder ? po1.xsd ???????? ???????? ?? ????????? ? ???????? schema, ????? ??? ?????????? shipTo ???????? ???????? ?? ????????? ? ???????? complexType, ??????? ?????????? ??? PurchaseOrderType.

???? ????????? ???????? ? ???????? ?? ???????????????, ?? ?????? ??? ???????? ?????????? ?????????? ????? ? ??? ??? ???? ??????? ????????????? ?????? ? ???????????? ???? ???? ??????????. ???????? ????????? ??????????? ???? ????? ????? ??? ?????? ???????? ??????? (???? purchaseOrder) ???????? ??????????. ????? ??????????????? ????? ?????? ???????? ???????. ???? ????? ?????, ??? ??? ???????? ????????? ?????????, ?? ??? ???????? ? ????????? ????? ????? ???????, ??????? ???????? ?????? ? ??????? ?????????????, ??????????? ?? ????????? (?? ????????? ???? ?????? ? ?????????? 3.3). ? ?????? ???????, ???? ??? ??????-???? ??????????? ??????? ??? ?????????? ? ????????? ??????????, ?? ????? ?????????? ????? ????????? ? ????????? ?????? ????? ??? ??????????? ?????????? ????????? ? ?????????? ????????? ? ?????????.


3.2 ??????????????? ????????? ???????

???????????? ????????? ? ???????????? ????????? ????? ???? ??????????? ??????????. ?????? ? ???????????? ???????????????? ????????? ?????????. ??? ???????? ????, ??? ??? ???????? ??????????? ???????? ? ????? ?????? ???? ???????????????, ?? ????????????? ???????? elementFormDefault ?????? qualified.

??????????? po1.xsd ? ???????????????? ?????????? ?????????:

???? ?????????? ??????????????? ? ?????????? ????? ????????, ? ??????? ??? ???????? ??????????????? ????. ????? ?? ??????? ? ???? ?????????????????? ?????????? ??????????:

????????? ???????? ????? ???????????? ??????? ???????? ???????. ??????? ???????????? ?????????????? ??????? ?????????????, ??????????? ?? ????????? (?????? ? po2.xml).

????? ?? ??????? ? ???????????? ????????? ???????? ?? ?????????. po2.xml:

? po2.xml ??? ???????? ? ????????? ??????????? ???? ?? ???????? ????????????, ??????? ????????? ?? ????????? ? ??????? ???????? xmlns. ?????????????, ????? ?????????? ???????? ? ????????? ?????????? ????????.

?????? ?????? ????????????? ????????????????? ????????? - ????? ? ??????? 5. ??? ????????? ????? ??????? ????????????????? ?????????.

???????????? ????????? ????? ?????? ?? ???????????? ?????????. ????????, ??????? ?????? ???? ??????????????? (???? ?????? ??? ????????? ?????????, ???? ?????? ??? ??????? attributeFormDefault, ?????????? ? qualified), ? ?????????? ?????????? ? ?????????. ???? ?? ???????? ?????????????????? ???????? - ??????? xsi:nil, ??????? ??? ?????????? ? ?????????? 2.9. ??????????, ????????, ??????? ?????? ???? ???????????????, ?????? ????? ???? ???????? ????????. ??? ??????? ? ???, ??? ???????????? XML-Namespaces (http://www.w3.org/TR/1999/REC-xml-names-19990114/) ?? ???????????? ???????? ??????? ???????? ???????????? ??? ????????? ?? ?????????. ????????, ??????? ?? ??????? ???? ????????????????, ?????????? ? ?????????? ??? ?????????, ??? ???????? ???????? ???????.

???????? ????????????, ??????? ?? ?? ??? ??? ?????????, ???????? ????? ?????????? ???????????? ????????? ? ????????? ? ???????? ??????????? ???????? ???????? ????????????. ? ??????? ???????? form, ???????? ????????? ????????????? ?????????? ??????????. ????????, ???? ?????????, ????? ???????? ??????????? ??????? publicKey ? ?????????? ??? ??????????????, ?? ????????? ??? ????????????? ????????.

???????????? ?????? ????????:

????????, ??? ??? publicKey, ???????? ???????? form ???????? ???????? ???????? attributeFormDefault. ????? ?? ??????? ??????? form ????? ???? ???????? ? ?????????? ????????. ???? ?????????? ????????, ??????? ????????????? ??????????? ?????.

???????? ? ????????????????? ?????????:


3.3 ?????????? ?????????? ? ????????? ? ?????????? ????????????

?????? ????? ??????????? ?????, ????? ???????????? ???? ????????? ? ???????? ???????? ???????????? ?????????. ??? ???? ????? ??????? ?????, ? ??????? ??? ???????? ???????? ???????????. ??? ?????????? ????????????? ????????? < !ELEMENT> ? DTD. ? ??????????????? ???????, ?? ???????? ???????? po1.xsd ???, ??? ??? ???????? ????????? ?????????. ???????? ????????, ??? ? ???? ??????? ?? ???????? ???????? elementFormDefault ? attributeFormDefault. ??? ??????? ??? ????, ????? ???????????, ??? ????? ????????? ?????? ?????????? ???????? ? ????????, ???????? ???? ????????? ???????? ???????????????. ???????????????? ?????? po1.xsd, ???????????? ?????? ?????????? ?????????? ?????????:

? ??????? ????? "???????????" ???????? po1.xsd ????? ????????? ???????????? ????? ?????????????? ????????? po2.xml, ??????? ????? ????????????? "??????????????????" ???????? ????? po1.xsd. ??????? ???????, ??? ???????? ????? ????? ????????? ???????????? ?????? ? ???? ?? ?????????, ??? ??????? ???????????? ?????? ?? ?????????. ????? ???????, ? ????? ??????? ??? ???????? ????? ???????, ???? ? ?????? ??????? ????????. ????? ??? ???????? ????????? ?????????, ???????????? ?????????? ?????????? ????????. ????????, ?? ?????? ???????? ?????? ???? ?????????? ??????? ? ?????? "title". ? ????????????????? ? ??????????? ??????????, ?? ?????? ???????? ????????? ????????? ????????? ? ?????????? ??????. ????????, ????? ???????? ????????? ??????? ? ?????? "title", ??????? ????? ???????????? ???????? "book", ? ????? ????????? ???. ? ???????? ??? ?? ????? ????? (???????? ???????? ????????????) ?? ?????? ???????? ?????? ??????? ? ?????? "title", ??????? ???????? ????????????? ???????? "Mr Mrs Ms".


3.4 ????????????? ??????? ??????? ????????????

? ??????? 2 ?? ????????? ?????? ????? XML-????, ????????? ?????, ? ??????? ?? ??????????? ??????? ??????? ????????????, ? ????????, ? ??????? ?? ??????????? ??????? ????????????. ????????? ??????: ?????? ??????? ??????? ???????????? ? ???? ????????, ? ??? ?? ???? ??????????

? ????? ?????? ?? ??????? po.xsd ?? ?? ????????? ?? ?? ??????? ??????? ????????????, ?? ???????? (????????? po:) ?????????? ??????? ??????? ????????????? ????? ? ??????? ?????????? ??????????? ????? ? ?????????? ????????? ? ?????????. ?????????? ????, ??? ? ????? ??????????? ?????????? ???????? ???????? ????????????, ?? ??????????? ? ?????????? ??????????? ?????? ?????, ???? USAddress ? purchaseOrder, ????????? ??? ????????????????? ????????. ??????? ??????? ? ????? ??? ?? ?????? ????????, ????????????? ? ??????? ?? ??????????? ???????? ???????????? ????????????? ? ??????? ?? ?????????. ?????? - ??????? purchaseOrder ??????????? ? ?????????????? ?????? ?? ??? PurchaseOrderType. ????????, ??? ???????? ? ????, ????????????? ??????? ????? XML-?????, ???????????? ? po.xsd ???? ??????????????? ????????? xsd:, ??????? ?????? ? ??????? ????????????? ????? XML-?????.

? ???????, ????? ????? ??????????? ??? ???????? ???????? ????????????, ?????? ?????????????, ????? ??? ????????, ????????????? ??????? ????? XML-?????, ???? ???? ??????????????? ????????? xsd:, ??????? ?????? ? ??????? ????????????? ????? XML-????? (??? ? po.xsd). ????? ???????????? ??????????? ???, ??? ???? ???????? ? ???? ????? XML-???? ??????????? ? ??????? ????????????? ????? XML-???? ?? ?????????, ?? ???? ??? ?????????, ?? ?????? ?? ???? ???????????? ? ????? XML-????? ????? ?????????? ???????? ?? ?????? ?? ???? ???????????? ?????????????.

?????????? ????????? ? ????? ??? ???????? ???????? ???????????? ???????????? ??? ??????????? ??????????????????? ????????? ? ?????????. ?? ???? ??? ?????????? ???????????? ?????????, ??? ??????? ?? ?????? ??????? ???????? ???????? ????????????: ?? ?????, ?? ???????? ?? ????????? (xmlns:).


4 . ?????????????? ??????? II: ????????????? ????? ?? ???????

????? ?????? ?? ???????, ????????? ? ??????? 2 ??????????? ? ????? ?????, ? ??????????? ??????????? ?????, ???? ?????????? ????????? ? ??????????? ?????, ???? ??????? ?????. ? ????????????????, ? ??????? ???? ????????? ??????????? ?????????? ????? ?? ???????????, ????????????? ? ?????????? ??????, ? ????????? ????? ????, ?????????? ?? ???????????? ?????. ? ???? ???????, ?? ????????? ?????????, ??????? ????????? ????? ?????????? ???? ? ?????? ???????? ?????.


4.1 ????? ? ?????????? ??????

????????? ????? ?????????? ????????, ?? ? ????? ????????? ?????????????, ?????????? ????????, ? ?????????????, ?????????? ?????? ?? ?????????? ?? ?????. ?? ???? ????????, ?? ????? ??????????? ????????? ? ???????????? ??????? ?? ????? po.xsd, ? ????????? ?? ? ????? ???? ? ?????? address.xsd. ?????????? ????? ?????? ???????? ? ????? ? ?????? ipo.xsd.

????????????? ????? ?????? ?? ???????, ipo.xsd:

???? ?????????? ???? ? ????????????? ???????? ???????.

?????? ??? ????? ?????????????? ?????? ?? ???????, address.xsd:

????? ?????? ?? ??????? ? ???????? ??????????? ?????? ?????????? ? ???? ????????? ??????: ipo.xsd ? address.xsd. ????? ???????? ???????? ??????? ? ????? ?????????????? ?????? ?? ???????, ??????? ???????, ????? ???????? ?? ? ??????? ???????????? ????? ?????????????? ?????? ?? ???????, ? ????? ipo.xsd ???????????? ??????? include:

< include schemaLocation="http://www.example.com/schemas/address.xsd"/>

??????? include ????????? ??????????? ? ??????????, ???????????? ? address.xsd, ? ?????? ?? ?????????? ??? ????? ???????? ???????? ???????????? ????? ?????????????? ?????? ?? ???????. ????????????? include ????? ???? ?????? ???????????: ??????? ??????? ???????????? ?????????? ????????? ?????? ???? ?? ?? ????? ??? ? ??????? ??????? ???????????? ?????, ? ??????? ???????????? ?????????. ? ??????????? ???? ??????? ??? http://www.example.com/IPO. ????????? ??????????? ? ?????????? ? ?????????????? ????????? include ????????? ???????? ? ????????????? ???????? ???????? ????????????. ? ?????????? 4.5, ?? ?????? ????????, ??????? ???? ??????????? ?????????????? ????????? ?????????? ???????? ????? ????, ????? ??? ?????????.

? ????? ???????, ?? ???????? ?????? ???? ?????????? ????? ? ???? ?????????? ????????. ??????????? ???????? ???????? ?????? ??? ???? ????????, ????????? ????????? ????????? include, ??? ???? ?????????? ???????? ????? ???????? ?????? ????????. ??????, ???????? ??????? ???? ???????? ?????????, ?????? ???? ??? ?????????? ????? ????? ????????? ? ????? ? ??? ?? ??????? ??????? ?????????????.

?????????, ??????? ????????????? ????? ?????????????? ?? ?????????? ?????? (???????), ????????? ? ?????? ?????? ?? "????? ???????" ????? ? ????? ??? ???? ??????? ??????? ????????????. ??????????????? ?? ?????? ????? ?? ??????? ??????? ?? ????????? ????????? ?????. ? ????? ???????, ???????? ipo.xml (??. ????????? 4.3) ????????? ?????? ?? ???? ????? ??????? ??????? ????????????, http://www.example.com/IPO, ? (????????) ?? ???? ???? ?? ??????, http://www.example.com/schemas/ipo.xsd. ??????????? ????? address.xsd ???????????? ????????? ????????? ?????. ? ?????????? 5.4 ?? ??????, ??? ????? ????? ?????????????? ??? ???????? ???????????? ??????????? ?????????, ?????????? ?? ?????????? ??????? ???????????.


4.2 ????????? ??????????? ????? ???????????

???????? ???????? ??????????? ???????? ? ??????????? ???????????? ???? Address (??. address.xsd). ??? Address ???????? ???????? ???????? ??????: ???, ????? ? ????? (????? ??????????? ?????? ???????????? ?? ?? ???? ???????, ?? ?????? ???????? ??? ?????? ???????). ?? ???? ????????? ????? ?? ???????? ??? ????? ??????????? ????, ??????? ???????? ??? ???????? ??????????????? ???? ???? ?????????????? ????????, ??????????? ??? ???????? ??????? ???????? ? ??? ? ??????????????. ????????, ??????? ?? ????? ??????????, ????? ???????? ????? (???????????) ???????? ????, ???????? ???????????? ??? - ?? ?? ????? ????????, ??????? ?? ???????????? ? ?????? 2.5.1. ??????? ??????????? ? ???, ??? ??? ???????? ???, ??? ??????????? ???, ????? ??? ???????? ????? ? ?????????? ??????? ??? ??????? ???.

? ??????? ???????? complexType ?????????? ??? ????? ??????????? ????, USAddress ? UKAddress. ????????? ??????? complexContent, ?? ?????????, ??? ?????? ??????????? ????? ????? ??????????, ?? ???? ???????? ????????. ????? ????, ? ??????? ???????? base ???????? extension ?????????, ??? ????? ??? ????????? ????? ?????????? ???????? ???? Address. ????? ??????????? ??? ??????? ???????????, ??? ?????? ??????????? ???????? ?????? ??????????? ????????? ???? ???? ?????? ??????????? ???????? ? ???????? ???????????? ????. ????? ????, ??? ?????? ??????????? ????????? ??? ??? ???????? ?????? ????????? ??????????????????. ? ?????? UKAddress, ?????? ??????????? UKAddress ??????? ?? ?????? ??????????? Address ???? ?????????? ???????? postcode ? ???????? exportCode. ????? ?????????? ?????????? ?????????? ???? UKAddress ? ????, ?????? ???????? ?????????? ????.

?????? ??????????????? ?????????? UKAddress:


4.3 ????????????? ??????????? ????? ? ??????????

? ???????? ?????? ??????? ?????? ?? ??????? ???????????? ? ????? ?? ??????? ????????, ??????? ????? ?????????? ? ????????? ???????. ??????, ????????? ???????? ??????? ? ?????? ????? ???????? ?? ???????????? ????????????. ???? ?????????? ?????? ?????????????? ?????? ?? ???????, ipo.xml, ? ??????? ????? ??????????? ? ??????????????, ? ???? ?????????? ? ???. ????????, ??? ??????????????? ?????????? ? ????? ??? ????????? ?????????? ????????????? ???????, ?????????????? ?????????? ????? ???? ???????, ???????? ?? ?? ???? Address.

? XML-????? ?????????? billTo ? shipTo ??? ???????? ???? Address (??. ipo.xsd) ??????? ???????????? ? ????????? ??? ???????? ?????????????? ?????? ? ??? ?????, ??? ?????? ????????? ???????? ???? Address. ??????? ??????? ????????, ?????????? ?????? ???? UKAddress ????? ????????????? ??????????, ???? ??? ?????????? ????????? ? ????????? ?? ??? ?????, ??? ????????? ??????? ???? Address (???????????????, ??? ?????????? UKAddress ????????????? ?????????). ??? ???? ????? ??? ??????? XML-????? ????????, ? ??? ???????? ????, ????? ?????? ??????????? ??? ???????????, ??????????? ??? ?????? ???? ??????????????? ? ?????????-???????. ??? ???????????????? ? ??????? ???????? xsi:type, ??????? ??????????? ???????? ???????????? ????? XML-?????. ? ??????? ipo.xml ????????????? ??????????? ????? UKAddress ? USAddress ???????????????? ? ??????? ???????? ????????? ????????? xsi:type.

????????????? ????? ?? ???????, ipo.xml:

??? ????????? ?????????????? ??????????? ????? ??????????? ? ?????????? 4.8.


4.4 ??????????? ??????? ????, ?????????? ????? ???????????

?????????? ??? ?????? ???????? ????? ??????????? ?????. ?????? ????? ??????? ?? ?????????? ?????? ??????????? ???????? ????, ? ?????? - ?? ??????????? ?????? ??????????? ???????? ????. ??????????? ??????? ????? ????????????? ?????????? ??????????? ??????? ?????, ?? ??????????? ????, ??? ??????????? ??????? ????? ??????????? ?????????? ????, ? ?? ???????? ?????????? ???????? ??? ? ?????? ???????? ????. ??????? ???, ?????????? ???????????? ????? ????? ?? ???? ??????? ???, ?? ??????????? ????, ??? ??? ?????????? ????? ??????????, ??? ??????????????? ?????????? ? ??????? ????. ??????????, ????????, ?????????????? ????? ????? ???????? ????????????? ????????, ?????????????? ? ??????? ???? (??? ??? ????? ????? ? ???????????? ??????? ?????). ??????? ???????, ??????????, ?????????????? ? ?????? ?? ????????? ???????? ???? ????? ?????? ? ?????? ?? ?????????? ????????????? ????.

????????, ???????????, ??? ?? ????? ?????????????? ??????????? ?????? ????????? ? ????????????? ?????? ?? ??????? ???, ????? ?? ???????? ?? ????? ?????? ?????? ? ??????. ?????, ??????????? ? ipo.xsd, ????????? ???????? items ?????????? ??? ?????-???? ???????? ?????????. ????? ????????? ????? ??? ConfirmedItems, ?? ??????? ????? ?????????? ????? ??? ? ?????????, ??? ?? ??????? ???????????? ???????? ???? Items. ??? ???? ?????? ????? (????? ????????????) ???????? ???????????? ????? ????????? item. ???????? ????????, ??? ????, ?????????? ???????????? ?????? ????????? ??? ?????????? ??????????? ???????? ????, ??????? ?????? ???? ???????? ? ??????????? ???.

??? ConfirmedItems ?????????? ???????????? ???? Items:

? ???????????? ? ???????????? ???? ???????????, ?????????, ????? ?????? ??????? ?? ????? ??? ?? ?????? ????????? ???????? ?????? ????, ????? ??? ?????? ????????? ???? ??? ?????? ???????? ?????????. ??? ?????? ???????? ??????????? ????? ???????? ????????? ?? ???????? ??????? 0 ? ???????? ??????? 1. ???????, ??? ??? ???????? ???? ConfirmedItems ????? ????? ????????? ??? ???????? ???? Item.

??? ??????????? ??????????? ? ??????? 3 ?????????? ????????? ???????? ????, ??? ? ???????? ??????????? ????? ????? ???? ?????????? ?????????? ????????? ? ?????????.

??????? 3 ??????? ???????????

??????? ????????

???????????

??????????

default="1"

????????? ???????? ?? ?????????

fixed="100"

????????? ?????????????? ????????

type="string"

???????????? ????

(minOccurs, maxOccurs)

(minOccurs, maxOccurs)

(0, 1)

(0, 0)

?????????? ??????????????? ??????????; ????? ????? ????? ??????????, ??????? ?????????? ?????????? ? ??????????? ???????????? ????

(0, unbounded)

(0, 0) (0, 37)

(1, 9)

(1, 8) (2, 9) (4, 7) (3, 3)

(1, unbounded)

(1, 12) (3, unbounded) (6, 6)

(1, 1)

-

??????????? ? ??????? minOccurs ??? maxOccurs ??????????


4.5 ??????????????? ????? ? ?????

? ?????????? 4.1 ?? ???????, ??? ???????? ??????????? ? ??????????, ?????????? ?? ??????? ???????, ??????? ?????????? ??????? ??????? ????????????. ???????? include ???? ??????????? ???????????? ????????? ????? ?????????? ????? "??? ????", ??? ????? ???? ???????????.

?? ???????, ??? ???????? ????? ???? ??????????? ? ????????????. ????? ?? ?????????? ???????? ??????????????? (redefine), ??????? ???? ??????????? ?????????????? ??????? ? ??????????? ????, ??????, ? ?????? ?????????, ?????????? ?? ??????? ?????? ?????. ??????? ????????? ?????????, ???????? ???????????????, ???????, ????? ??????? ?????????? ?????????? ? ??? ?? ????? ??????? ??????? ????????????, ??? ? ???????????????? ?????, ???? ??????? ?????????? ????, ??????? ?? ????? ???????? ???????? ????????????, ????? ????? ???? ??????????????. ? ????????? ??????, ???????????????? ?????????? ?????????? ?????? ????????? ???????????? ???????????????? ?????.

????? ????????????????? ???????? ???????????????, ?? ?????????? ??? ?????? ????????? ????????? ? ????? ?????????????? ?????? ?? ???????, ipo.xsd. ?????????? ???????? ??????????????? ??? ????????? ???????????? ???? Address, ???????????? ? address.xsd.

????????????? ??????????????? ? ????????????? ?????? ?? ???????:

??????? redefine ????????? ??????? ???????? include, ????????? ???????? ??? ?????????? ? ??????????? ?? ????? address.xsd. ??????????? ???????????? ???? Address ?????????? ???????? ????????? ?????????? ??? ????, ????? ???????? ??????? country ? ??????????? Address. ???????? ????????, ??? ???????? ??? - ????? Address.

??????, ????? ??? Address ?????????????, ?????????? ??????????? ?? ???? ????????? ?????, ??????? ?????????? Address. ????????, address.xsd ???????? ??????????? ????? ????????????? ???????, ??????? ?????????? ?? Address. ??? ??????????? ???????? ???????????????? ??? Address, ??? ???????? ? ??????????? ???? ?????????.

???????? ipo.xml ???????????? ???????????????? ??? Address:

??????????? ?????? ??? ????????? ???????? ?? ??????? ????, ????? ???????????????? ??? Address ?? ???????????? ? ???????????? ??????, ??????????? ?? ??????????????? ??????????? ???? Address. ?? ???????, ??? ????? ???????? ??????? ????? ??????. ????????, ???? ??? ????????????? ??????? ???????? ??????????? ???? Address, ?????????? ??????????? ???????? country, ?? ??????????????? ???? Address ????? ?????????? ? ?????? ??????????? Address ??????? ? ??? ?? ????? ??????. ??????? ???? ????????? ? ??????????? ??????? (? ????? ? ??? ?? ??????? ??????? ????????????) ?? ?????????? ???????? ??????????? - ???????????. ??????? ??????? ?????????????? Address ??????? ?? ??????. ??????, ??????????????? ?? ???????? ?? ????? ??????, ??????? ???? ???????? ?????? ?????????????? ?????????.


4.6 ?????? ??????

XML-????? ???????????? ????????, ?????????? ???????? ??????, ??????? ????????? ???????? ???? ???????? ???????. ????? ?????, ???????? ????? ???? ?????????? ? ??????????? ?????? ?????????, ???????, ??? ???????, ???????? ??????????? ??? ????????, ??????????? ????????. ???????? ????????, ??? ???????? ??????? ?????? ???? ???????? ??? ??????????. ??? ???????????, ?? ??????? ??? ???????? customerComment ? shipComment, ? ????????? ?? ? ?????? ??????, ??????? ??????? ??????? - comment. ? ?????????? customerComment ? shipComment ????? ?????????????? ?????, ??? ?? ????? ???????????? comment. ???????? ? ?????? ?????? ?????? ????? ??? ?? ????? ???, ??? ? ???????? ???????, ??? ??? ????? ????? ???, ??????? ??? ???????? ?? ???? ????????? ????????. ???? ?????????? ??????, ? ??????? ??? ????? ???????? ???????? ??????? comment. ?????????? ?????????? ????????? ??? ???????? comment:

????? ??? ?????????? ????? ????????? ? ????? ?????????????? ?????? ?? ???????, ????? ? ????????? ??????? comment ????? ???????? ?????????? shipComment ? customerComment.

??????? ipo.xml ? ??????????? ??????????:

???????? ????????, ??? ????? ???????? ???????? ???????? ??????, ???? ??????? ???????? ?? ?? ??????? ?????????, ?? ??? ????????????? ???????????????? ??????????? ???? ? ??????? ??????????? xsi:type, ??????? ?? ??????? ? ?????????? 4.3. ????????????? ?????? ?????? ?? ??????? ????????????? ????????????? ??????-???? ?? ????????? ???? ??????, ? ??? ???? ?? ???????????? ????????????? ???????? ????????. ??? ?????? ????????? ????????? ???? ?????????????????.


4.7 ??????????? ???????? ? ????

???? XML-????? ???????????? ??????????? ?????????????? ?????? ????????????? ????????? ??? ?????. ???? ??????? ??? ??? ????????? "????????????", ?? ??? ?? ????? ?????????????? ? ?????????. ????? ??????????? ??????????? ???????, ?? ? ????????? ?????? ?????????????? ????????, ???????? ? ??? ?????? ??????. ???? ??????? ???????????????? ???? ???????? ???????????, ?? ??? ?????????? ????? ???????? ?????? ???????????? xsi:type ??? ???????? ???????????? ????, ??????? ?? ???????? ???????????.

? ??????? ?????? ??????, ????????? ? ?????????? 4.6, ???????? ????????????? ???????? comment ???, ????? ? ?????????? ????? ???? ???????????? ?????? ???????? customerComment ? shipComment. ??? ????? ??????? ??????? comment ???????????, ? ??????? ??? ?????????????? ?????????? ? ????? ?????????????? ?????? ?? ???????, ipo.xsd, ????????? ???????:

< element name="comment" type="string" abstract="true"/>

? ????????? comment ??????????? ???????????, ????????? ????????????? ??????? ?? ??????? ????? ????????????? ???????????, ???? ??? ???????? ??????????? ? ????????? customerComment ? shipComment.

?????????? ???????????? ???????? ??????? ????????????? ?????? ??????. ?????????? ???????????? ???? ??????? ????????????? ? ????????? ???????????? (??????????????????? ????????? xsi:type) ?? ???? ????. ?????????? ??????????? ???? ??????. ????? ???????? ???????????? ???????:

??????? transport ?? ??????????, ??????? ????? ????????? ? ??????????. ?????? ??? ??????????? ???? ??????????, ? ??????? ??????? transport ?? ????? ?????????? ? ????????? ??? ???????? xsi:type, ??????? ????????? ?? ??????????? ???. ??? ????????, ??? ????????? ???????? ?? ????????????? ????? (??? ??? ??????? transport ????? ??????????? ???):

< transport xmlns="http://cars.example.com/schema"/>

?????? ????????? ???????? ????????????? ????????, ????????? ??????? transport ????? ?? ??????????? ??? Car, ?????????? ??????????? ??? Vehicle.


4.8 ?????????? ????????? ? ?????????????? ??????????? ?????

?? ????? ?? ????????? ????? ???? ? ???????????? ?? ? ??????????, ??? ????? ???? ???????????. ? ???????????????? ?????? ???? ????? ???????? ????????? ??????????? ????? ????? ? ?????????????? ?? ? ??????????.

???? XML-????? ???????????? ????????? ??????????, ??????? ????????? ???????????? ?????. ???? ?? ???? ?????????? ????????? ?????? ????? ?????????? ????????? ????? ????? ?? ??????? ???????????? ????: (a) - ????? ???? ?? ????? ???? ???????? ? ?????????????? ???????????, (b) - ????? ???? ?? ????? ???? ???????? ? ?????????????? ??????????, (c) - ????? ???? ?? ????? ???? ???????? ??????. ????? ????????????????? ?????????, ???????????, ??? ?? ????? ????????????? ????? ??????????? ????? ????? ?? ???? Address ??????? ???????????. ????? ???????, ??? ?? ???????????? ???????????? ???? ??? ?????? ??? ??????? ??? ??????????? ????? ???? USAddress ? UKAddress. ????? ????????????? ????? ????? ??????????? ??????? ??????? ?????????????? ??????????? Address ???, ??? ???????? ????.

?????????????? ??????????? ????? ??????? ??????????? ???? Address:

???????? restriction ???????? final ????????????? ??????????? ????? ????? ??????? ???????????. ???????? #all ????????????? ??????????? ????? ????? ??????. ???????? extension ????????????? ??????????? ????? ????? ??????? ??????????. ????? ????, ? ???????? schema ?????????? ?????????????? ??????? finalDefault, ??????? ????? ????????? ???? ?? ???????? ????????? ??? ???????? final. ????????? ???????? finalDefault ???????????? ??????????? ???????? final ??? ??????? ??????????? ???? ? ?????????? ???????? ? ?????.

?????? ???????? ???????? ??? ???????????? ?????, ??????????? ? ???????? ????, ????? ?????? ????? ???? ????????? ??? ??????????? ?????? ???????? ????. ??? ??????????? ???????? ???? ? ?????? ?? ??? ??????? ????? ???? ???????? ??????? fixed. ???? ??????? ????????????? ?????????? ?????? ???? ????? ????????? ???????? ?????????????? ??????. ????????, ????????? ??????? ??? Postcode.

?????? ????????? ??????? ??? ???????? ????:

??? ?????? ??? Postcode ?????????, ?? ????? ???????? ?? ???? ????? ??? ????????? ????. ????? ??? ??????? ????? ?????????? ??????, ??????????????? ? ??????? ???? Postcode (??., ?????? ????).

?????????? ??????????? ?????? ???? ?? Postcode:

?????? ?? ?? ????? ???????? ????? ???????? ???, ? ??????? ?? ???????? ?????????????? ?????-???? ?????, ??????????????? ? ??????? ???????????.

???????????? ??????????? ?????? ???? ?? Postcode:

? ?????????? ? ??????????, ??????? ????????? ??????????? ????? ?????, ???? XML-????? ???????????? ????????, ??????? ????????? ???, ????? ??????????? ? ?????? ?????? ????? ?????????????? ? ??????????. ? ?????????? 4.3, ?? ???????, ??? ??????????? ???? USAddress ? UKAddress, ????? ?????????????? ? ?????????? ????? ???????? shipTo ? billTo. ????????? ??? ??????????? ???? ???????? ?? ???? Address, ?? ??? ????? ???????? ?????? ???????????, ???????????? ????? Address. ?????? ?????? ???????????? ?????? ????? ?????????????? ? ??????? ???????? block, ??????????? ? ??????????? ???????? ????. ????????, ???? ?? ????? ??????????? ????????????? ??????, ????????????? ??????? ??????????? ????, ?????? Address (????????, ??????? ?? ?????????? Address ? final="restriction"), ?? ?? ????? ???????? ?????????????? ??????????? Address ????????? ???? ???????.

?????? ?? ????????????? ? ?????????? ???? Address, ??????????? ??????? ???????????:

??????? block="restriction" ???????????? ?????? ? ?????????? ???? Address ????? ??????????? ?? ????, ? ???????????? ? ??????? ???????????, ??????. ?????? ??? ?? ?????????????? ?? UKAddress ? USAddress ???????? Address, ????????? ??? ???? ???????? ??????? ??????????. ?????????????? ?????? ?????? ??????????? ???????? ???? ???????????? ?????? ??????, ??? ??????, ????????????? ??????? ??????????, ?????????? ?????????? #all ? extension ??????????????. ??? ? ? ?????? ? final, ? ???????? schema ?????????? ?????????????? ??????? blockDefault, ???????? ???????? ????? ???? ????? ?? ????????, ??????? ????? ????????? ??????? block. ?????? ?? ??????????? ???????? blockDefault ???????????? ??????????? ???????? block ? ?????? ??????????? ???? ? ?????????? ???????? ? ?????.


5 ?????????????? ??????? III: ??????????? ?????

????????? ???????????? ??????? ? ??????? ?????? ?????? ????? ???????????? ??????, ? ??????? ???????????, ??????? ? ????? ??????? ???? ??????????? ? ???????? ????????? ?????????. ?????? ?????? ??????, ?? ????????? ??????? 1999 ????, ???????? ? 4Q99.xml.

???????? ????????, ??? ? ???? ??????? (??? ????????), ? ????? ?? ?????????? ????????????????? ????????, ? ? ?????????? ??????? ????????????, ???????? ?? ?????????.

??????????? ????? 4Q99.xml:

????? ???????? ?????? ? ??????? ?? ???????? (????? ??????? ? ????????????) ? ?????? ? ????????? ?????? ???????, ??????????? ?? ????????? ???????? ???????. ??? ??????? ?????? ???????, ? ?????? ??????? ??????????????? ????????. ? ??????? ??????????? ?????? ??????? ??????????? ???????? ?????? ?? ???????? ???????. ??? ??????? ? ???????????? ????????????? ?? ?????????? ??????. ????????, ?????? ???????? ?????? ????? ????????? ?????? ??????? (??????????? ????????????). ????? ??? ?? ???????? ??????? ???????????? ? ?????? ????? ??????? ?????????? ?????? ???????, ???? ????????? ??????? ????? ??????? ? ????????? ?????? ??????, ??????? ?????? ???????? ??????? (????????? ???????????). ????????, ??????? ? ??????? 455-BX. ? ??????????? ???????? ?? ??????????, ???, ????????? XML-????? ?????? ????????? ???? ???????????.

XML-????? ??????, report.xsd:


5.1 ??????????? ????????????

XML-????? ???? ??? ??????????? ???????, ??? ???????? ???????? ??? ???????? ? ???????? ????????? ??????? ?????? ???? ?????????. ??? ??????????? ???????????? ?????????? ??????? unique: ?? ??????, ??? ???? ????? ??????? ("select") ????? ????????? ? ???????? ???????? ?????? ???? ?????????? ????????????, ? ?? ?????? ????? ???????????????? ???? ("field") (??????? ??? ???????), ??????? ?????? ???? ????????? ? ???????? ?????????? ?????? ?????????. ? ????? report.xsd ??????? xpath ???????? selector ???????? Xpath-????????? ?????? regions/zip, ??????? ?????? ?????? ???? ????????? zip ? ??????. ??????????, ??????? xpath ???????? field ???????? ?????? Xpath-????????? ?????? @code, ??????? ??????????, ??? ???????? ???????? code ????????? zip ?????? ???? ?????????. ???????? ????????, ??? Xpath-????????? ???????????? ??????? ????, ??? ?????? ???? ?????????. ????? ??? ?? ????????? ?????? ??????? code, ?? ??? ???????? ?? ??????????? ?????? ???? ??????????, ???? ?? ????????? ??? ???????, ???????????? Xpath-???????????. ????? ???????? ????????, ??? Xpath-?????????, ??????? ?? ?????? ???????????? ? ???????? xpath, ?????????? ????????????? (http://web2.w3.org/TR/2001/REC-xmlschema-1-20010502/) ?????? ?????? ????? Xpath, ????????????? ? XML Path Language 1.0 (http://www.w3.org/TR/1999/REC-xpath-19991116).

?? ????? ????? ??????? ?????????? ?????, ??????? ?????? ???? ?????????. ????????, ???????????, ??? ?? ????? ???????? ??????????? ????????????? ??? ???????? ????????. ????? ??????????? ???????? ? ???, ??? ???????? ??????? ????? ???? ??????? ?????? ???????, ???? ?? ??? ??? ????? ???????? ???????????, ????????? ? ???, ??? ????? ??????? ????? ???? ? ???????? ??????? ????????? ??????? ??????????? ?????? ???????. ?? ????? ?????????? ?????? ???????????, ?????????, ??? ?????????? ????????? ??????? ? ?????? ??????? ?????? ???? ?????????. ? ?????? 4Q99.xml, ??????? ????????? ?????????? ???????? ????????? ??????? ? ??????? ???????: {95819 872-AA}, {95819 926-AA}, {95819 833-AA}, {95819 455-BX}, ? {63143 455-BX}. ???????, ??? ?????????? ????? ??????????? ??? ? ???????? ?????? ?????? ????????, ??? ? ? ???????? ??????????. ?? ????????????? ???? ?????????? ????????? ?????????? ?????????? ???????, ????????????? ? ???????? ??????? ????????? ??????? ????? ?????? ????. ??????? ??????? ?????????? ????? ?????? ?????????? ????????? ????????????.

????? ?????????? ?????????? ????????, ?? ?????? ????????? ???????? field, ??????? ?????????????? ??? ????????? ???????? ?????. ????? ???????? ????? ??????? ? ????????????? ???????????, ?? ???????? ??? ???? ??????? field, ??? ??????? xpath ?? ????????? ?????? part/@number ?????????????? ??????? number ????????? part, ??????? ???????? ????????? ????????????? ????????? zip. ??? ???? ????? ?????????? ????????? ???????? ???????? zip, ????? ??????? ????? Xpath-?????????? regions/zip.

?????????? ????????? ????????:


5.2 ??????????? ?????? ? ?????? ?? ???

? ?????????????? ?????? ?? 1999 ???, ???????? ?????? ??????????? ?????? ?????? ?????????? ?????? ???????. ?? ????? ?? ?????????? ??? ???????????, ????????? ??????? unique. ?????? ?? ????? ????? ?????????????, ??? ?????? ???????, ???????? ?????????? ???????, ?????????? ? ?????? ? ?????? ???????? ????????, ????? ??????????????? ?????? ? ????????? ???????. ??? ????????? ????? ???????????, ?????????? ???????? key ? keyref. ? ????? ??????, report.xsd, ???????? ?????????? ????????? key ? keyref, ????????????? ????? ??? ?? ????? ?????????, ??? ? ???????? unique. ??????? key ???????? ? ???????? ???????? number ???????? part, ??????? ???????? ???????????? ???????? parts. ?????????? ???????? number ? ???????? ????? ????????, ??? ??? ???????? ?????? ???? ????????? ? ?? ????? ???? ?????? (nil). ??? pNumKey, ???????????? ??? ?????? ?? ???? ?? ?????? ???? ?????.

????? ?????????????, ??? ????????, ???????? ?????????? ??????? ????? ????? ??????????????? ??????? ????????, ?????????????, ??? ??????? number ( < field xpath="@number" ) ???? ????????? ( < selector> zip/part < /selector> ) ?????? ???? ???????? ??? ?????? (keyref) ?? ???? ? ?????? pNumKey. ?????????? ???????? number ??? keyref ?? ?????????????, ??? ??? ???????? ?????? ???? ?????????. ??? ?????? ????????, ??? ?? ?????? ????? ?? ?? ????? ????????, ??? ? ???? ? ?????? pNumKey.

????????, ?? ??? ??????????, ??? ?? ???????? ? unique ????? ?????????? ?????????? ???????? keyref ? key. ????????? ???? ????????, ?? ????? ?? ?????? ?????????? ??????????????? ??????????????? ??????? ? ????????? ???????? ??????, ?? ? ?????????? ?????????? ????????, ??????? ?????? ???? ????????????. ????? ???????? ????? ???????? ?????????? ???????? ?????????? ????? (string, integer, date, ? ?.?.), ??? ???????, ??? ??????? ? ??? ?????? ? ????????? field ???????? ? ???????????? key ? keyref.


5.3 ??????????? XML-????? ? ????????? ? ????????? ID XML 1.0

??? ??????????? ????????? ???????????? XML 1.0 (http://www.w3.org/TR/2000/REC-xml-20001006), ?????????? ??????? ???? ID ? ????????? c ??? ???????? ???? IDREF ? IDREFS. ???? ???????? ????????? ?????? XML-????? ????? ??????? ???? ID, IDREF, ? IDREFS, ??????? ????? ?????????????? ??? ????, ????? ???????? ???????? ? ????? XML 1.0. ????? ????, ???? XML-????? ?????? ????? ?????????, ??????? ????? ????? ? ?????. ????????, ??? ????? ???? ????????? ? ??????????? ?????? ???????? ? ????????, ?????????? ?? ??? ????. ????????, ID ?????? ??? ???????? ? ??????? ?? ????? ???? ???????? ? ?????????, ????????? ??? ?? ???????????. ????? ????, ???? XML-????? ???? ??????????? ?????????? ???????, ? ???????? ??????? ?????????????? ????????????, ????? ??? ???????? ID ???????????????? ?? ???? ????????. ???????, XML-????? ???? ??????????? ??????? ????? (key) ? ?????? (keyref) ?? ?????????? ??????????? ????????? ? ?????????, ????? ??? ID ?? ????? ?????? ????????.


5.4 ?????????????? ?????

?????, report.xsd, ?????????? ??????? ??? xipo:SKU, ??????? ????????? ? ?????? ?????, ? ? ?????? ??????? ??????? ????????????. ???????? ?????????? ??????, ??????? ?? ????????????? ? ??????? ???????? include ? ????? ipo.xsd, ????????? ???????????? ??????????? ? ?????????? ?? address.xsd. ? ?????? ?????? ?? ?? ????? ???????????? ??????? include ? report.xsd, ?????? ??? ?? ????? ??????????? ? ???????????? ? ??????????? ?????, ??????? ??????? ???????????? ??????? ?? ?? ????? ??? ? ??????? ??????? ???????????? ?????????? ????????. ?????????????, ??????? include ?? ?????????????? ??????? ???????????? (???? ??????? schemaLocation). ???????? ???????, ??????? ?? ????????? ? ???? ??????? - ?????? ????????, ??????? ???? ??????????? ????????? ????? ?? ?????????? ???????? ???????? ???????????? ?????????????? ?????????, ?, ?????????????, ????????? ???????? ???????????? ????? ?????????, ???????????? ? ?????????? ??????? ?????????????. ????? ????????????? ??? SKU ? ???????????? ??? ? ????? ??????, ?????????? ???????????????? ??????? ????????????, ? ??????? SKU ?????????, ? ????????????? ??? ??????? ???????????? ? ????????? ??????? ????? ??????????? ? ????? ??????. ??? ????? ?? ?????????? ??????? import, ??????? ?????????????? ??????? ??????? ???????????? http://www.example.com/IPO ???????? SKU, ? ??????????? ???????? ? ???????? schema ??????????? ??? ??????? ???????????? ? ????????? xipo. ??? ???? ? ??????????? ??? ?????????? ????? ?????? ?? ??????? ??? SKU, ???????????? ? ??????? ???????????? http://www.example.com/IPO, ????? ????????? ??? xipo:SKU.

? ????? ???????, ?? ????????????? ???? ??????? ??? ?? ?????? ???????? ???????? ????????????, ? ???????????? ??? ??? ?????????? ?????????. ?????????? XML-????? ????????? ????????????? ????????? ????????? ?? ????????? ??????? ???????????, ??? ???? ??? ????? ???? ????????? ? ? ???????????? ? ? ???????????. ????????, ? report.xsd ?? ????? ???????? ???????????? ??????? comment, ??????????? ? ipo.xsd, ???????? ?? ??? ??????? ? ??????????:

< element ref="xipo:comment"/>

???????? ????????, ??? ?? ?? ????? ??????????? ???????????? ??????? shipTo ?? po.xsd, ? ??????????? ???? ?????? ???????? ?????????, ??? ??? ?????? ?????????? ???????? ????? ????? ???? ?????????????:

< element ref="xipo:shipTo"/>

? ipo.xsd, comment ???????? ??? ?????????? ???????, ??????? ??????? ?? ???????? ??? ??????? ?????. ????????, shipTo ???????? ????????, ??????? ??????? - ??? ???????, ??????????? ? ??????????? ??????????? ????, ? ?????? PurchaseOrderType. ??????????? ???? ????? ????? ???? ?????????????, ? ???????????? ??? ???????? ??? ??????????? ????? ?????. ?????? ????????????? ??????????? ???? ????? ???? ?????????????; ????????? ? ??????????????? - ???. ???????????, ??? ?? ????? ???????? ? ??? ????? ?????? ? ??????????? ? ????????? ??? ?????????. ?? ????? ???????? ???????????? (????????? ????????????), ??????????? ??? USAddress ?? address.xsd, ? ??????? ?????????? ???????? ?? ???? ????? ??? ? ?????? Analyst. ??? ????? ??????? ????? ???????? phone ? email.

??????????? Analyst ??????????? USAddress:

????????? ???? ????? ???, ????????? ??????? analyst ??? ????? ?????????? ???????? purchaseReport (?????????? ?? ????????) ? ????? ??????. ?????, ??????????? ???? ???????? ????? ??????????????? ?????????? ????? ?????????. ????????, ??????????????? ????? ?????? ? ????? Analyst:

????? ???????? ????? ????????????? ?? ?????????? ??????? ???????????, ?? ?????? ??????? ???????????? ?????? ???? ???????????????? ????????? ????????? import. ???????? import ?????? ???? ????????????? ???????? schema. ????? ????, ? ??????? ???????????? ?????????? ???????? ???????????? ?????? ??????? ???????????? ?????? ???? ????????????? ? ?????????, ? ??????? ?????? ?????????????? ??? ???????????? ?????? ? ????? ????????? ?????, ????????????? ????? ???????? ????????????. ???????, ???????? import ???????? ?????????????? ??????? schemaLocation, ??????? ???????????? ?????????????? ???????, ?????????? ? ??????? ?????????????. ????? ???????? ??????? schemaLocation ??????? ???????.


5.4.1 ?????????? ?????

????????? XML-????? ?????????? ?????? ????????????????, ?? ??????? ???? ??????????? ??????????? ???????? ??????? ? ??????????? ?????, ??????? ????? ???? ???????? ???????????? ??? ??????????? ????? ??? ???????? ????? ????. XML-????? ???????????? ????, ??????? ?????? ??? ????, ? ????????? ????, ????????? ? ?????????? "??????? ????" ? ?? ??????? ? ?????????? ????? (http://www.w3.org/2001/03/XMLSchema/TypeLibrary.xsd).

??????????? ?????????? ????? ????? ???????????, ????????, ??? ????, ????? ??????? ???????? ???????, ??????? ?????????, ??????, ? ??? ?????. ?????? ?????????? ????? ?? ???????? ?? ?????, ?????????? ???? ??? ????? ???????????. ???? ?????????? ?????? ?????, ?????????? ??????????? ?????.

?????? ??????????? ????? ????? ? ?????????? ?????:

?????? ????????, ????????????? ? ????????? ? ???????? ????????? ???? ???:

< convertFrom name="AFA">199.37< /convertFrom>

??? ?????? ??? ????? ?????????, ?? ?? ?????????? ????????? ??? ????????????? ????????????? ? ?????? ?????? ????? ?????? ??? ????????? ???????? ???????.


5.5 ????? ???????, ????? ???????

? ?????????? ???????? ?? ??????????? ????????? ?????????? ??? ?????????? ?????? ??????????? ??????????? ?????. ????????, ????????? ?????? ??????????? ????? ???????? ? ?????????? ? ????????? ???????????? ?????????? ??????, ? ????? ????????, ???? ??????? ????????????? ?? ???????? ???????? ????????????. ?????? ??? ????????? ????????????, ??????????????, ???? ????? ???????, ???? ????? ????? ??????????? ????????. ???? ????? ??????? ??????? ? ???, ????? ??????? ?????? ????????, ??????? ???? ??????????? ??????? ??????????? ???? ???????????? ?????? ?????????? ? ??????????, ?????????????? ?????????? ???????? ????????????.

????????, ?????????? ??????? ??????????????? ??????, 4Q99html.xml, ? ??????? ?? ???????? HTML-????????????? ??????? ? ??????? ?? ??????????? ????????. HTML-????? ?????????? ??? ?????????? ???????? htmlExample. ??? ???? ????? ??? HTML-???????? ???????????? ???????? ???????????? HTML (http://www.w3.org/1999/xhtml), ???????? ???????? ?? ????????? ???????? ???????????? ? ?????? ???????? HTML-???????? (table).

??????????? ????? ? HTML, 4Q99html.xml:

????? ????????? ????????? HTML-????????? ? ?????????, ?? ???????? ????? ??????, ???????? ????? ??????? htmlExample, ??? ?????????? ?????????? ?????????? any. ??????? any ??????????, ??? ????? ???????, ??????????????? ???????? ????? XML, ???????? ? ?????? ??????????? ??????? ????. ? ??????????????? ???????, ?? ??????????, ??? XML-???????? ??????????? ???????? ???????????? http://www.w3.org/1999/xhtml, ??????? ???????, ??? XML-???????? ?????? ???? HTML-??????????. ? ??????? ????? ??????, ??? ? ????????? ????? ???? ?? ????? ?????? ?????? ????????, ?? ??? ????????? ???????? minOccurs ? maxOccurs.

??????????? ?????????? purchaseReport ??? ????????? ? ???????? HTML-?????????:

? ?????????? ?????????? ???? ?????????, ?????? XML-????????, ?????????????? ???????? ???????????? http://www.w3.org/1999/xhtml, ????????? ?????????? ? ???????? htmlExample. ? ????? ? ???? 4Q99html.xml ????????, ??? ??? ? ??? ???? ???? ??????? table (? ????????? ??????????), ??????? ???????? ??????????, ? ???? ??????? ?????????? ? ???????? htmlExample, ? ? ????????? ???????, ??? ??????? table ? ??? ?????????? ??????????? ?????????? ???????? ????????????. ?????? ?????????? HTML-???????? ????? ????????? ???????? ??????, ?????? ??? ? 4Q99html.xml ????? ?? ??????????? ?? ?????????????. ???? ????? ???????? ?????????, ?? ???????? ???????? processContents ?????? ???? ??????????? ? strict (???????? ?? ?????????). ? ???? ?????? XML-????????? ?????? ???????? ?????, ????????? ? ????????? ??????? ?????????????, ? ????????? ???????????? HTML-?????????, ????????????? ?????? ???????? htmlExample.

? ?????? ???????, ?? ?????????? ??? text, ??????? ??????? ?????????? ????, ????????????? ?? ???????? ? ?????????? ????? XML-????? (http://www.w3.org/2001/03/XMLSchema/TypeLibrary.xsd) (??., ????? ????????? 5.4.1), ? ?????????? ??? ?????? ? ???????????????????????? ???????. ????????? ??? ? ?????????????? ????????? xml:lang ????????? ???????????? ????? ???????? ? ????????? ?? ?????? ???????? ????????????, ???????? ????? ? ??????? Ruby (http://www.w3.org/TR/ruby/). ???????? lax ???????? processContents ???????????? XML-?????????? ????????? ???????????? ??????????? ????????. ????????? ???????? ???????????? ????????? ? ?????????, ??? ??????? ?? ????? ???????? ?????????? ?????, ?? ????????? ?? ????? ???????? ?? ??????? ??? ??? ?????????, ??? ??????? ??????????? ?????????? ?????.

??? Text:

??????? ???????????? ????? ?????????????? ?????????? ?????????, ? ??????????? ?? ???????? ???????? namespace (??. ??????? 4) ??? ???? ????? ????????? ??? ????????? ?????????? ????????:

??????? 4. ??????? namespace ???????? any

???????? ???????? Namespace

?????????? ?????????? ????????

##any

????? XML-??????? ?? ?????? ???????? ???????????? (???????? ?? ?????????)

##local

????? XML-???????, ??????? ?? ??????????????, ?? ????, ?? ???????? ? ??????? ????????????

##other

????? XML-??????? ?? ?? ???????? ???????? ???????????? ????????????? ????

"http://www.w3.org/1999/xhtml ##targetNamespace"

????? XML-???????, ????????????? ?????? ???????? ???????????? ? (??????????? - ??????) ??????; ##targetNamespace - ????????? ??? ??????????? ???????? ???????? ???????????? ????????????? ????

? ?????????? ? ???????? any, ??????? ????????? ?????????? ???????? ???????? ???????? ????????????, ??????? ??????? ??????? anyAttribute, ??????? ????????? ????????? ????? ???????????? ????????. ????????, ?? ????? ????????? ?????? HTML-???????? ????????? ??? ????? htmlExample ????????, ????????? anyAttribute ? ??? ??????????. ??????????? ?????????? htmlExample ??????????? ????????? HTML-?????????:

??? ?????????? ????????? HTML-????????, ?????? href, ?????????? ? htmlExample ????????.

?????? HTML-???????? ? ???????? htmlExample:

???????? namespace ? ???????? anyAttribute ????? ???? ????????? ????? ?? ????????, ????????????? ? ??????? 4 ??? ???????? any. ? anyAttribute ????? ???? ????? ??????? processContents. ? ??????? ?? ???????? any, ??????? anyAttribute ?? ???????? ??????????? ?? ????? ?????????, ??????? ????? ????????? ? ????????.


5.6 schemaLocation

XML-????? ?????????? ???????? schemaLocation ? xsi:schemaLocation ? ???? ???????.

1. ? ????????? ??????? xsi:schemaLocation ???????????? ????????? ?????? ??????????? ????????? ???????????? ?????????? ????? ??????????. ????? ???????????, ??? ????? ?????????? ???????? ???????? ??? ???????? ????????? ?? ??????? ??? ???????????? ?????? ?????. ????????, ?? ????? ??????? ??? ??????????? ????????? "??????????? ?????" ?????????? ??? ?????. ??????? schemaLocation ???????? ???? ????????: ?????? ????? ???? - ?????? ??????? ????????????; ?????? ????? ???? - ????????? ? ?????? ?????, ???????????, ??? ????????? ?????, ??????????????? ??????? ?????????. ??????????? ???? ????????? ?? ??????? ?? ??????????? ????????? ????????????? ????????????? ????????? ?????. ?????????? ????????? ???????? ? ????? ??????: ?? ????? ???????????? ?????? ?????, ?????????? ?????? ??????????? ??????????, ??? ?? ???????????? ??????? ????? ??????. ????? ?? ??????? ????? ???????? ???????????? (??. ????????? 3.4), ??????? ??????? ??????? noNamespaceSchemaLocation, ??????? ????????????, ????? ?????????? ????????? ??? ???????? ??????????????? ????? ??????????, ??????? ?? ????? ???????? ???????? ????????????.

?????????? schemaLocation ? ????????? "??????????? ??????", 4Q99html.xml:

2. ??????? include ????? XML-????? ????? ???????????? ??????? schemaLocation, ??????? ???????? URI-??????, ???????????????? ????? ?????????. ? ?????????? ??????????? ???????? ?????, ???????????? ?????????? ? ??????????? ???????? ????? ? ?????????? ????. ????????, ? ??????? 4 ??? ???????? ?????? ????? ????????? ???? ?????????? ??????????? ????? Address, USAddress, UKAddress, USState (?????? ? ???????????? ?? ????????? ? ????????? ?????????) ?? address.xsd ? ??????????? ????????? purchaseOrder, comment ? ???????????? ????? PurchaseOrderType, Items, SKU (?????? ? ???????????? ?? ????????? ? ????????? ?????????) ?? ipo.xsd.

3. ??????? import ????? XML-????? ????? ?????????????? ???????? namespace ? schemaLocation. ???? ??????? schemaLocation ?????, ?? ??? ?????????????? ????? ??? xsi:schemaLocation (??., ????? 1). ? ??????, ?? ???????????? ????????? ?????? ????? ??????????? ????????? ???????????? ?????????? ????? ?????????, ? ??????? ????? ??????????? ?????????? ???????? ???????????? ??????????????????? ????????? namespace. ????? ????????????? ????????, ??????? ?? ????????? ?? ? ????? ??????? ??????? ????????????, ??????? import, ???????????? ??? ???????? namespace (??? ??? ???????? schemaLocation). ?????? ? ?????????, ??????????????? ???? ???????? ??????????????????. ???????? ????????, ??? schemaLocation - ??? ?????? ????????? ? ????????? ??????????? ?????????? ??? ?????????? ????? ?? ???????????? ??? ??????. ????????, HTML-???????? ??? ?????? ? HTML-??????????? ????? ????? ?????????? HTML-?????.


5.7 ????????????

???????? ????? ???? ????????? ? ???????????? ? ??? ?????? ??? ????, ????? ?????????, ????????????? ?? ?? ????????, ????????? ? ??? ?????. ?????? ????? ????????? ?????? ??? ????: 1) ????????? ???????? ?? ???????????? ????????. ??? ?????????? ?????? ??????????? ?????; 2) ????????? ?????????????? ??????????, ????? ????? ? ???????? ?? ?????????, ???? ?? ?????????????? ? ?????????. ??? ?????????? ?????? ???????? ?????????????? ????? (XML-Infoset).

????? ?????????, ?????? ??? "????? ?? ???????", ????? ???????? ? ????? ?????????, ??? ?? ????????????? ???????? ?????? ?????. ????? ????? ??????? ??? ? ??????? ?????????????? ???? ???????? schemaLocation. ?? ?????????? ?? ????, ???????????? ?? ??????? schemaLocation, ?????????? ???????? ? ????????? ????????? ? ????????????? ?? ????? ???? ?????. ????????, ??????????? ?????????? ?????????? ????? ????? ????????, ??????? ?????? ?????????? ???????????? ????? ?????? ?? ???????, ?????????? ?? ???????? schemaLocation.

??????????? ????? ??????????? ??? ????????? ????????. ??????? ???????????, ??? ???????? ??????? ????????? ????? ?????????? ??????????. ????? ??????????? ?????? ?????????? ?? ???????????? ??? ???????? ? ?????, ? ??? ????? ???? ???? ???????? ?? ????? ????????. ?????????? ?????? ????????, ????? ???????? ???? ?????????.

????? ????????? ??????? ?? ????????????, ?????????? ??????? ?????????? ?????????????? ?????????? ???????? ? ?????, ????? ?????????, ??? ??????? targetNamespace ? ????? ?????? ?????????????? URI ???????? ???????? ???????????? ????????. ? ????????? ?????? ?? ????? ??????, ??? ????? ?? ????? ???????? targetNamespace ? ??????? ? ????????? ????????????????. ???????????, ??? ??????? ???????????? ??????, ????? ?????????? ????????? ??? ???????? ?? ???????????? ?????????? ? ????? ??? ?? ???????????? ???????? ???????? xsi:type ? ?????????. ? ????????? ??????, ???, ????????? ? ????????? ?????? ???? ?????????? ??????? ??? ????, ????????? ? ?????, ??? ?????????????? ????????? block ? ?????????? ????????.

????? ?????????? ????????? ???????? ? ?????????? ????????, ????????? ?? ? ???????????? ??? ??????? ???? ???????? ?????????? ? ??????????. ????????, ???????????? ??????? shipTo (??., ????????? 2.1), ?????????? ?????????, ??? ?? ????????????? ???? Address (??????? shipTo ????? ??? Address).

???? ??????? ????? ??????? ???, ?????????? ?????????, ??? ??????? ?? ????? ??????? ????????? ??? ????????? ?????????, ? ??? ??? ?????????? ?????????? ????????????? ???????? ????????????? ??? ???????? ????. ?????? ????? ??????????? ???????? ?????????? ?????????????????? ?? ??????? ?????????? ????????? ??? ????????????, ? ?????? ???????? ????, ??? ?????????? ?????????????????? ???????????? ???????? ? ??????????? ?????????.

???? ??????? ????? ??????????? ???, ?? ?????????? ?????????, ??? ????????? ???????? ????????????, ? ??? ?? ???????? ????????????? ??????????? ??????????????? ?? ??????? ?????. ????? ???????????, ??? ??? ????????? ??????????? ????????????, ? ??? ?????????????????? ???????????? (? ????? ????????? ?????) ????????????? ?????? ???????????, ??????????? ??? ??????? ???????????? ????.


A ?????????????

?????? ???? ????????????? ???? ????, ????????? ? ???????, ??????? ???????? ???? ????????. ? ????????? ???????? ??????????? ?? ?????????: David Beech, Paul Biron, Don Box, Allen Brown, David Cleary, Dan Connolly, Roger Costello, Martin Durst, Martin Gudgin, Dave Hollander, Joe Kesselman, John McCarthy, Andrew Layman, Eve Maler, Ashok Malhotra, Noah Mendelsohn, Michael Sperberg-McQueen, Henry Thompson, Misha Wolf, ? Priscilla Walmsley ?? ???????? ????????.


B ??????? ???? ? ?? ??????

?????????? ???????? ??? ??????? ???????? ???? ????? ?????????????? ????? ?????????? ?????? ??? ????? ???????. ??????? B1.a ? B1.b ???????? ?????? ???? ?????????? ? ???? XML-????? ??????? ????? ? ??????????????? ??????? ???? ???????. ????? ?????? ???????? ??????? ????? ? ??????? ??????? ? ????????? "XML-?????. ????? 2: ???? ??????".

??????? B1.a. ??????? ???? ? ??????????????? ?? ??????

??????, ????????????? ? ??????? B1.b ??????????? ?????? ? ??????? ?????, ??????? ? ??? ???????????. ?? ??? ??????? ???? ????? ????? ????????? ? ??????? ?????? ? ??????? ??????? B1.b ???????? ?? ??? ??????? ????.

??????? B1.b. ??????? ???? ? ??????????????? ?? ??????


C ????????????? ?????????

XML 1.0 ???????????? ????????? ???? ?????????, ??????? ???????????? ????? ????????????? ???????? ? ??????????, ??????? ????? ?????????????? ? ? DTD ? ? ??????????. ? ?????????? 2.7, ?? ????????, ??? ????????????? ?????? ????? ?????????????? ?????? ????????? ??????????. ? ???? ??????? ?? ???????, ??? ???????? ????? ???? ????????? ? ?????????, ? ????? ?????????????? ??????????? ????????? ????? ???? ???????????? ? ??????.

???????????, ??? ?? ????? ???????? ? ???????????? ???????? ? ?????????, ? ??? ???? ???????? ????? (?????? ? DTD) ?????????????? ??????. ????????:

? ??????????? ???? ???????, ?? ????????? ???????? ? ?????? eacute ??? ????? ??????????? (DTD) ??????, ? ????????? ?? ??? ? ?????????? ???????? city. ???????? ????????, ???, ????? ???????? ?????? ??????????????, ?? ???????? ????? ???????????? ??????, ??? ???????? ???????? ?? ???????????? ?????. ??????? ???????, ?????????? ????? ??? ???????? ???????????? ??????????? ???????? city ??????? ???????? Montreal.

?? ????? ?????????? ????????? ???????, ?? ?? ??????????? ??????????, ???????? ? ????? ??????? eacute, ? ?????????????? ???????????? ?????????? ????????:

< xsd:element name="eacute" type="xsd:token" fixed="e"/>

???? ??????? ????? ????????? ??????? ?????????????? ? ?????????:

? ???? ??????, ?????????? ????? ?????????? ??? ????????: city ? eacute. ???????? ????????, ??? ?????????????? ??????? ???????? ????????? ????????????: ??? ????? ???????? "Montreal", ??????????? ???? ??? ????????????? ?????????? ??????? ?????????? ????????? ?? ????? ??????????????? ???? ?????.


D ?????????? ?????????

????? pattern XML-????? ?????????? ???? ?????????? ?????????, ??????? ???????????? Unicode (????? ????????? ???????? ?????????? ? ????????? "XML-?????. ????? 2: ???? ??????"). ???? ?????????? ????????? ?????????? ??????????? ????, ???????????? ? ????? ???????????????? Perl, ???? ????????? ?????? ????????????? ??? ?????? ??????????? ???????????, ? ?? ??? ??????????? ??????????? ??????????????? ?? ???????????? (?????? ? ?????????). ?? ???? ???????, ???? ????????? ?? ???????? ???????????? ^ ? $, ???? ^ ????????????, ????? ???????? ??????????, ???????? [^0-9]x.

??????? D1. ??????? ?????????? ?????????

?????????

????????? ????????

Chapter \d

Chapter 0, Chapter 1, Chapter 2 ....

Chapter\s\d

?????? Chapter, ?? ??????? ??????? ???? ?????????? ?????? (??????, ?????????, ??????? ??????, ? ?.?.), ?? ??????? ??????? ???? ?????

Chapter\s\w

?????? Chapter , ?? ??????? ??????? ???? ?????????? ?????? (??????, ?????????, ??????? ??????, ? ?.?.), ?? ??????? ??????? ?????????? ?????? (?????? ??? ????? XML 1.0)

Espanola

Espanola

\p{Lu}

????? ?????? ???????? ????????, ???????? \p{} (???????? "Lu") ???????????? ? Unicode

\p{IsGreek}

????? ????????? ??????, ??????????? 'Is' ????? ???? ????????? ? ?????? ????? ????? (???????? "Greek") ??? ??? ?????????? ? Unicode

\P{IsGreek}

????? ?? ????????? ??????, ??????????? 'Is' ????? ???? ????????? ? ?????? ????? ????? (???????? "Greek") ??? ??? ?????????? ? Unicode

a*x

x, ax, aax, aaax ....

a?x

ax, x

a+x

ax, aax, aaax ....

(a|b)+x

ax, bx, aax, abx, bax, bbx, aaax, aabx, abax, abbx, baax, babx, bbax, bbbx, aaaax ....

[abcde]x

ax, bx, cx, dx, ex

[a-e]x

ax, bx, cx, dx, ex

[-ae]x

-x, ax, ex

[ae-]x

ax, ex, -x

[^0-9]x

????? ?????????? ??????, ?? ??????? ??????? ?????? x

\Dx

????? ?????????? ??????, ?? ??????? ??????? ?????? x

.x

????? ??????, ?? ??????? ??????? ?????? x

.*abc.*

1x2abc, abc1x2, z3456abchooray ....

ab{2}x

abbx

ab{2,4}x

abbx, abbbx, abbbbx

ab{2,}x

abbx, abbbx, abbbbx ....

(ab){2}x

ababx

E ??????

 

Добавьтe Ваш комментарий

Ваше имя (псевдоним):
Ваш адрес почты:
Заголовок:
Комментарий:

??????????




????????

Внимание!!! Файл sape.php не обнаружен. Проверьте правильность установки кода Sape.


C???????? ?????????