XML 네임 스페이스

wwiki
Jhkim (토론 | 기여)님의 2021년 7월 27일 (화) 00:39 판 (XML 1.0 네임 스페이스 (제 3 판) XML 1.1 네임 스페이스 (제 2 판))
이동: 둘러보기, 검색

출처: https://triple-underscore.github.io/xml-names-ja.html를 구글기계 번역한 문서입니다.


XML 1.0 네임 스페이스 (제 3 판) XML 1.1 네임 스페이스 (제 2 판)

2009 년 12 월 8 일 2006 년 8 월 16 일 W3C 권고안

이 일본어 번역은 비공식적 인 문서입니다 ...(번역 업데이트 :2017-07-31 )

이 페이지W3C 에 의해 부제 날짜에서 권고로 발행 된 Namespaces in XML 1.0 (제 3 판) Namespaces in XML 1.1 (2 판) 을 일본어로 번역 한 것입니다. (공개 :2012-02-10 )

사양 메타 데이터

이 버전 (원문 URL)
https://www.w3.org/TR/xml-names/
이 버전 (1.0, 1.1) 
https://www.w3.org/TR/2009/REC-xml-names-20091208/
https://www.w3.org/TR/2006/REC-xml-names11-20060816
최신 버전 (1.0, 1.1) 
https://www.w3.org/TR/xml-names/
https://www.w3.org/TR/xml-names11
이전 버전 (1.0, 1.0, 1.1) 
https://www.w3.org/TR/2006/REC-xml-names-20060816/
https://www.w3.org/TR/2009/PER-xml-names-20090806/
https://www.w3.org/TR/2006/PER-xml-names11-20060614
편집 
Tim Bray, Textuality <tbray@textuality.com>
Dave Hollander, Contivo, Inc. <dmh@contivo.com>
Andrew Layman, Microsoft <andrewl@microsoft.com>
Richard Tobin, University of Edinburgh and Markup Technology Ltd <richard@inf.ed.ac.uk> <richard@cogsci.ed.ac.uk>
Henry S. Thompson, University of Edinburgh and W3C <ht@w3.org> - Third Edition
구현 보고서

http://www.w3.org/XML/2002/12/xml-names11-implementation.html

(버전 1.1의 알려진 구현은 모두 1.0을 지원하고있다.)
테스트 세트
https://www.w3.org/XML/Test/
메일 링리스트
xml-names-editor@w3.org
archives
정오표
https://www.w3.org/XML/2009/xml-names-errata
https://www.w3.org/XML/2006/xml-names11-errata
각 국어 번역
https://www.w3.org/2003/03/Translations/byTechnology?technology=xml-names
https://www.w3.org/2003/03/Translations/byTechnology?technology=xml-names11
비공식 형식
XML 버전
제 2 판의 차이 강조 판
제 1 판의 차이 강조 판

색인 등

제목 / / / 역주(클릭 순회) |용어 목록

©

Copyright ©  2009 W3C ® ( MIT , ERCIM , Keio ), All Rights Reserved. W3C liability , trademark and document use rules apply. [이 페이지에는 버전 1.1의 일본어 번역도 포함되어 있습니다 (기본은 숨기기). 창 하단의 컨트롤에 표시를 전환 할 수 있습니다 (1.0, 1.1 양자의 차이를 비교할 수 있습니다). ]


요약

XML 네임 스페이스는 XML 문서에서 사용하는 요소와 속성의 이름에 대해 URIIRI 참조에 의해 식별되는 네임 스페이스에 연결시키는 것으로 규정하는 간단한 방법을 제공하는.

이 문서의 상태

이 절에서는 발행 시점에서 ... [이하이 절 다른 내용은 생략한다. 이 절에 언급되어있는 링크 중 일부 (구현 보고서 등)는 시작 부분의 "사양 메타 데이터"에 가세하고있다. ]

1. 동기 및 요약

