404
Яндекс 404 Нет такой страницы

Несуществующая страница

Страница, которую вы читаете, не существует.

Верные способы попасть в никуда:

  • написать рудз.yandex.ru вместо help.yandex.ru (скачайте и установите Punto Switcher, если не хотите больше так ошибаться)
  • написать inex.html, idnex.html или index.htm вместо index.html

Если вы считаете, что мы завели вас сюда специально, опубликовав неверную ссылку, пришлите нам эту ссылку по адресу 404@yandex-team.ru.

А если вы действительно хотите что-то найти в интернете, воспользуйтесь настоящим поиском Яндекса:

И помните: вы это не читали.

Что такое страница 404/403?
Этого баннера здесь нет
© 2011 «Яндекс» О компании

W3C

!

(XML) 1.0
( )

W3C 6 2000 .

:
http://www.w3.org/TR/2000/REC-xml-20001006
:
http://www.w3.org/TR/REC-xml
:
http://www.w3.org/TR/2000/WD-xml-2e-20000814
http://www.w3.org/TR/1998/REC-xml-19980210
:
Tim Bray, Textuality Netscape mailto:tbray@textuality.com
Jean Paoli, Microsoft mailto:jeanpa@microsoft.com
C. M. Sperberg-McQueen, University of Illinois at Chicago Text Encoding Initiative mailto:cmsmcq@uic.edu
Eve Maler, Sun Microsystems, Inc. mailto:elm@east.sun.com -
: , mailto: a_pyramidin@yahoo.com

The Extensible Markup Language/ (XML) SGML . , WEB SGML , HTML. XML SGML HTML.


W3C W3C. , . W3C , . Web.

, (Standard Generalized Markup Language, ISO 8879:1986(E), ) World Wide Web. W3C XML, http://www.w3.org/XML/.
. : http://www.w3.org/XML/#trans.
W3C : http://www.w3.org/TR/.

XML ( 10 1998), , ( http://www.w3.org/XML/xml-19980210-errata).
http://www.w3.org/XML/xml-V10-2e-errata.

, , , :
 xml-editor@w3.org; ,
: a_pyramidin@yahoo.com

:

C. M. Sperberg-McQueen' . World Wide Web Consortium, cmsmcq@w3.org.

 

1
    1.1
    1.2
2
    2.1 XML
    2.2
    2.3
    2.4
    2.5
    2.6
    2.7 CDATA
    2.8 ()
    2.9
    2.10
    2.11
    2.12
3
    3.1 , ""
    3.2
        3.2.1
        3.2.2
    3.3
        3.3.1
        3.3.2
        3.3.3
    3.4
4
    4.1
    4.2
        4.2.1
        4.2.2
    4.3
        4.3.1 Text Declaration
        4.3.2
        4.3.3
    4.4 XML
        4.4.1 Not Recognized/
        4.4.2 Included/
        4.4.3 Included If Validating/,
        4.4.4 Forbidden/
        4.4.5 Included in Literal/ ()l
        4.4.6 Notify/
        4.4.7 Bypassed/
        4.4.8 Included as PE/
    4.5
    4.6
    4.7
    4.8
5
    5.1
    5.2 XML
6


A
    A.1
    A.2
B
C XML SGML ()
D ()
E ()
F ()
    F.1
    F.2
G W3C XML Working Group ()
H W3C XML Core Group ()
I ()


1

Extensible Markup Language, XML, , XML-, . XML SGML - The Standard Generalized Markup Language [ISO 8879]. XML "" SGML.

XML , , .
, , - . . XML .

[: , XML, XML .]
[: , XML , application/.] XML , XML .


1.1

XML XML Working Group ( SGML Editorial Review Board), World Wide Web Consortium (W3C) 1996 .
Ÿ Jon Bosak Sun Microsystems XML Special Interest Group ( SGML Working Group), W3C. XML Working Group . Dan Connolly W3C.

XML:

  1. XML Internet.

  2. XML .

  3. XML SGML.

  4. , XML.

  5. (optional) XML , - .

  6. XML .

  7. XML .

  8. XML .

  9. XML .

  10. XML .

, (Unicode ISO/IEC 10646 , Internet RFC 1766 , ISO 639 ISO 3166 ), , XML 1.0 .

XML , .


1.2

, XML, .
, , XML:

may\

[: XML , , , .]

must\

[: XML , ; . ]

error\

[: ; . , .]

fatal error\

[: XML . , .
, ( ) .
, , , (.. ).]

at user option\

[: ( ) , ; , .]

validity constraint\

[: , XML. ; , , XML.]

well-formedness constraint\

[: , XML. .]

match\

[:
( :) - . , ISO/IEC 10646 (, , "+ " ), , . .
( :) , , .
( :) , [( ): ].]

for compatibility\

[: , XML, , , XML SGML.]

for interoperability\

[: , , , , XML SGML, WebSGML Adaptations Annex/ ISO 8879.]


2

[: XML, () , . XML , .]

XML .
, . , . "" - .
, , , , . , 4.3.2 .


2.1 XML

[: XML, :]

  1. , , .

  2. ,  .

  3. , , .

Document\
[1]    document    ::=    prolog element Misc*

, :

  1. .

  2. [: , root, , .]
    : , . , , , .

[: , C P , C P, , P.
P parent/ C, C - child/  P.]


2.2

[: , , .]
[: character/ () , ISO/IEC 10646 [ISO/IEC 10646] (. [ISO/IEC 10646-2000]). , , Unicode ISO/IEC 10646. , A.1 , . . , XML , Char. " ", 6.8 [Unicode] (. D21 3.6 [Unicode3]), .]

Character Range\
[2]    Char    ::=    #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* Unicode, , FFFE FFFF. */

. XML UTF-8 UTF-16 10646. , , 4.3.3 .


2.3

, .

S () (#x20), , .

White Space\
[3]    S    ::=    (#x20 | #x9 | #xD | #xA)+

, .
.

B .

[: Name\ , , , , , full stops, .]
, "xml" , (('X'|'x') ('M'|'m') ('L'|'l')), .

:

XML [XML Names] , . , XML, , XML .

Nmtoken ( ) .

Names and Tokens\
[4]    NameChar    ::=    Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
[5]    Name    ::=    (Letter | '_' | ':') (NameChar)*
[6]    Names    ::=    Name (S Name)*
[7]    Nmtoken    ::=    (NameChar)+
[8]    Nmtokens    ::=    Nmtoken (S Nmtoken)*

, , . /internal entities (EntityValue), (AttValue) (SystemLiteral). , SystemLiteral .

Literals\
[9]    EntityValue    ::=    '"' ([^%&"] | PEReference | Reference)* '"'
|  "'" ([^%&'] | PEReference | Reference)* "'"
[10]    AttValue    ::=    '"' ([^<&"] | Reference)* '"'
|  "'" ([^<&'] | Reference)* "'"
[11]    SystemLiteral    ::=    ('"' [^"]* '"') | ("'" [^']* "'")
[12]    PubidLiteral    ::=    '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
[13]    PubidChar    ::=    #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]

:

  EntityValue , < (., <!ENTITY mylt "<">), , " " (well-formedness).


2.4

.
[: , , , , , , CDATA, , ,   XML, ( ).]

[: , , .]

(&) (<) , CDATA. -, escape-, "&amp;" "&lt;" . (>) "&gt;" , , escape- "&gt;" , "]]>" , CDATA.

- , . CDATA - , CDATA - "]]>".

, , , , , (') "&apos;", (") - "&quot;".

Character Data\
[14]    CharData    ::=    [^<&]* - ([^<&]* ']]>' [^<&]*)


2.5

[: ; , , . : XML , , . "--" ( ) .] .

Comments/
[15]    Comment    ::=    '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'

:

<!--  <head>  <body> -->

, --->.
.

<!-- B+, B  B--->


2.6

[: () .]

Processing Instructions\
[16]    PI    ::=    '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
[17]    PITarget    ::=    Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

. "" (PITarget) , . , "XML", "xml" .., . XML "" . .


2.7 CDATA

[: CDATA , ; escape- , , . CDATA "<![CDATA[" "]]>":]

CDATA Sections/ CDATA
[18]    CDSect    ::=    CDStart CData CDEnd
[19]    CDStart    ::=    '<![CDATA['
[20]    CData    ::=    (Char* - (Char* ']]>' Char*))
[21]    CDEnd    ::=    ']]>'

CDATA CDEnd , : ( ) escape- "&lt;" "&amp;".
CDATA .

CDATA, "<greeting>" "</greeting>" , :

<![CDATA[<greeting>Hello, world!</greeting>]]> 


2.8

[: XML XML, XML.] , XML, , :

<?xml version="1.0"?> <greeting>Hello, world!</greeting> 

:

<greeting>Hello, world!</greeting>

"1.0" ; "1.0", . XML , "1.0", - XML, , , - .
, , , . , , .

XML - . XML .
[: XML /valid, , .]

.

Prolog\
[22]    prolog    ::=    XMLDecl? Misc* (doctypedecl Misc*)?
[23]    XMLDecl    ::=    '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
[24]    VersionInfo    ::=    S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')/* */
[25]    Eq    ::=    S? '=' S?
[26]    VersionNum    ::=    ([a-zA-Z0-9_.:] | '-')+
[27]    Misc    ::=    Comment | PI | S

[: XML , . /DTD. ( ), , , , . .]

[: , , .] , .
. 4 .

Document Type Definition\
[28]    doctypedecl    ::=    '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl | DeclSep)* ']' S?)? '>' [ ( ): Root Element]
( ): ]
/* */
[28a]    DeclSep    ::=    PEReference | S [: PE/ ( ) ]
/* */
[29]    markupdecl    ::=    elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [: / ]
[: ]

, , doctypedecl, , .

. (elementdecl, AttlistDecl ..) , .

( ), , , (. 3.4 ).
. , .

:

.

: /

. , (markupdecl ) , .

:

, , , . ( , , .)

:

, , extSubset.

, , DeclSep, , markupdecl, . ; .

External Subset\
[30]    extSubset    ::=    TextDecl? extSubsetDecl
[31]    extSubsetDecl    ::=    ( markupdecl | conditionalSect | DeclSep)* /* */

, , .

XML :

<?xml version="1.0"?> <!DOCTYPE greeting SYSTEM "hello.dtd"> <greeting>Hello, world!</greeting> 

"hello.dtd" ( URI) .

, :

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE greeting [
  <!ELEMENT greeting (#PCDATA)>
]>
<greeting>Hello, world!</greeting>

, , , . , .


2.9

XML ; . , XML, , , .
[: , ( , , ).]

Standalone Document Declaration\
[32]    SDDecl    ::=    S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) [: ]

"yes" , , XML . "no" , . , . , , .

, . , , "no".

XML, standalone="no", , , .

:

"no", :

  • , , , ,

  • , ( amp, lt, gt, apos, quot), ,

  • , , , ,

  • , .

XML :

<?xml version="1.0" standalone='yes'?>


2.10

XML " " (, ) - . . , "" , , , , .

XML , . XML , , .

, xml:space, , . /valid , , , . , , - - "default" "preserve". :

<!ATTLIST poem  xml:space (default|preserve) 'preserve'>

<!-- -->
<!ATTLIST pre xml:space (preserve) #FIXED 'preserve'>

"default" , ; "preserve" . , , xml:space.

, .


2.11

XML , , , . (#xD) (#xA).

, , XML, , XML ( ) , , - #xD #xA #xD, #xA, #xA.


2.12

, . , xml:lang, , , XML. , , , . , [IETF RFC 1766], Tags for the Identification of Languages, IETF Standards Track.

:

[IETF RFC 1766] , [ISO 639], , [ISO 3166], , Internet Assigned Numbers Authority [IANA-LANGCODES].
, [IETF RFC 1766] , [ISO 639].

( 33 38 .)

:

<p xml:lang="en">The quick brown fox jumps over the lazy dog.</p>
<p xml:lang="en-GB">What colour is it?</p>
<p xml:lang="en-US">What color is it?</p>
<sp who="Faust" desc='leise' xml:lang="de">
  <l>Habe nun, ach! Philosophie,</l>
  <l>Juristerei, und Medizin</l>
  <l>und leider auch Theologie</l>
  <l>durchaus studiert mit heißem Bemüh'n.</l>
</sp>

( ), xml:lang, , ,  xml:lang  .

 xml:lang 

xml:lang NMTOKEN #IMPLIED

, . , , xml:lang :

<!ATTLIST poem   xml:lang NMTOKEN 'fr'>
<!ATTLIST gloss  xml:lang NMTOKEN 'en'>
<!ATTLIST note   xml:lang NMTOKEN 'en'>


3

[: XML , , - - . , , "generic identifier" (GI) - , .] .

Element\
[39]    element    ::=    EmptyElemTag  
| STag content ETag [: ]
[: ()]

, () , , (('X'|'x')('M'|'m')('L'|'l')), .

:

Name .

:

(), , elementdecl, Name :

  1. EMPTY, .

  2. children, , , (, S) , . , CDATA, , S, , , .

  3. Mixed, , .

  4. ANY (), .


3.1 ,

[: XML .]

Start-tag\
[40]    STag    ::=    '<' Name (S Attribute)* S? '>' [: Att Spec]
[41]    Attribute    ::=    Name Eq AttValue [: ]
[: ]
[: < ]

Name .
[: Name-AttValue (- ) ],
[: Name , ]
[: AttValue ( ' ") .]
, .

: Att Spec

.

:

; , . ( . 3.3 .)

:

.

: <

, , <.

:

<termdef id="dt-dog" term="dog">

[: , , , , , :]

End-tag\
[42]    ETag    ::=    '</' Name S? '>'

:

</termdef>

[: :]

Content of Elements\
[43]    content    ::=    CharData? ((element | Reference | CDSect | PI | Comment) CharData?)* /* */

[: .] , , .
[: :]

Tags for Empty Elements\
[44]    EmptyElemTag    ::=    '<' Name (S Attribute)* S? '/>' [: Att Spec]

, , , EMPTY .
( ) , EMPTY.

:

<IMG align="left"
 src="http://www.w3.org/Icons/WWW/w3c_home" />
<br></br>
<br/>


3.2

XML , , . .

, . XML, , , , , .

[: :]

Element Type Declaration\
[45]    elementdecl    ::=    '<!ELEMENT' S Name S contentspec S? '>' [: ]
[46]    contentspec    ::=    'EMPTY' | 'ANY' | Mixed | children  

Name .

:

.

:

<!ELEMENT br EMPTY>
<!ELEMENT p (#PCDATA|emph)* >
<!ELEMENT %name.para; %content.para; >
<!ELEMENT container ANY>


3.2.1

[: , ( ), , , (, S).]
[: , , , .] content particles (cp)/ , :

Element-content Models\
[47]    children    ::=    (choice | seq) ('?' | '*' | '+')?  
[48]    cp    ::=    (Name | choice | seq) ('?' | '*' | '+')?  
[49]    choice    ::=    '(' S? cp ( S? '|' S? cp )+ S? ')' /* */
/* */
[: / ]
[50]    seq    ::=    '(' S? cp ( S? ',' S? cp )* S? ')' /* */
[: / ]

Name  - , . , ; , , , . , (+), (*) (?) . , / . , /productions .

, , , , , , . , , . . .

: /

. , , choice, seq Mixed , () .

, choice, seq Mixed, , , (| ,).

:

<!ELEMENT spec (front, body, back?)>
<!ELEMENT div1 (head, (p | list | note)*, div2*)>
<!ELEMENT dictionary-body (%div.mix; | %dict.mix;)*>


3.2.2

[: , , () .] , :

Mixed-content Declaration\
[51]    Mixed    ::=    '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*'  
| '(' S? '#PCDATA' S? ')' [: / ]
[: ]

Name , . #PCDATA "parsed character data/ ."

:

.

:

<!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
<!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
<!ELEMENT b (#PCDATA)>


3.3

- . ; /productions, , 3.1 , . :

  • , .

  • .

  • .

[: , ( ) , :]

Attribute-list Declaration\
[52]    AttlistDecl    ::=    '<!ATTLIST' S Name AttDef* S? '>'
[53]    AttDef    ::=    S Name S AttType S DefaultDecl

Name AttlistDecl - . , XML , , , . Name AttDef - .

AttlistDecl, . , , . , . , XML , , , , .


3.3.1

XML: string/, . string ; . , , , 3.3 .

Attribute Types\
[54]    AttType    ::=    StringType | TokenizedType | EnumeratedType  
[55]    StringType    ::=    'CDATA'  
[56]    TokenizedType    ::=    'ID' [: ID]
[: ID ]
[: ID ]
| 'IDREF' [: IDREF]
| 'IDREFS' [: IDREF]
| 'ENTITY' [: ]
| 'ENTITIES' [: ]
| 'NMTOKEN' [: ]
| 'NMTOKENS' [: ]

: ID

ID Name. XML ; .. ID .

: ID

ID .

: ID

ID - #IMPLIED #REQUIRED.

: IDREF

IDREF Name, IDREFS Names/; Name ID XML; .. IDREF ID.

:

ENTITY Name, ENTITIES ; Name , .

:

NMTOKEN Nmtoken; NMTOKENS Nmtokens.

[: Enumerated attributes/ , ]. :

Enumerated Attribute Types\
[57]    EnumeratedType    ::=    NotationType | Enumeration  
[58]    NotationType    ::=    'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' [: ]
[: ]
[: ]
[59]    Enumeration    ::=    '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [: ]

NOTATION , / , , .

:

, ; .

:

NOTATION.

:

, NOTATION , EMPTY.

:

Nmtoken .

, Nmtoken .

3.3.2

, , , XML , .

Attribute Defaults\
[60]    DefaultDecl    ::=    '#REQUIRED' | '#IMPLIED'  
| (('#FIXED' S)? AttValue) [: ]
[: ]
[: < ]
[: ]

, #REQUIRED , , #IMPLIED  - .
[: #REQUIRED, #IMPLIED, AttValue default; #FIXED , . , XML , , .]

: Required/

#REQUIRED, .

:

.

:

, #FIXED, .

:

<!ATTLIST termdef
          id      ID      #REQUIRED
          name    CDATA   #IMPLIED>
<!ATTLIST list
          type    (bullets|ordered|glossary)  "ordered">
<!ATTLIST form
          method  CDATA   #FIXED "POST">


3.3.3

, XML ,   , , , .

  1. #xA, 2.11 , , .

  2. , .

  3. , - , :

    • - .

    • - 3 .

    • (#x20, #xD, #xA, #x9) - (#x20) .

    • - .

- CDATA, XML , (#x20) (#x20) (#x20).

, - , #x20, (#xD, #xA #x9). , ( ), (#x20) , , , ; ,   (#x20).

, , CDATA.

.
:

<!ENTITY d "&#xD;">
<!ENTITY a "&#xA;">
<!ENTITY da "&#xD;&#xA;">

, a NMTOKENS, , a CDATA.

a NMTOKENS a CDATA
a="xyz"
x y z #x20 #x20 x y z
a="&d;&d;A&a;&a;B&da;"
A #x20 B #x20 #x20 A #x20 #x20 B #x20 #x20
a="&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa;"
#xD #xD A #xA #xA B #xD #xA #xD #xD A #xA #xA B #xD #xD

, ( ), a NMTOKENS.


3.4

[: , , .]

Conditional Section\
[61]    conditionalSect    ::=    includeSect | ignoreSect  
[62]    includeSect    ::=    '<![' S? 'INCLUDE' S? '[' extSubsetDecl ']]>' /* */
[: /]
[63]    ignoreSect    ::=    '<![' S? 'IGNORE' S? '[' ignoreSectContents* ']]>' /* */
[: /]
[64]    ignoreSectContents    ::=    Ignore ('<![' ignoreSectContents ']]>' Ignore)*  
[65]    Ignore    ::=    Char* - (Char* ('<![' | ']]>') Char*)  

: /

"<![", "[" "]]>" , .

, , , , .

- INCLUDE, . - IGNORE, . INCLUDE IGNORE, - - . "[" , "<![" "]]>" , . .

, , , .

:

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

<![%draft;[
<!ELEMENT book (comments*, title, body, supplements?)>
]]>
<![%final;[
<!ELEMENT book (title, body, supplements?)>
]]>


4

: XML . ; ( ) name\ .] XML , , XML .

. [: ; .]

[: , , , , , , XML. , . XML , XML .]

; - , ENTITY ENTITIES.

[: General entities/ . , .]
[: .] . , ; - .


4.1

[: ISO/IEC 10646, , , .]

Character Reference\
[66]    CharRef    ::=    '&#' [0-9]+ ';'  
| '&#x' [0-9a-fA-F]+ ';' [: ]

:

, , Char.

"&#x", ; 16- ISO/IEC 10646. "&#", ; 10- .

[: .] [: (&) (;) .]
[: (%) (;) .]

Entity Reference\
[67]    Reference    ::=    EntityRef | CharRef  
[68]    EntityRef    ::=    '&' Name ';' [: ]
[: ]
[: ]
[: ]
[69]    PEReference    ::=    '%' Name ';' [: ]
[: ]
[: ]

: Entity Declared/

, , , "standalone='yes'", , , Name, , , (?) , , : amp, lt, gt, apos, quot. , .

, , , ; , ,   , , standalone='yes'.

:

"standalone='no'", Name, , . , amp, lt, gt, apos, quot , 4.6 . . , .

:

. , ENTITY ENTITIES.

:

, .

:

.

:

Type <key>less-than</key> (&#x3C;) to save options.
This document was prepared on &docdate; and
is classified &security-level;.

:

<!-- declare the parameter entity "ISOLat2"... -->
<!ENTITY % ISOLat2
         SYSTEM "http://www.xml.com/iso/isolat2-xml.entities" >
<!-- ... now reference it. -->
%ISOLat2;


4.2

[: :]

Entity Declaration\
[70]    EntityDecl    ::=    GEDecl | PEDecl
[71]    GEDecl    ::=    '<!ENTITY' S Name S EntityDef S? '>'
[72]    PEDecl    ::=    '<!ENTITY' S '%' S Name S PEDef S? '>'
[73]    EntityDef    ::=    EntityValue | (ExternalID NDataDecl?)
[74]    PEDef    ::=    EntityValue | ExternalID

Name , , ENTITY ENTITIES. , ; XML , .


4.2.1

[: EntityValue, . , .] , , : . 4.5 .

.

:

<!ENTITY Pub-Status "This is a pre-release of the
 specification.">


4.2.2

[: , , :]

External Entity Declaration\
[75]    ExternalID    ::=    'SYSTEM' S SystemLiteral  
| 'PUBLIC' S PubidLiteral S SystemLiteral  
[76]    NDataDecl    ::=    S 'NDATA' S Name [: ]

NDataDecl , - ; - .

:

Name .

[: SystemLiteral . URI ( [IETF RFC 2396], [IETF RFC 2732]), XML, .] ( #) , . (, XML, , , ), URI , . URI , , , , , - .

URI- escap' . -ASCII , , 2.4 [IETF RFC 2396], (#) (%) , [IETF RFC 2732].
escap' :

  1. UTF-8 [IETF RFC 2279] .

  2. , , escap' URI escape- ( %HH, HH - 16- ).

  3. .

[: , .] XML, , , URI. , URI, . , (#x20), .

:

<!ENTITY open-hatch
         SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY open-hatch
         PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN"
         "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY hatch-pic
         SYSTEM "../grafix/OpenHatch.gif"
         NDATA gif >


4.3

4.3.1

.

Text Declaration\
[77]    TextDecl    ::=    '<?xml' VersionInfo? EncodingDecl S? '?>'

, . , . .


4.3.2

, . , extParsedEnt. .

Well-Formed External Parsed Entity\
[78]    extParsedEnt    ::=    TextDecl? content

, . .

, XML ; , , , , , , , - .


4.3.3

XML . XML "" UTF-8 UTF-16. "UTF-8" "UTF-16" , UTF-8 UTF-16.

, UTF-16, Byte Order Mark ( ), Annex F [ISO/IEC 10646], Annex H [ISO/IEC 10646-2000], 2.4 [Unicode] 2.7 [Unicode3] ( ZERO WIDTH NO-BREAK SPACE/ , #xFEFF). "" , XML. XML , UTF-8 UTF-16.

XML UTF-8 UTF-16, , , XML , () . ( "" MIME), , , UTF-8 UTF-16, (. 4.3.1 ), :

Encoding Declaration\
[80]    EncodingDecl    ::=    S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )  
[81]    EncName    ::=    [A-Za-z] ([A-Za-z0-9._] | '-')* /* */

XML. EncName / .

"UTF-8", "UTF-16", "ISO-10646-UCS-2" "ISO-10646-UCS-4" Unicode / ISO/IEC 10646, "ISO-8859-1", "ISO-8859-2", ... "ISO-8859-n" ( n ) ISO 8859, "ISO-2022-JP", "Shift_JIS" "EUC-JP" JIS X-0208-1997. , , ( charsets\ ) Internet Assigned Numbers Authority [IANA-CHARSETS], , ; , "x-". XML IANA , IANA , ( , , IANA ).

, (, HTTP MIME), , , XML , , , Byte Order Mark , UTF-8. , , ASCII UTF-8, ASCII .

, TextDecl , .

, XML , . , XML ( , ) , , . , XML , UTF-8 UTF-16.

, :

<?xml encoding='UTF-8'?>
<?xml encoding='EUC-JP'?>


4.4 XML

, , , , , XML . :

- ; .

, ; AttValue.

Name, , , ENTITY, - , ENTITIES.

; EntityValue.

, EntityValue, AttValue, PI, Comment, SystemLiteral, PubidLiteral (. 3.4 ).

 


 

 
,


4.4.1

% ; , , , . , , , .


4.4.2

[: , , , .] , ( ) , . ( "AT&amp;T;" "AT&T;" .) , .


4.4.3 ,

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

, , SGML XML, , , . , , , , , ( - .).


4.4.4

:


4.4.5

, , , , , , . , :

<!--  -->
<!ENTITY % YN '"Yes"' >
<!ENTITY WhatHeSaid "He said %YN;" >

- :

<!ENTITY EndAttr "27'" >
<element attribute='a-&EndAttr;>


4.4.6

ENTITY ENTITIES, ( ) .


4.4.7

EntityValue , .


4.4.8

, , , . , () (#x20); - . ; 4.4.5 .


4.5

, .
[: , , EntityValue.] [: .]

, (EntityValue), , . . , , , , , , , ; , . , :

<!ENTITY % pub    "&#xc9;ditions Gallimard" >
<!ENTITY   rights "All rights reserved" >
<!ENTITY   book   "La Peste: Albert Camus,
&#xA9; 1947 %pub;. &rights;" >

"book" :

La Peste: Albert Camus,
 1947 Éditions Gallimard. &rights;

"&rights;", , "&book;" .

; . D .


4.6

[: escape' , . (amp, lt, gt, apos, quot). ; , "&#60;" and "&#38;" escape' < &, .]

XML , , . , XML , , . lt amp , , ( "-" ), escape'; escapi', . gt, apos quot , , escape' ( - ; escapi' , ). :

<!ENTITY lt     "&#38;#60;">
<!ENTITY gt     "&#62;">
<!ENTITY amp    "&#38;#38;">
<!ENTITY apos   "&#39;">
<!ENTITY quot   "&#34;">


4.7

[: , , , , .]

[: , , XML , .]

Notation Declarations\
[82]    NotationDecl    ::=    '<!NOTATION' S Name S (ExternalID | PublicID) S? '>' [: ]
[83]    PublicID    ::=    'PUBLIC' S PubidLiteral  

:

/Name.

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


4.8

[: XML.] , XML; , .


5

5.1

XML : .

, .

[: , , , , , .] , XML , .

, , .
[: /, , , , , ; , .] standalone="yes", , , , .


5.2 XML

XML ; . ; , . , XML:

XML, , , , . , , , , XML.


6

XML Extended Backus-Naur Form (EBNF). :

symbol ::= expression

, , - . .

  :

#xN

N 16- , ISO/IEC 10646, (UCS-4), , . #xN ; XML.

[a-zA-Z], [#xN-#xN]

Char () ().

[abc], [#xN#xN#xN]

Char . .

[^a-z], [^#xN-#xN]

Char .

[^abc], [^#xN#xN#xN]

Char . .

"string"

, , .

'string'

, , .

, , A B :

(expression/)

expression , .

A?

A ; A ( ).

A B

A B. , ; , A B | C D (A B) | (C D).

A | B

A B, .

A - B

, A, B.

A+

A. , ; , A+ | B+ (A+) | (B+).

A*

0 A. , ; A* | B* (A*) | (B*).

, :

/* ... */

.

[ wfc: ... ]

well-formedness constraint- ; , .

[ vc: ... ]

validity constraint - ; () , .


A

A.1

IANA-CHARSETS
(Internet Assigned Numbers Authority) Official Names for Character Sets, ed. Keld Simonsen et al. . ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets.
IETF RFC 1766
IETF (Internet Engineering Task Force). RFC 1766: Tags for the Identification of Languages, ed. H. Alvestrand. 1995. . http://www.ietf.org/rfc/rfc1766.txt.)
ISO/IEC 10646
ISO (International Organization for Standardization). ISO/IEC 10646-1993 (E). Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane. [Geneva]: International Organization for Standardization, 1993 ( AM 1 AM 7).
ISO/IEC 10646-2000
ISO (International Organization for Standardization). ISO/IEC 10646-1:2000. Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane. [Geneva]: International Organization for Standardization, 2000.
Unicode
The Unicode Consortium. The Unicode Standard, Version 2.0. Reading, Mass.: Addison-Wesley Developers Press, 1996.
Unicode3
The Unicode Consortium. The Unicode Standard, Version 3.0. Reading, Mass.: Addison-Wesley Developers Press, 2000. ISBN 0-201-61633-5.


A.2

Aho/Ullman
Aho, Alfred V., Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Reading: Addison-Wesley, 1986, rpt. corr. 1988.
Berners-Lee et al.
Berners-Lee, T., R. Fielding, and L. Masinter. Uniform Resource Identifiers (URI): Generic Syntax and Semantics. 1997. ( ; RFC1738.)
Brüggemann-Klein
Brüggemann-Klein, Anne. Formal Models in Document Processing. Habilitationsschrift. Faculty of Mathematics at the University of Freiburg, 1993.
(. ftp://ftp.informatik.uni-freiburg.de/documents/papers/brueggem/habil.ps.)
Brüggemann-Klein and Wood
Brüggemann-Klein, Anne, and Derick Wood. Deterministic Regular Languages. Universität Freiburg, Institut für Informatik, Bericht 38, Oktober 1991. Extended abstract in A. Finkel, M. Jantzen, Hrsg., STACS 1992, S. 173-184. Springer-Verlag, Berlin 1992. Lecture Notes in Computer Science 577. One-Unambiguous Regular Languages in Information and Computation 140 (2): 229-253, 1998.
Clark
James Clark. Comparison of SGML and XML. . http://www.w3.org/TR/NOTE-sgml-xml-971215.
IANA-LANGCODES
(Internet Assigned Numbers Authority) Registry of Language Tags, ed. Keld Simonsen et al. (. http://www.isi.edu/in-notes/iana/assignments/languages/.)
IETF RFC2141
IETF (Internet Engineering Task Force). RFC 2141: URN Syntax, ed. R. Moats. 1997.
(. http://www.ietf.org/rfc/rfc2141.txt.)
IETF RFC 2279
IETF (Internet Engineering Task Force). RFC 2279: UTF-8, a transformation format of ISO 10646, ed. F. Yergeau, 1998. (. http://www.ietf.org/rfc/rfc2279.txt.)
IETF RFC 2376
IETF (Internet Engineering Task Force). RFC 2376: XML Media Types. ed. E. Whitehead, M. Murata. 1998. (. http://www.ietf.org/rfc/rfc2376.txt.)
IETF RFC 2396
IETF (Internet Engineering Task Force). RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax. T. Berners-Lee, R. Fielding, L. Masinter. 1998.
(. http://www.ietf.org/rfc/rfc2396.txt.)
IETF RFC 2732
IETF (Internet Engineering Task Force). RFC 2732: Format for Literal IPv6 Addresses in URL's. R. Hinden, B. Carpenter, L. Masinter. 1999. (. http://www.ietf.org/rfc/rfc2732.txt.)
IETF RFC 2781
IETF (Internet Engineering Task Force). RFC 2781: UTF-16, an encoding of ISO 10646, ed. P. Hoffman, F. Yergeau. 2000. (. http://www.ietf.org/rfc/rfc2781.txt.)
ISO 639
(International Organization for Standardization). ISO 639:1988 (E). Code for the representation of names of languages. [Geneva]: International Organization for Standardization, 1988.
ISO 3166
(International Organization for Standardization). ISO 3166-1:1997 (E). Codes for the representation of names of countries and their subdivisions -- Part 1: Country codes [Geneva]: International Organization for Standardization, 1997.
ISO 8879
ISO (International Organization for Standardization). ISO 8879:1986(E). Information processing -- Text and Office Systems -- Standard Generalized Markup Language (SGML). First edition -- 1986-10-15. [Geneva]: International Organization for Standardization, 1986.
ISO/IEC 10744
ISO (International Organization for Standardization). ISO/IEC 10744-1992 (E). Information technology -- Hypermedia/Time-based Structuring Language (HyTime). [Geneva]: International Organization for Standardization, 1992. Extended Facilities Annexe. [Geneva]: International Organization for Standardization, 1996.
WEBSGML
ISO (International Organization for Standardization). ISO 8879:1986 TC2. Information technology -- Document Description and Processing Languages. [Geneva]: International Organization for Standardization, 1998. (. http://www.sgmlsource.com/8879rev/n0029.htm.)
XML Names
Tim Bray, Dave Hollander, and Andrew Layman, editors. Namespaces in XML. Textuality, Hewlett-Packard, and Microsoft. World Wide Web Consortium, 1999.
(. http://www.w3.org/TR/REC-xml-names/.)


B

, Unicode, ( , ), ( , ). .

Characters\
[84]    Letter    ::=    BaseChar | Ideographic
[85]    BaseChar    ::=    [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] | [#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] | [#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] | #x0386 | [#x0388-#x038A] | #x038C | [#x038E-#x03A1] | [#x03A3-#x03CE] | [#x03D0-#x03D6] | #x03DA | #x03DC | #x03DE | #x03E0 | [#x03E2-#x03F3] | [#x0401-#x040C] | [#x040E-#x044F] | [#x0451-#x045C] | [#x045E-#x0481] | [#x0490-#x04C4] | [#x04C7-#x04C8] | [#x04CB-#x04CC] | [#x04D0-#x04EB] | [#x04EE-#x04F5] | [#x04F8-#x04F9] | [#x0531-#x0556] | #x0559 | [#x0561-#x0586] | [#x05D0-#x05EA] | [#x05F0-#x05F2] | [#x0621-#x063A] | [#x0641-#x064A] | [#x0671-#x06B7] | [#x06BA-#x06BE] | [#x06C0-#x06CE] | [#x06D0-#x06D3] | #x06D5 | [#x06E5-#x06E6] | [#x0905-#x0939] | #x093D | [#x0958-#x0961] | [#x0985-#x098C] | [#x098F-#x0990] | [#x0993-#x09A8] | [#x09AA-#x09B0] | #x09B2 | [#x09B6-#x09B9] | [#x09DC-#x09DD] | [#x09DF-#x09E1] | [#x09F0-#x09F1] | [#x0A05-#x0A0A] | [#x0A0F-#x0A10] | [#x0A13-#x0A28] | [#x0A2A-#x0A30] | [#x0A32-#x0A33] | [#x0A35-#x0A36] | [#x0A38-#x0A39] | [#x0A59-#x0A5C] | #x0A5E | [#x0A72-#x0A74] | [#x0A85-#x0A8B] | #x0A8D | [#x0A8F-#x0A91] | [#x0A93-#x0AA8] | [#x0AAA-#x0AB0] | [#x0AB2-#x0AB3] | [#x0AB5-#x0AB9] | #x0ABD | #x0AE0 | [#x0B05-#x0B0C] | [#x0B0F-#x0B10] | [#x0B13-#x0B28] | [#x0B2A-#x0B30] | [#x0B32-#x0B33] | [#x0B36-#x0B39] | #x0B3D | [#x0B5C-#x0B5D] | [#x0B5F-#x0B61] | [#x0B85-#x0B8A] | [#x0B8E-#x0B90] | [#x0B92-#x0B95] | [#x0B99-#x0B9A] | #x0B9C | [#x0B9E-#x0B9F] | [#x0BA3-#x0BA4] | [#x0BA8-#x0BAA] | [#x0BAE-#x0BB5] | [#x0BB7-#x0BB9] | [#x0C05-#x0C0C] | [#x0C0E-#x0C10] | [#x0C12-#x0C28] | [#x0C2A-#x0C33] | [#x0C35-#x0C39] | [#x0C60-#x0C61] | [#x0C85-#x0C8C] | [#x0C8E-#x0C90] | [#x0C92-#x0CA8] | [#x0CAA-#x0CB3] | [#x0CB5-#x0CB9] | #x0CDE | [#x0CE0-#x0CE1] | [#x0D05-#x0D0C] | [#x0D0E-#x0D10] | [#x0D12-#x0D28] | [#x0D2A-#x0D39] | [#x0D60-#x0D61] | [#x0E01-#x0E2E] | #x0E30 | [#x0E32-#x0E33] | [#x0E40-#x0E45] | [#x0E81-#x0E82] | #x0E84 | [#x0E87-#x0E88] | #x0E8A | #x0E8D | [#x0E94-#x0E97] | [#x0E99-#x0E9F] | [#x0EA1-#x0EA3] | #x0EA5 | #x0EA7 | [#x0EAA-#x0EAB] | [#x0EAD-#x0EAE] | #x0EB0 | [#x0EB2-#x0EB3] | #x0EBD | [#x0EC0-#x0EC4] | [#x0F40-#x0F47] | [#x0F49-#x0F69] | [#x10A0-#x10C5] | [#x10D0-#x10F6] | #x1100 | [#x1102-#x1103] | [#x1105-#x1107] | #x1109 | [#x110B-#x110C] | [#x110E-#x1112] | #x113C | #x113E | #x1140 | #x114C | #x114E | #x1150 | [#x1154-#x1155] | #x1159 | [#x115F-#x1161] | #x1163 | #x1165 | #x1167 | #x1169 | [#x116D-#x116E] | [#x1172-#x1173] | #x1175 | #x119E | #x11A8 | #x11AB | [#x11AE-#x11AF] | [#x11B7-#x11B8] | #x11BA | [#x11BC-#x11C2] | #x11EB | #x11F0 | #x11F9 | [#x1E00-#x1E9B] | [#x1EA0-#x1EF9] | [#x1F00-#x1F15] | [#x1F18-#x1F1D] | [#x1F20-#x1F45] | [#x1F48-#x1F4D] | [#x1F50-#x1F57] | #x1F59 | #x1F5B | #x1F5D | [#x1F5F-#x1F7D] | [#x1F80-#x1FB4] | [#x1FB6-#x1FBC] | #x1FBE | [#x1FC2-#x1FC4] | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] | [#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 | [#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] | [#x30A1-#x30FA] | [#x3105-#x312C] | [#xAC00-#xD7A3]
[86]    Ideographic    ::=    [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
[87]    CombiningChar    ::=    [#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] | [#x0591-#x05A1] | [#x05A3-#x05B9] | [#x05BB-#x05BD] | #x05BF | [#x05C1-#x05C2] | #x05C4 | [#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] | [#x06DD-#x06DF] | [#x06E0-#x06E4] | [#x06E7-#x06E8] | [#x06EA-#x06ED] | [#x0901-#x0903] | #x093C | [#x093E-#x094C] | #x094D | [#x0951-#x0954] | [#x0962-#x0963] | [#x0981-#x0983] | #x09BC | #x09BE | #x09BF | [#x09C0-#x09C4] | [#x09C7-#x09C8] | [#x09CB-#x09CD] | #x09D7 | [#x09E2-#x09E3] | #x0A02 | #x0A3C | #x0A3E | #x0A3F | [#x0A40-#x0A42] | [#x0A47-#x0A48] | [#x0A4B-#x0A4D] | [#x0A70-#x0A71] | [#x0A81-#x0A83] | #x0ABC | [#x0ABE-#x0AC5] | [#x0AC7-#x0AC9] | [#x0ACB-#x0ACD] | [#x0B01-#x0B03] | #x0B3C | [#x0B3E-#x0B43] | [#x0B47-#x0B48] | [#x0B4B-#x0B4D] | [#x0B56-#x0B57] | [#x0B82-#x0B83] | [#x0BBE-#x0BC2] | [#x0BC6-#x0BC8] | [#x0BCA-#x0BCD] | #x0BD7 | [#x0C01-#x0C03] | [#x0C3E-#x0C44] | [#x0C46-#x0C48] | [#x0C4A-#x0C4D] | [#x0C55-#x0C56] | [#x0C82-#x0C83] | [#x0CBE-#x0CC4] | [#x0CC6-#x0CC8] | [#x0CCA-#x0CCD] | [#x0CD5-#x0CD6] | [#x0D02-#x0D03] | [#x0D3E-#x0D43] | [#x0D46-#x0D48] | [#x0D4A-#x0D4D] | #x0D57 | #x0E31 | [#x0E34-#x0E3A] | [#x0E47-#x0E4E] | #x0EB1 | [#x0EB4-#x0EB9] | [#x0EBB-#x0EBC] | [#x0EC8-#x0ECD] | [#x0F18-#x0F19] | #x0F35 | #x0F37 | #x0F39 | #x0F3E | #x0F3F | [#x0F71-#x0F84] | [#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 | [#x0F99-#x0FAD] | [#x0FB1-#x0FB7] | #x0FB9 | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] | #x3099 | #x309A
[88]    Digit    ::=    [#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] | [#x0966-#x096F] | [#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] | [#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] | [#x0D66-#x0D6F] | [#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29]
[89]    Extender    ::=    #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]

, , Unicode 2.0 :


C XML SGML ()

XML SGML, XML , SGML. , XML , SGML . [Clark].


D ()

, , 4.4 XML .

<!ENTITY example "<p> (&#38;#38;)   escape'
 (&#38;#38;#38;)    (&amp;amp;).</p>" >

XML , "example":

<p> (&#38;)   escape'
 (&#38;#38;)    (&amp;amp;).</p>

"&example;" , p , , p ( , ):

 (&)   escape'
 (&#38;)    (&amp;).

. :

1 <?xml version='1.0'?>
2 <!DOCTYPE test [
3 <!ELEMENT test (#PCDATA) >
4 <!ENTITY % xx '&#37;zz;'>
5 <!ENTITY % zz '&#60;!ENTITY tricky "error-prone" >' >
6 %xx;
7 ]>
8 <test>This sample shows a &tricky; method.</test>

:


E ()

3.2.1 , , . SGML ( ""); XML SGML .

, ((b, c) | (b, d)) - , , b, XML , b , , b. , b , : (b, (c | d)). b . , , ; c d .

: , , 3.5 3.9 Aho, Sethi Ullman [Aho/Ullman]. , (.. - ); - , , , .

, , , ; . Brüggemann-Klein 1991 [Brüggemann-Klein].


F ()

XML - , , . XML , , , , , -- , . , . XML , , , XML : , , XML , , . XML. , , XML- - () . .


F.1

XML, UTF-8 UTF-16, XML, '<?xml', , 8- , .
, , UCS-4  '<' "#x0000003C" '?' "#x0000003F" Byte Order Mark/   UTF-16, "#xFEFF". ## , , ## 00.

Byte Order Mark:

00 00 FE FF UCS-4, big-endian machine (1234 order)
FF FE 00 00 UCS-4, little-endian machine (4321 order)
00 00 FF FE UCS-4, 8- (2143)
FE FF 00 00 UCS-4, 8- (3412)
FE FF ## ## UTF-16, big-endian
FF FE ## ## UTF-16, little-endian
EF BB BF UTF-8

Byte Order Mark:

00 00 00 3C UCS-4 32- ASCII, ASCII, , , big-endian (1234), little-endian (4321) (2143 3412). , , UCS-4 32- .
3C 00 00 00
00 00 3C 00
00 3C 00 00
00 3C 00 3F UTF-16BE, big-endian ISO-10646-UCS-2, 16- big-endian ASCII, ASCII ( , , ...)
3C 00 3F 00 UTF-16LE, little-endian ISO-10646-UCS-2, 16- little-endian ASCII, ASCII ( , , ...)
3C 3F 78 6D UTF-8, ISO 646, ASCII, ISO 8859, Shift-JIS, EUC - 7-, 8- , , ASCII , ; , , , , ASCII,
4C 6F A7 94 EBCDIC ( ; , , )
Other\ UTF-8 , ( ), , -

:

, , 4.3.3, , , , , , . , , , .

, XML , (, UTF-8 8859 8859 , EBCDIC, ..).

ASCII ( ), , , . , XML , . , UTF-7, ASCII- , .

, , , .

, XML , - . , .


F.2

- XML , . , , XML. , , [IETF RFC 2376] ( ), text/xml application/xml MIME- .
, , :

  • XML , Byte-Order Mark ( ) .


G W3C XML Working Group ()

W3C XML Working Group (WG)/ . WG , WG .
 

XML WG:


H W3C XML Core Group ()

W3C XML Core Working Group (WG). WG, , :


I ()

XMLspec DTD ( ). HTML XSLT xmlspec.xsl, diffspec.xsl REC-xml-2e.xsl. PDF- html2ps distiller-.

!