XML (Extensible Markup Language)의 응용으로 단일 XML 문서가 여러 "마크 업 어휘"를 포함하고 있고, 그 각각을 이루는 요소 속성] 군은 각각 다른 소프트웨어 모듈 [용으로 정의 된 다 /에서 이용되는 '것으로 예상된다. 이것을 가정 동기 중 하나는 모듈 방식이다. 이러한 마크 업 어휘가 존재하며 제대로 이해되고 있고, 따라서 유용한 소프트웨어가 가용하다면, 마크 업을 재발견하는 것보다이 태그를 재사용하는 것이 좋다. We envision applications of Extensible Markup Language (XML) where a single XML document may contain elements and attributes (here referred to as a "markup vocabulary") that are defined for and used by multiple software modules. One motivation for this is modularity: if such a markup vocabulary exists which is well-understood and for which there is useful software available, it is better to re-use this markup rather than re-invent it.

문서가 여러 마크 업 어휘를 포함하고있는 것 같은 경우 어휘의 인식과 충돌이 문제가된다. 소프트웨어 모듈은 그 처리 대상으로 설계된 요소와 속성을 그 이름이 어떤 다른 소프트웨어 패키지의 마크 업에 사용되는 요소와 속성의 이름과 "충돌"에 접한 경우에도 인식 할 필요가있다. Such documents, containing multiple markup vocabularies, pose problems of recognition and collision. Software modules need to be able to recognize the elements and attributes which they are designed to process, even in the face of "collisions" occurring when markup intended for some other software package uses the same element name or attribute name.

이를 고려할 때, 문서의 구성 자에게 부여되는 이름은 다른 마크 업 어휘에 속하는 이름끼리의 충돌을 피하도록 구축하는 것이 요구된다. 이 사양은 XML 네임 스페이스 라고하는 장치를 말한다 - 그것은 요소와 속성에 열기 이름 을あてがう하여 이것을 달성. These considerations require that document constructs should have names constructed so as to avoid clashes between names from different markup vocabularies. This specification describes a mechanism, XML namespaces, which accomplishes this by assigning expanded names to elements and attributes.

1.1. 표기와 용법에 대한주의

[이 절의 다른 내용 ([RFC2119] 관련)은 생략한다. ] Where EMPHASIZED, the key words MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, MAY in this document are to be interpreted as described in [Keywords].

이 사양의 생성 규칙의 비 종단 기호의 대부분은 여기가 아니라 XML 사양 [XML] 에서 정의되는 것에주의. 여기에 정의 된 비 종단 기호가 XML 사양의 비 종단 기호와 이름이 같은 경우 모든 사례에서 전자와 일치하는 문자열의 집합은 후자에 부합하는 문자열의 집합의 부분 집합이된다. Note that many of the nonterminals in the productions in this specification are defined not here but in the XML specification [XML]. When nonterminals defined here have the same names as nonterminals defined in the XML specification, the productions here in all cases match a subset of the strings matched by the corresponding ones there.

이 사양에 적합한 문서는이 문서의 각 생성 규칙에 부여되는 "네임 스페이스 구속"(Namespace Constraint)에 따라야한다. In this document's productions, the NSC is a "Namespace Constraint", one of the rules that documents conforming to this specification MUST follow.


2. XML 네임 스페이스

2.1. 기본 개념

정의 : XML 네임 스페이스 는 URIIRI 참조 [RFC3986][RFC3987] 에 의해 확인된다. 요소 이름 / 속성 이름이 사양에 언급 구조를 이용하여 한 XML 네임 스페이스 에 속해있다.

[Definition: An XML namespace is identified by a URI reference [RFC3986] an IRI reference [RFC3987] ; element and attribute names may be placed in an XML namespace using the mechanisms described in this specification. ]

정의 : 열기 이름 은 ( 이름 공간 명 , 국소 이름 )의 쌍이다. [Definition: An expanded name is a pair consisting of a namespace name and a local name. ]\

정의 : 주어진 이름 이름 의 네임 스페이스 는 이름 이 URI S 로 식별되는 이름 공간에 속하는한다면, S 이다. 이름 이름 이 어떤 이름 공간에 속하지 않는다면 해당 네임 스페이스 이름의 값은 아니다. IRI [Definition: For a name N in a namespace identified by a ~IURI I, the namespace name is I. For a name N that is not in a namespace, the namespace name has no value. ]\

정의 : 하나의 사례에서도 국소 이름 은 이름 이된다. [Definition: In either case the local name is N. ]\

[통일적으로 관리되는 URIIRI 로 네임 스페이스 어휘 국소 이름 ] 조합하면 이름 충돌은 피할 수있게된다. It is this combination of the universally managed ~IURI namespace with the vocabulary's local names that is effective in avoiding name clashes.

URIIRI 참조는 이름에 허용되지 않는 문자를 포함 할 수있다 위에 길고 불편하기 때문에 열기 이름 이 XML 문서의 요소와 속성의 이름에 직접 이용되는 것은 아니다. 대신 유 정규화 된 이름 이 사용된다. ~IURI references can contain characters not allowed in names, and are often inconveniently long, so expanded names are not used directly to name elements and attributes in XML documents. Instead qualified names are used.\

정의 : 유 정규화 된 이름 은 네임 스페이스 해석의 대상이되는 이름이다. [Definition: A qualified name is a name subject to namespace interpretation. ]\

이 사양에 맞는 문서에서는 요소 이름 / 속성 이름은 유 수식 명 으로 출현한다. 구문으로, 그들은 접두사가 이름 ( PrefixedName) 또는 접두사없는 이름 ( UnprefixedName) 중 하나이며, 접두사를 네임 스페이스에 속박하는 및 접두사없이 요소 이름을 기본 이름 공간에 속박하는 특성에 따른 선언 구문이 제공되고있다. 이 선언의 시야 (범위)는 문서의 각 부분에 다른 속박을 적용 할 수 있도록하기 위해, 그것이 출현하는 요소 아래 (요소 자신과 그 내용)에 한정된다. 이 사양에 적합한 처리 장치는 이러한 선언과 접두어를 인식하고 올바르게 작동해야한다. In documents conforming to this specification, element and attribute names appear as qualified names. Syntactically, they are either prefixed names or unprefixed names. An attribute-based declaration syntax is provided to bind prefixes to namespace names and to bind a default namespace that applies to unprefixed element names; these declarations are scoped by the elements on which they appear so that different bindings may apply in different parts of a document. Processors conforming to this specification MUST recognize and act on these declarations and prefixes.


2.2 네임 스페이스 이름으로 URIIRI 의 사용

빈 문자열은 URIIRI 참조로 합법적 이어도 네임 스페이스 이름으로 사용할 수 없다. The empty string, though it is a legal URI reference, cannot be used as a namespace name.

네임 스페이스 선언에서 상대 URIIRI 참조의 사용은 동일한 문서에 대한 참조를 포함하여 비추천되었다. The use of relative ~IURI references, including same-document references, in namespace declarations is deprecated.

참고 : 이것은 W3C XML Plenary Ballot [Relative-URI-deprecation] 에 의해 결정되었다. 거기는 “DOM, XPath 등의 후 사양에서도 이에 대한 해석은 정의하지 않는다고하는” 것도 선언되었다. Note: This deprecation of relative URI references was decided on by a W3C XML Plenary Ballot [Relative URI deprecation]. It also declares that "later specifications such as DOM, XPath, etc. will define no interpretation for them".


2.3 URIIRI 참조 비교법

네임 스페이스를 식별하는 URIIRI 참조가있는 이름이 주어진 네임 스페이스에 속하는지 여부와 2 개의 이름이 동일한 네임 스페이스에 속하는지 여부를 결정하는 비교된다. ~IURI references identifying namespaces are compared when determining whether a name belongs to a given namespace, and whether two names belong to the same namespace.\

정의 : 두 URIIRI 문자열로 취급하며, 문자열로 일치 할 때, 즉 같은 문자 순서 일 때, 그 때에 한하여 서로 일치 한다고한다. [Definition: The two ~IURI s are treated as strings, and they are identical if and only if the strings are identical, that is, if they are the same sequence of characters. ]\

비교에서는 문자 대소를 구분 % - 탈출하거나 그 반대로 되돌릴 수는 없다. The comparison is case-sensitive, and no %-escaping is done or undone.

따라서 2 개의 URIIRI 참조가 서로 일치 하지 않아도 동일한 자원에 해결 될 수있다. 예를 들어, 문자 대소 나 % - 탈출의 유무에서만 차이하는 URIIRI 참조 또는 [기저 URI가 다른 외부 실체]의 URIIRI 참조 (가 상대 URIIRI 참조 네임 스페이스 이름으로 비추천 된 것 주의). A consequence of this is that URI references which are not identical in this sense may resolve to the same resource. Examples include URI references which differ only in case or %-escaping, or which are in external entities which have different base URIs (but note that relative URIs are deprecated as namespace names).

이름 공간 선언의 URIIRI 참조는 속성의 정규화 된 값 이며, XML 문자와 엔터티 참조 대체 어떻게 비교보다 먼저 진행된다. In a namespace declaration, the ~IURI reference is the normalized value of the attribute, so replacement of XML character and entity references has already been done before any comparison.

다음의 URIIRI 참조는 문자 대소가 상이한 때문에 네임 스페이스를 식별하는 데 있어서는 모든 서로 다른 : The ~IURI references below are all different for the purposes of identifying namespaces, since they differ in case:

다음 URIIRI 참조도 네임 스페이스를 식별하는 데 있어서는 모든 서로 다른 : The ~IURI references below are also all different for the purposes of identifying namespaces:

次も同様である: As are these:

実体 "eacute" が "é" として定義されているならば,次の開始タグはすべて、接頭辞 "p" を同じ URIIRI 参照 "http://example.org/rosé" に束縛する名前空間宣言を包含する。 If the entity eacute has been defined to be é, the start tags below all contain namespace declarations binding the prefix p to the same IRI reference, http://example.org/rosé.

참조의 해결 후에 등가가 될 URIIRI 에 의한 혼동 위험이 있으므로, 네임 스페이스에서는 % - 이스케이프 된 문자는 사용하지 않는 것이 강력히 권장된다. Because of the risk of confusion between ~IURI s; that would be equivalent if dereferenced, the use of %-escaped characters in namespace names is strongly discouraged.


3. 네임 스페이스 선언

정의 : 이름 공간 (더 정확하게는 네임 스페이스 속박) 예약 된 속성의 부족을 이용하여 선언 된다. 이러한 속성 이름은 " xmlns"과 일치하거나 " xmlns:"부터 시작해야한다. 이러한 특성은 다른 XML 속성뿐만 아니라 직접 또는 기본 의해供せる/ 공급 될 수있다. [Definition: A namespace (or more precisely, a namespace binding) is declared using a family of reserved attributes. Such an attribute's name must either be xmlns or begin xmlns:. These attributes, like any other XML attributes, may be provided directly or by default. ]

이름 공간 선언의 속성 이름 : Attribute Names for Namespace Declaration

[1] NSAttName
PrefixedAttName | DefaultAttName
[2] PrefixedAttName
'xmlns :' NCName
네임 스페이스 구속 : [예약 접두사와 네임 스페이스 이름 [NSC: Reserved Prefixes and Namespace Names]
[3] DefaultAttName
'xmlns'
[4] NCName
Name- ( Char* ':' Char*)
NCNameStartChar NCNameChar*
( " :"비 XML ) Name Name/* An XML Name, minus the ":" */
[5] NCNameChar
NameChar - ':'
【 1.0 過去版の [5][6] は F 節に移動 】
[6] NCNameStartChar
NameStartChar - ':'

속성의 정규화 된 값 은 네임 스페이스를 식별하는 네임 스페이스 로의 URIIRI 참조이거나 또는 빈 문자열이어야한다. 네임 스페이스 이름은 그것이 의도하는 목적을 감안하여 고유하고 지속적으로 관리해야한다. 존재하는 스키마 검색 취득에 직접적으로 사용할 수있는 것이 목표가 아니다. 이러한 목표를 염두에두고 설계 된 예로는 Uniform Resource Names [RFC2141] 가있다. 그러나 보통의 URL은 그런 방법으로 관리하고, 같은 목표를 얻을 수는 주 둔다. The attribute's normalized value MUST be either a ~IURI reference — the namespace name identifying the namespace — or an empty string. The namespace name, to serve its intended purpose, SHOULD have the characteristics of uniqueness and persistence. It is not a goal that it be directly usable for retrieval of a schema (if any exists). Uniform Resource Names [RFC2141] is an example of a syntax that is designed with these goals in mind. However, it should be noted that ordinary URLs can be managed in such a way as to achieve these same goals.

정의 : 속성 이름 PrefixedAttName과 일치한다면 그 NCName가 이름 공간 접두사 를주고 그 속성 값의 네임 스페이스 이름 이 그 선언이 부여 된 요소의 시야에서 네임 스페이스 이름과 요소 이름 / 속성 이름과 연결에 이용된다. [Definition: If the attribute name matches PrefixedAttName, then the NCName gives the namespace prefix, used to associate element and attribute names with the namespace name in the attribute value in the scope of the element to which the declaration is attached. ]

정의 : 속성 이름 DefaultAttName과 일치한다면, 그 속성 값의 네임 스페이스 이름 이 그 선언이 부여 된 요소의 시야에서 기본 네임 스페이스 된다. [Definition: If the attribute name matches DefaultAttName, then the namespace name in the attribute value is that of the default namespace in the scope of the element to which the declaration is attached.]\

기본 네임 스페이스 및 선언 덮어 법은 요소 / 속성에 대한 네임 스페이스 관련 법률 절에 논의된다. Default namespaces and overriding of declarations are discussed in 6 Applying Namespaces to Elements and Attributes.

다음 예제에서는 네임 스페이스 접두사 " edi"네임 스페이스 이름 " http://ecommerce.example.org/schema"에 연결하는 네임 스페이스 선언이다 : An example namespace declaration, which associates the namespace prefix edi with the namespace name http://ecommerce.example.org/schema:

<x xmlns : edi = 'http : //ecommerce.example.org/schema'>
  <! - 
접두사 " edi"는 " x"요소와 그 내용에서
" http://ecommerce.example.org/schema"에 속박되는
the "edi" prefix is bound to http://ecommerce.example.org/schema for the "x" element and contents ->
</ x>
네임 스페이스 구속 
[예약 접두사와 네임 스페이스 이름 Namespace constraint: Reserved Prefixes and Namespace Names
접두사 xml는 정의하여 네임 스페이스 이름 " http://www.w3.org/XML/1998/namespace"에 속박된다. 이 네임 스페이스는 : The prefix xml is by definition bound to the namespace name http://www.w3.org/XML/1998/namespace.\
  • 선언도 좋지만, 할 필요는 없다. It MAY, but need not, be declared, and MUST NOT be\
  • 未宣言にされてはならない undeclared or\
  • 다른 어떠한 네임 스페이스에도 속박되지 않아야한다. bound to any other namespace name.\
  • 다른 접두사가이 네임 스페이스에 구애되어서는 안된다. Other prefixes MUST NOT be bound to this namespace name, and\
  • 기본 네임 스페이스로 선언되고는한다. it MUST NOT be declared as the default namespace.
접두사 xmlns는 네임 스페이스 속박의 선언에만 이용되고 정의는 네임 스페이스 이름 " http://www.w3.org/2000/xmlns/"에 속박된다. 이 네임 스페이스는 : The prefix xmlns is used only to declare namespace bindings and is by definition bound to the namespace name http://www.w3.org/2000/xmlns/.
  • 선언되지 않아야한다. It MUST NOT be declared\
  • 未宣言にされてはならない。 or undeclared\
  • 다른 접두사가이 이름 공간에 구애되어서는 안된다. . Other prefixes MUST NOT be bound to this namespace name, and\
  • 기본 네임 스페이스로 선언되고는한다. it MUST NOT be declared as the default namespace.\
  • 요소 이름은 접두사 " xmlns"이 안된다. Element names MUST NOT have the prefix xmlns.
문자 대소를 구분하지 않고 아래로 머리가 " xml"에 일치하는 것 같은 다른 모든 접두사도 예약이다. 따라서 : All other prefixes beginning with the three-letter sequence x, m, l, in any case combination, are reserved. This means that:
  • 이용자는 다음의 사양에서 정의 된 경우를 제외하고 그들을 이용해야 아니다. users SHOULD NOT use them except as defined by later specifications
  • 처리기는 그들을 치명적인 오류로 취급해서는 안된다. processors MUST NOT treat them as fatal errors.

접두사가 예약되지 않은해도 문자 대소를 구분하지 않고 아래로 LocalPart머리를 " xml"에 일치하는 이름의 사용은 접두사없이 사용 된 경우 예약이되어 버리므로 권유 없다. Though they are not themselves reserved, it is inadvisable to use prefixed names whose LocalPart begins with the letters x, m, l, in any case combination, as these names would be reserved if used without a prefix.


4. 유 수식 명

이 사양에 적합한 XML 문서에서는 일부의 이름 (비 종단 기호 에 해당하는 구문을 이용)은 다음에 정의되는 유 수식 명 으로 주어져야한다 : Name Name[1]In XML documents conforming to this specification, some names (constructs corresponding to the nonterminal Name) MUST be given as qualified names, defined as follows:Qualified Name

[7] QName
PrefixedName | UnprefixedName
[8] PrefixedName
Prefix ':' LocalPart
[9] UnprefixedName
LocalPart
[10] Prefix
NCName
[11] LocalPart
NCName

접두사 ( Prefix)는 유 수식 명 을 이루는 네임 스페이스 접두사 를 제공하는 - 그것은 네임 스페이스 선언 안의 이름 공간 URIIRI 참조에 연결되어야한다. The Prefix provides the namespace prefix part of the qualified name, and MUST be associated with a namespace ~IURI reference in a namespace declaration.\

정의 : LocalPart유 수식 명 을 이루는 국소 부위 의 제공. [Definition: The LocalPart provides the local part of the qualified name.]

접두사는 네임 스페이스 이름의 자리 표시 자로 기능하는 것에주의. 응용 시야가 포함하고있는 문서를 초과하는 이름을 만들 때는 접두사가 아닌 네임 스페이스를 이용해야한다. Note that the prefix functions only as a placeholder for a namespace name. Applications SHOULD use the namespace name, not the prefix, in constructing names whose scope extends beyond the containing document.


5. 유 수식 명 이용

이 사양에 적합한 XML 문서에서 요소의 이름은 다음과 같이 유 수식 명 으로 주어진다 : In XML documents conforming to this specification, element names are given as qualified names, as follows:Element Names

[12] STag
'<' QName( ) * ? '>'S AttributeAttributeS
네임 스페이스 구속 : [접두사는 선언 됨 [NSC: Prefix Declared]
[13] ETag
'</' ? '>'QName S
네임 스페이스 구속 : [접두사는 선언 됨 [NSC: Prefix Declared]
[14] EmptyElemTag
'<' QName( ) * ? '/>'S AttributeAttributeS
네임 스페이스 구속 : [접두사는 선언 됨 [NSC: Prefix Declared]

요소 이름 역할을하는 유 된 이름 의 예 : An example of a qualified name serving as an element name:

  <! - 요소가 속하는 네임 스페이스 " "가된다.
->
pricehttp://ecommerce.example.org/schemathe 'price' element's namespace is http://ecommerce.example.org/schema
  <edi : price xmlns : edi = 'http : //ecommerce.example.org/schema'
             units = 'Euro'> 32.18 </ edi : price>

속성은 이름 공간 선언 되거나 또는 유 수식 명 으로 이름이 주어진다 : Attributes are either namespace declarations or their names are given as qualified names:Attribute

[15] Attribute
NSAttName Eq AttValue | QName Eq AttValue
네임 스페이스 구속 : [접두사는 선언 됨 [NSC: Prefix Declared]
네임 스페이스 구속 : [접두사를 선언되지 않은하는 것은 없다] [NSC: No Prefix Undeclaring]
네임 스페이스 구속 : [속성은 고유] [NSC: Attributes Unique]

속성 이름 역할을하는 유 된 이름 의 예 : An example of a qualified name serving as an attribute name:

<x xmlns : edi = 'http : //ecommerce.example.org/schema'>
  <! - 속성이 속한 네임 스페이스
taxClass
" http://ecommerce.example.org/schema"된다
the 'taxClass' attribute's namespace is http://ecommerce.example.org/schema ->
  <lineItem edi : taxClass = "exempt"> Baby food </ lineItem>
</ x>
네임 스페이스 구속 
[접두사는 선언 됨 Namespace constraint: Prefix Declared
" xml"또는 " xmlns"이외의 이름 공간 접두사는, 그 접두사가 사용되는 요소의 시작 태그 또는 그 상위 요소 (즉, 접두사에 의한 마크 업이 그 내용 에 출현하는 요소) ]에서 이름 공간 선언 속성은 선언되어 있어야한다. The namespace prefix, unless it is xml or xmlns, MUST have been declared in a namespace declaration attribute in either the start-tag of the element where the prefix is used or in an ancestor element (i.e., an element in whose content the prefixed markup occurs).\
更に、そのような宣言のうち最も内側にあるものの属性値は,空文字列であってはならない。 Furthermore, the attribute value in the innermost such declaration MUST NOT be an empty string
네임 스페이스 구속 
[접두사를 선언되지 않은하는 것은 없다] Namespace constraint: No Prefix Undeclaring
접두사 ( Prefix)을 선언 네임 스페이스 선언 에서는 (즉 NSAttNamePrefixedAttName되어있는 곳에서는), 속성 값 ( AttValue)은 비어 있으면 안된다. In a namespace declaration for a prefix (i.e., where the NSAttName is a PrefixedAttName), the attribute value MUST NOT be empty.

이 구속에 의해 : 이름 공간 선언 속성이 XML 문서 엔티티 에 직접하지 않고, 외부 실체 선언 된 기본 속성을 통해 제공되고있는 곳에서는 연산의 어려움에 인도있다. 그러한 선언은 검증하지 않는 XML 처리기에 기반 소프트웨어에서 읽지 못할 수도있다. 많은 XML 응용은 아마도 네임 스페이스를 구별하는 것도 포함 [네임 스페이스] 검증의 처리 장치를 요구하지 않습니다. 이러한 응용에서 올바른 연산이 요구되는 경우 네임 스페이스 선언은 직접 공급되거나 또는 내부 부분 집합의 DTD 에서 선언 된 기본 속성을 통해 공급되어야한다. This constraint may lead to operational difficulties in the case where the namespace declaration attribute is provided, not directly in the XML document entity, but via a default attribute declared in an external entity. Such declarations may not be read by software which is based on a non-validating XML processor. Many XML applications, presumably including namespace-sensitive ones, fail to require validating processors. If correct operation with such applications is required, namespace declarations MUST be provided either directly or via default attributes declared in the internal subset of the DTD.

요소 이름이나 속성 이름은 DTD 안의 선언에 출현하는 경우에는 유 수식 명 으로도 주어진다 : Element names and attribute names are also given as qualified names when they appear in declarations in the DTD:Qualified Names in Declarations

[16] doctypedecl
'<! DOCTYPE' ( )? ? ( '['( | | ) * ' ?)?>'S QNameS ExternalIDSmarkupdeclPEReferenceSS
[17] elementdecl
'<! ELEMENT' ? '>'S QName S contentspec S
[18] cp
( QName| choice| seq) ( '?'| '*'| '+')?
[19] Mixed
'(' S? '#PCDATA'( S? '|' S? QName) * S? ') *'| '(' S? '#PCDATA' S? ')'
[20] AttlistDecl
'<! ATTLIST' * ? '>'S QName AttDefS
[21] AttDef
S( QName| NSAttName)S AttType S DefaultDecl

DTD의 유효성 검사는 다음과 같은 의미에서 이름 공간을 인식하지 못하는 것임을주의 : DTD는 문서에 나타나도 좋은 요소 나 속성을 (이름 공간 명, 국소 이름 )의 쌍으로는 없이 그 이름을 해석하지 않고 구속한다. 네임 스페이스를 사용하는 문서를 DTD를 맞대고 검증 할 때 각 인스턴스에 사용되는 접두사와 동일한 접두사가 DTD에서 사용되어야한다. 그러나 DTD는 이름 공간 선언 속성에 대해 " #FIXED"값을 제공하는 것으로, 유효한 문서에 사용 된 네임 스페이스를 간접적으로 구속 할 수있다. Note that DTD-based validation is not namespace-aware in the following sense: a DTD constrains the elements and attributes that may appear in a document by their uninterpreted names, not by (namespace name, local name) pairs. To validate a document that uses namespaces against a DTD, the same prefixes must be used in the DTD as in the instance. A DTD may however indirectly constrain the namespaces used in a valid document by providing #FIXED values for attributes that declare namespaces.


6. 요소 / 속성에 대한 네임 스페이스 관련 법률

6.1 네임 스페이스 시각

접두사를 선언 네임 스페이스 선언의 시각은 그것이 출현하는 시작 태그에서 끝 태그까지의 범위에서 더 내연 있으며, NSAttName부가 동일하게 같은 모든 [접두사를 선언 네임 스페이스 선언의 시야를 제외한 범위가된다. 빈 태그 사례의 시각은 그 태그 자신된다. The scope of a namespace declaration declaring a prefix extends from the beginning of the start-tag in which it appears to the end of the corresponding end-tag, excluding the scope of any inner declarations with the same NSAttName part. In the case of an empty tag, the scope is the tag itself.

이러한 네임 스페이스 선언은 그 시야에 들어하고 그 선언에 지정된 접두사에 일치하는 접두사를 가지는 같은 모든 요소 이름 / 속성 이름에 적용된다. Such a namespace declaration applies to all element and attribute names within its scope whose prefix matches that specified in the declaration.

접두사가 요소 이름 / 속성 이름에 해당하는 열기 이름 은 해당 접두어 ( Prefix)을 속박하는 URIIRI네임 스페이스 에 있고 그 국소 부위 ( LocalPart)을 국소 이름 을 가진다. The expanded name corresponding to a prefixed element or attribute name has the ~IURI to which the prefix is bound as its namespace name, and the local part as its local name.

<? xml version = " 1.01.1 "?>

<html : html xmlns : html = 'http : //www.w3.org/1999/xhtml'>

  <html : head> <html : title> Frobnostication </ html : title> </ html : head>
  <html : body> <html : p> Moved to 
    <html : a href = 'http : //frob.example.com'> here. </ html : a> </ html : p> </ html : body>
</ html : html>

다음의 예와 같이 단일 요소에 여러 네임 스페이스 접두사를 속성으로 선언 할 수있다 : Multiple namespace prefixes can be declared as attributes of a single element, as shown in this example:

<? xml version = " 1.01.1 "?>
<! - 
" bk" " isbn"두 네임 스페이스 접두사도 가용성된다
both namespace prefixes are available throughout ->
<bk : book xmlns : bk = 'urn : loc.gov : books'
         xmlns : isbn = 'urn : ISBN : 0-395-36341-6'>
    <bk : title> Cheaper by the Dozen </ bk : title>
    <isbn : number> 1568491379 </ isbn : number>
</ bk : book>

接頭辞を宣言する名前空間宣言の属性値は、空であってもよい。 これには、その宣言の視野において,その接頭辞と名前空間名との結び付けを除去する効果がある。 更なる宣言により,接頭辞を再宣言してもよい: The attribute value in a namespace declaration for a prefix MAY be empty. This has the effect, within the scope of the declaration, of removing any association of the prefix with a namespace name. Further declarations MAY re-declare the prefix again:

<?xml version="1.1"?>
<x xmlns:n1="http://www.w3.org">
    <n1:a/>           <!-- 
合法: 接頭辞 n1 は "http://www.w3.org" に束縛されている
legal; the prefix n1 is bound to http://www.w3.org -->
    <x xmlns:n1="">
        <n1:a/>       <!-- 
違法: 接頭辞 n1 はここでは束縛されていない
illegal; the prefix n1 is not bound here -->
    <x xmlns:n1="http://www.w3.org">
            <n1:a/>   <!-- 
合法: 接頭辞 n1 は再び束縛されている
legal; the prefix n1 is bound again -->
        </x>
    </x>
</x>

6.2 기본 네임 스페이스의 적용 방법

기본 네임 스페이스 선언의 시야는 더 내연의 기본 네임 스페이스 선언의 시야를 제외하고 그것이 출현하는 시작 태그에서 끝 태그까지 걸쳐있다. 빈 태그 사례의 시각은 그 태그 자신된다. The scope of a default namespace declaration extends from the beginning of the start-tag in which it appears to the end of the corresponding end-tag, excluding the scope of any inner default namespace declarations. In the case of an empty tag, the scope is the tag itself.

기본 네임 스페이스 선언은 그 시야에 들어가는 접두사없이 요소 이름에 적용된다. 기본 네임 스페이스 선언은 속성 이름에 직접 적용되지 않는다. 접두사가없는 특성의 해석은 그것이 출현하는 요소로 결정된다. A default namespace declaration applies to all unprefixed element names within its scope. Default namespace declarations do not apply directly to attribute names; the interpretation of unprefixed attributes is determined by the element on which they appear.

접두사없는 요소가있는 기본 네임 스페이스 선언의 시야에 들어가는 경우, 그 요소에 대응하는 열기 이름 은 그 기본 네임 스페이스URIIRI네임 스페이스 에있는. 시야에 기본 네임 스페이스 선언이 없으면, 네임 스페이스는 값을 가지지 않는다. 접두사없는 속성 이름의 네임 스페이스 이름은 항상 값을 가지지 않는다. 어떤 사례에서도 국소 이름국소 부위 ( LocalPart)가된다 (물론 이것은 접두사없는 이름 자신과 동일). If there is a default namespace declaration in scope, the expanded name corresponding to an unprefixed element name has the ~IURI of the default namespace as its namespace name. If there is no default namespace declaration in scope, the namespace name has no value. The namespace name for an unprefixed attribute name always has no value. In all cases, the local name is local part (which is of course the same as the unprefixed name itself).

<? xml version = " 1.01.1 "?>
<! - 
이 사례에서는 요소는 기본에서 HTML 네임 스페이스에 속하는
elements are in the HTML namespace, in this case by default ->
<html xmlns = 'http : //www.w3.org/1999/xhtml'>
  <head> <title> Frobnostication </ title> </ head>
  <body> <p> Moved to 
    <a href='http://frob.example.com'> here </a>. </ p> </ body>
</ html>
<? xml version = " 1.01.1 "?>
<! - 
접두사없이 요소 형은 " urn:loc.gov:books"에 속하는
unprefixed element types are from "books" ->
<book xmlns = 'urn : loc.gov : books'
      xmlns : isbn = 'urn : ISBN : 0-395-36341-6'>
    <title> Cheaper by the Dozen </ title>
    <isbn : number> 1568491379 </ isbn : number>
</ book>

네임 스페이스의 시야를 あてがう 약간 큰 예 : A larger example of namespace scoping:

<? xml version = " 1.01.1 "?>
<! - 
초기시에 기본 네임 스페이스는 " urn:loc.gov:books"
initially, the default namespace is "books" ->
<book xmlns = 'urn : loc.gov : books'
      xmlns : isbn = 'urn : ISBN : 0-395-36341-6'>
    <title> Cheaper by the Dozen </ title>
    <isbn : number> 1568491379 </ isbn : number>
    <notes>
      <! - 
뭔가 설명에 HTML을 기본 이름 공간으로
make HTML the default namespace for some commentary ->
      <p xmlns = 'http : //www.w3.org/1999/xhtml'>
          This is a <i> funny </ i> book!
      </ p>
    </ notes>
</ book>

기본 네임 스페이스 선언의 특성 값은 비어되고있다. 그 효과는 선언의 시각에는 기본 네임 스페이스는 없다]와 같게된다. The attribute value in a default namespace declaration MAY be empty. This has the same effect, within the scope of the declaration, of there being no default namespace.

<? xml version = ' 1.01.1 '?>
<Beers>
  <! - 안쪽의 기본 네임 스페이스는 HTML 이름 공간
 ->
tablethe default namespace inside tables is that of HTML
  <table xmlns = ' http://www.w3.org/1999/xhtml '>
   <th> <td> Name </ td> <td> Origin </ td> <td> Description </ td> </ th>
   <tr> 
     <! - cell의 안쪽에는 기본 네임 스페이스는 없다
 ->
tableno default namespace inside table cells
     <td> <brandName xmlns = ""> Huntsman </ brandName> </ td>
     <td> <origin xmlns = ""> Bath, UK </ origin> </ td>
     <td>
       <details xmlns = ""> <class> Bitter </ class> <hop> Fuggles </ hop>
         <pro> Wonderful hop, light alcohol, good summer beer </ pro>
         <con> Fragile; excessive variance pub to pub </ con>
         </ details>
        </ td>
      </ tr>
    </ table>
  </ Beers>

6.3 속성 고유성

네임 스페이스 구속 : [속성은 고유] Namespace constraint: Attributes Unique

이 사양에 적합한 XML 문서에서 어떤 태그도 다음 중 하나를 만족하는 복수의 속성을 포함하고는한다 : In XML documents conforming to this specification, no tag may contain two attributes which:

이 구속은 어떤 요소에서도 열기 이름 이 동일하게 2 개의 속성은없는 것을 요구하는 것과 동일하다. This constraint is equivalent to requiring that no element have two attributes with the same expanded name.

예를 들어 다음의 빈 요소 태그 " bad"는 모두 불법된다 : For example, each of the bad empty-element tags is illegal in the following:

<! - 
n1과 n2는 모두 http://www.w3.org에 속박되는
http://www.w3.org is bound to n1 and n2 ->
<x xmlns : n1 = "http://www.w3.org" 
   xmlns : n2 = "http://www.w3.org">
  <bad a = "1"a = "2"/>
  <bad n1 : a = "1"n2 : a = "2"/>
</ x>

그러나 다음의 것은 모두 합법적된다. 두 번째 것은 속성 이름은 기본 네임 스페이스에는 적용되지 않기 때문에 합법적된다 : However, each of the following is legal, the second because the default namespace does not apply to attribute names:

<! - 
n1은 기본 네임 스페이스 http://www.w3.org에 속박되는
http://www.w3.org is bound to n1 and is the default ->
<x xmlns : n1 = "http://www.w3.org" 
   xmlns = "http://www.w3.org">
  <good a = "1"b = "2"/>
  <good a = "1"n1 : a = "2"/>
</ x>

7. 문서의 적합성

이 사양은 XMLXML 1.1 문서에 적용된다. 이 사양을 준수하기 위해서는 문서는 XMLXML 1.1 사양 [XML][XML11] 에 의거 정형식해야한다. This specification applies to ~XML1011 documents. To conform to this specification, a document MUST be well-formed according to the ~XML1011 specification [~XML1011].

이 사양에 적합한 XML 문서에서 요소 이름 / 속성 이름 QName생성 규칙에 부합 돈까스 "네임 스페이스 구속"을 충족하여야한다. XMLXML 1.1 정형식이기 때문에 XML 생성 규칙 에 일치하는 것이 요구되는 문서의 다른 (요소 / 속성 이름이 아닌) 모든 토큰이 사양의 생성 규칙 에 따라야한다 . Name NameNCNameIn XML documents which conform to this specification, element and attribute names MUST match the production for QName and MUST satisfy the "Namespace Constraints".All other tokens in the document which are REQUIRED, for ~XML1011 well-formedness, to match the XML production for Name MUST match this specification's production for NCName.

정의 :이 사양에 적합한 문서는 이름 공간 정형식 인 것으로 알려졌다. [Definition: A document is namespace-well-formed if it conforms to this specification. ]

따라서, 이름 공간 정형식 인 문서에서는 : It follows that in a namespace-well-formed document:

  • 요소 이름 / 속성 이름은 0 개 또는 1 개의 콜론 ( " :")를 포함한다. All element and attribute names contain either zero or one colon;
  • [실체 이름 / 처리 명령 대상 / 기법 이름은 콜론을 포함하지 않는다. No entity names, processing instruction targets, or notation names contain any colons.

또한, 이름 공간 정형식 되는 문서는 네임 스페이스에서 타당 될 수있다. In addition, a namespace-well-formed document may also be namespace-valid.

정의 : 이름 공간 정형식 인 문서는 다음을 모두 충족한다면 네임 스페이스에서 타당 하다고된다 :

  • XMLXML 1.1 에 근거하여 타당하다. XMLXML 1.1 에 준거 해 정형식으로되기 위해서는 문서의 요소 / 특성의 이름은 XML 생성 규칙 에 일치하는 것이 요구된다. Name Name
  • 문서의 토큰 중 요소 / 특성 이름을 제외한 모든이 사양의 생성 규칙 NCName에 일치하고있다.

[Definition: A namespace-well-formed document is namespace-valid if it is valid according to the ~XML1011 specification, and all tokens other than element and attribute names which are REQUIRED, for ~XML1011 validity, to match the XML production for Name match this specification's production for NCName. ]

따라서, 네임 스페이스에서 타당 문서에서는 다음과 같은 형식으로 선언 된 속성은 콜론을 포함하지 :

  • ID
  • IDREF
  • IDREFS
  • ENTITY
  • ENTITIES
  • NOTATION

It follows that in a namespace-valid document:No attributes with a declared type of ID, IDREF(S), ENTITY(IES), or NOTATION contain any colons.

8. 처리 장치의 적합성

이 사양에 부합하기 위해서는 처리 장치는 이름 공간 정형식 위반을보고하여야한다. 그러나 네임 스페이스가 URI 참조 [RFC3986] 合法な IRI 인지 여부의 검사는 요구되지 않는다.

To conform to this specification, a processor MUST report violations of namespace well-formedness, with the exception that it is not REQUIRED to check that namespace names are URI references [RFC3986]legal IRIs.

정의 :이 사양에 적합한 XML 유효성 검사에 대한 처리기 중 네임 스페이스 타당성에 대한 위반을보고하는 것에 대해 네임 스페이스 검증 용 처리기 한다. [Definition: A validating XML processor that conforms to this specification is namespace-validating if in addition it reports violations of namespace validity. ]


부록

이 절의 각 하위 절은 규범이 아니다.

XML 네임 스페이스의 내부 구조

이 부록은 삭제되었다. This appendix has been deleted.


버전 1.0에서의 변경 사항

이 버전은 2009 년 6 월 20 일 정오표 [1.0-Errata] [1.0-2e-Errata] 가 통합되어있다. This version incorporates the errata as of 20 July 2009 [1.0 Errata] [1.0 2e Errata].

このバージョンには,バージョン 1.0 に対する 2002年 12月 6日の正誤表 [1.0-Errata] が組み入れられている。 加えて, 2 つの大きな変更点がある: This version incorporates the errata to version 1.0 as of 6 December 2002 [1.0 Errata]. There are two further substantive changes:

  • 接頭辞の未宣言にするための仕組みを供した。 A mechanism is provided for undeclaring prefixes;
  • 名前空間名は URI ではなく,IRI にした。 Namespace names are IRIs, rather than URIs.

더 일관성을 위해 몇 가지 어법의 변경이나 추가를 포함 편집상의 변경 사항이있다. 참고 부록 "XML 네임 스페이스 내부 구조"는 삭제되었다. There are several editorial changes, including a number of terminology changes and additions intended to produce greater consistency. The non-normative appendix "The Internal Structure of XML Namespaces" has been removed.\

제 5 판을 포함하는 XML 1.0의 모든 버전과 일치하도록 BNF를 조정했다. The BNF has been adjusted to interconnect properly with all editions of XML 1.0, including the fifth edition.


バージョン 1.1 からの変更点

このバージョンにはバージョン 1.1 に対する正誤表 2006年 6月 1日 [1.1-Errata] が組み入れられている。 This version incorporates the errata to version 1.1 as of 1 June 2006 [1.1 Errata].

バージョン 1.1 の初版には、自前の IRI の定義が含められていた — まだ IRI RFC の最終バージョンが発行されてなかったので。 これは除去され, RFC への参照に置換された。 Because the final version of the IRI RFC had not yet been published, the first edition of version 1.1 included its own definition of IRIs. This has been removed, and replaced with a reference to the RFC.


감사

이 작업에는 많은 분들의 의견이 반영되어있다. 특히, W3C XML WG, Special Interest Group, W3C Metadata Activity 참가자들과 Microsoft의 Charles Frankston 씨에서 특히 귀중한 공헌에 감사한다. This work reflects input from a very large number of people, including especially the participants in the World Wide Web Consortium XML Working Group and Special Interest Group and the participants in the W3C Metadata Activity. The contributions of Charles Frankston of Microsoft were particularly valuable.


폐지 된 생성 규칙

다음 2 개의 생성 규칙이 사양의 처음과 다음 버전에 있었지만 수정판이다. 더 이상 그들이 사용되는 것은 아니지만,이 사양 날짜가없는 버전에 대한 상호 참조 용으로 유지되고있다. [이 뜻은 버전 1.0, 1.1의 중첩으로 인해 발생한 중복 id를 변경하고 있기 때문에 (변경은이 절에 한함)이 상호 참조가 작동하지 않습니다. ] The following two productions are modified versions of ones which were present in the first two editions of this specification. They are no longer used, but are retained here to satisfy cross-references to undated versions of this specification.

NCNameStartChar정의에 원래 이용 된 XML 1.0의 Letter생성 규칙은 XML 1.0 제 5 판에서 이름 정의로 올바른 것은 없게되었으므로, NCNameStartChar생성 규칙은 XML 어떤 버전에 대해서도 올바른 결과를 얻을 수 있도록하기 위해 NCName에 근거한 정의로 변경되었다. Because the Letter production of XML 1.0, originally used in the definition of NCNameStartChar, is no longer the correct basis for defining names since XML 1.0 Fifth Edition, the NCNameStartChar production has been modified to give the correct results against any edition of XML, by defining NCNameStartChar in terms of NCName.

[5] NCNameChar
NameChar - ':'
( " :"비 XML NameChar) /* An XML NameChar, minus the ":" */
[6] NCNameStartChar
NCName- ( *)Char Char Char
( NCName첫 글자) /* The first letter of an NCName */

Note : Production NCNameStartChartakes advantage of the fact that a single-character NCNameis necessarily an NCNameStartChar, and works by subtracting from the set of NCNames of all lengths the set of all strings of two or more characters, leaving only the NCNames which are one character long .


참조 문헌

참조 문헌 (규범)

[RFC2119]
RFC 2119 : Key words for use in RFCs to Indicate Requirement Levels , S. Bradner, ed. IETF (Internet Engineering Task Force), March 1997. Available at http://www.rfc-editor.org/rfc/rfc2119.txt
[RFC2141]
RFC 2141 : URN Syntax , R. Moats, ed. IETF (Internet Engineering Task Force), May 1997. Available at http://www.rfc-editor.org/rfc/rfc2141.txt.
[RFC3986]
RFC 3986 : Uniform Resource Identifier (URI) : Generic Syntax , T. Berners-Lee, R. Fielding, and L. Masinter, eds. IETF (Internet Engineering Task Force), January 2005. Available at http : //www.rfc -editor.org/rfc/rfc3986.txt
[RFC3629]
RFC 3629 : UTF-8, a transformation format of ISO 10646 , F. Yergeau, ed. IETF (Internet Engineering Task Force), November 2003. Available at http://www.rfc-editor.org/rfc/rfc3629.txt
[RFC3987]
Internationalized Resource Identifiers (IRIs), M. Duerst and M. Suignard eds. January 2005. Available at http://www.rfc-editor.org/rfc/rfc3987.txt.
[XML]
Extensible Markup Language (XML) 1.0 , Tim Bray, Jean Paoli, CM Sperberg-McQueen, Eve Maler, and François Yergeau eds. W3C (World Wide Web Consortium). Available at http://www.w3.org/TR/REC -xml /.
Extensible Markup Language (XML) 1.0 (Fourth Edition), Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, and François Yergeau eds. W3C (World Wide Web Consortium), 16 August 2006. Available at http://www.w3.org/TR/2006/REC-xml-20060816/.
[XML11]
Extensible Markup Language (XML) 1.1 (Second Edition), Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, François Yergeau, and John Cowan eds. W3C (World Wide Web Consortium), 16 August 2006. Available at http://www.w3.org/TR/2006/REC-xml11-20060816/.


참고 문헌 (참고)

[1.0-Errata]
Namespaces in XML Errata . W3C (World Wide Web Consortium). Available at http://www.w3.org/XML/xml-names-19990114-errata.
[1.0-2e-Errata]
Namespaces in XML (Second Edition) Errata . W3C (World Wide Web Consortium). Available at http://www.w3.org/XML/2006/xml-names-errata.
[1.1-Errata]
Namespaces in XML 1.1 Errata. W3C (World Wide Web Consortium). Available at http://www.w3.org/XML/2004/xml-names11-errata.
[Relative-URI-deprecation]
Results of W3C XML Plenary Ballot on relative URI References In namespace declarations 3-17 July 2000 , Dave Hollander and CM Sperberg-McQueen 6 September 2000. Available at http://www.w3.org/2000/09/xppa.
[Requirements]
Namespaces in XML 1.1 Requirements, Jonathan Marsh, ed. W3C (World Wide Web Consortium), March 2002. Available at http://www.w3.org/TR/2002/WD-xml-names11-req-20020403/.


둘러보기 메뉴