"XML 네임 스페이스"의 두 판 사이의 차이

wwiki
이동: 둘러보기, 검색
(동기 및 요약)
(XML 네임 스페이스)
(태그: 대체됨, 시각편집기)
1번째 줄: 1번째 줄:
 
+
== 개요 ==
출처: https://triple-underscore.github.io/xml-names-ja.html<nowiki/>를 구글기계 번역한 문서입니다.
+
태그나 속성에 이름의 중복으로 인한 충돌을 방지하고자 네임스페이스를(일종의 접두사) 사용한다. 충돌방지를 위한 것이므로 고유한 값을 가지는 URI를 사용한다.<syntaxhighlight lang="xml">
 
+
<tagName xlmns:prefix="URI">
 
+
</syntaxhighlight><syntaxhighlight lang="xml">
 
+
<prefix: tagName> </prefix: tagName>
<span class="NS10" title="Namespaces in XML 1.0 (Third Edition)">XML 1.0 네임 스페이스 (제 3 판)</span> <span class="NS11" title="Namespaces in XML 1.1 (Second Edition)">XML 1.1 네임 스페이스 (제 2 판)</span>
+
</syntaxhighlight><nowiki/><sup></sup><div id="MAIN0" role="main">
 
 
<span class="NS10" title="8 December 2009">2009 년 12 월 8 일</span> <span class="NS11" title="16 August 2006">2006 년 8 월 16 일</span> W3C 권고안
 
 
 
'''이 일본어 번역은 비공식적 인 문서입니다 ...'''(번역 업데이트 :2017-07-31 )
 
 
 
[https://triple-underscore.github.io/xml-names-ja.html 이 페이지] 는 [https://www.w3.org/ W3C] 에 의해 부제 날짜에서 권고로 발행 된 [https://www.w3.org/TR/2009/REC-xml-names-20091208/ Namespaces in XML 1.0 (제 3 판)] [https://www.w3.org/TR/2006/REC-xml-names11-20060816 Namespaces in XML 1.1 (2 판)] 을 일본어로 번역 한 것입니다. (공개 :2012-02-10 )
 
 
 
* [https://github.com/triple-underscore/triple-underscore.github.io/commits/master/xml-names-ja.html 업데이트 내역]
 
* '''이 번역의 정확성은 보장되지 않습니다.'''
 
* [고]로 둘러싸인 부분은 <span class="trans-note">[역자에 의한 주석]</span> 입니다.
 
* [https://triple-underscore.github.io/index.html#functions 각 페이지에 공통되는 기능] 도 참조 됐고 (왼쪽 하단의 표시 전환 버튼 등).
 
* 오역 기타 지적 / 의견은 [https://triple-underscore.github.io/about.html 연락처] 까지.
 
 
 
사양 메타 데이터
 
 
 
; 이 버전 (원문 URL)<br />      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 [mailto:tbray@textuality.com &lt;tbray@textuality.com&gt;]
 
:Dave Hollander, Contivo, Inc. [mailto:dmh@contivo.com &lt;dmh@contivo.com&gt;]
 
:Andrew Layman, Microsoft [mailto:andrewl@microsoft.com &lt;andrewl@microsoft.com&gt;]
 
:Richard Tobin, University of Edinburgh and Markup Technology Ltd [mailto:richard@inf.ed.ac.uk &lt;richard@inf.ed.ac.uk&gt;] [mailto:richard@cogsci.ed.ac.uk &lt;richard@cogsci.ed.ac.uk&gt;]
 
:Henry S. Thompson, University of Edinburgh and W3C [mailto:ht@w3.org &lt;ht@w3.org&gt;] - Third Edition
 
; 구현 보고서
 
 
 
http://www.w3.org/XML/2002/12/xml-names11-implementation.html
 
 
 
:(버전 1.1의 알려진 구현은 모두 1.0을 지원하고있다.)
 
; 테스트 세트<br />      https://www.w3.org/XML/Test/
 
; 메일 링리스트<br />        [mailto:xml-names-editor@w3.org xml-names-editor@w3.org]
 
:[https://lists.w3.org/Archives/Public/xml-names-editor/ archives]
 
; 정오표<br />        https://www.w3.org/XML/2009/xml-names-errata
 
:https://www.w3.org/XML/2006/xml-names11-errata
 
; 각 국어 번역<br />        https://www.w3.org/2003/03/Translations/byTechnology?technology=xml-names
 
:https://www.w3.org/2003/03/Translations/byTechnology?technology=xml-names11
 
; 비공식 형식<br />        [https://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml XML 버전]
 
:[https://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e-diff.html 제 2 판의 차이 강조 판]
 
:[https://www.w3.org/TR/2006/REC-xml-names11-20060816/diff.html 제 1 판의 차이 강조 판]
 
 
 
색인 등
 
 
 
<span id="_index-nav-0">제목</span> / <span id="_index-nav-1">주</span> / <span id="_index-nav-2">예</span> / <span id="_index-nav-3">역주</span>(클릭 순회) |용어 목록
 
 
 
©
 
 
 
[https://www.w3.org/Consortium/Legal/ipr-notice#Copyright Copyright] ©  <span class="NS10">2009 </span>[https://www.w3.org/ W3C] <sup>®</sup> ( [https://www.csail.mit.edu/ MIT] , [https://www.ercim.org/ ERCIM] , [https://www.keio.ac.jp/ Keio] ), All Rights Reserved. W3C [https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer liability] , [https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks trademark] and [https://www.w3.org/Consortium/Legal/copyright-documents document use] rules apply. <sup></sup>[이 페이지에는 버전 1.1의 일본어 번역도 포함되어 있습니다 (기본은 숨기기). 창 하단의 컨트롤에 표시를 전환 할 수 있습니다 (1.0, 1.1 양자의 차이를 비교할 수 있습니다). ]
 
-----
 
 
 
<div id="abstract" class="section">
 
'''요약'''
 
 
 
XML 네임 스페이스는 XML 문서에서 사용하는 요소와 속성의 이름에 대해 <span class="NS10">URI</span> 참조에 의해 식별되는 네임 스페이스에 연결시키는 것으로 규정하는 간단한 방법을 제공하는.
 
</div>
 
<div id="status" class="section">
 
'''이 문서의 상태'''
 
 
 
이 절에서는 발행 시점에서 ... <span class="trans-note">[이하이 절 다른 내용은 생략한다. 이 절에 언급되어있는 링크 중 일부 (구현 보고서 등)는 시작 부분의 &quot;사양 메타 데이터&quot;에 가세하고있다. ]</span>
 
</div><div id="MAIN0" role="main">
 
  
 
<div id="sec-intro" class="section">
 
<div id="sec-intro" class="section">
 
== 동기 및 요약 ==
 
 
우리는 단일 XML 문서가 여러 소프트웨어 모듈에 대해 정의되고 사용되는 요소와 속성(여기서는 "마크업 어휘"라고 함)을 포함할 수 있는 XML(Extensible Markup Language)의 응용 프로그램을 구상합니다. 이에 대한 한 가지 동기는 모듈화입니다. 잘 이해되고 유용한 소프트웨어가 있는 그러한 마크업 어휘가 존재한다면, 이 마크업을 다시 발명하는 것보다 재사용하는 것이 좋습니다.
 
 
여러 마크업 어휘를 포함하는 이러한 문서는 인식 및 충돌 문제를 제기합니다. 소프트웨어 모듈은 다른 소프트웨어 패키지를 위한 마크업이 동일한 요소 이름 이나 속성 이름을 사용할 때 발생하는 "충돌"에 직면하더라도 처리하도록 설계된 요소와 속성을 인식할 수 있어야 합니다 .
 
 
이러한 고려 사항은 문서 구성이 다른 마크업 어휘의 이름 간의 충돌을 피하기 위해 구성된 이름을 가져야 함을 요구합니다. 이 사양은 확장된 이름 을 요소 및 속성 에 할당하여 이를 수행 하는 메커니즘인 XML 네임스페이스에 대해 설명 합니다.<div id="notation" class="section">
 
 
=== 표기와 용법에 대한주의 ===
 
 
<span class="trans-note">[이 절의 다른 내용 ([RFC2119] 관련)은 생략한다. ]</span>
 
 
이 사양의 생성 규칙의 비 종단 기호의 대부분은 여기가 아니라 XML 사양 [https://triple-underscore.github.io/xml-names-ja.html#_ref-XML [XML]] 에서 정의되는 것에주의. 여기에 정의 된 비 종단 기호가 XML 사양의 비 종단 기호와 이름이 같은 경우 모든 사례에서 전자와 일치하는 문자열의 집합은 후자에 부합하는 문자열의 집합의 부분 집합이된다.
 
 
이 사양에 적합한 문서는이 문서의 각 생성 규칙에 부여되는 &quot;네임 스페이스 구속&quot;(Namespace Constraint)에 따라야한다.
 
</div>
 
 
</div>
 
<div id="sec-namespaces" class="section">
 
 
== XML 네임 스페이스 ==
 
 
<div id="concepts" class="section">
 
 
=== 기본 개념 ===
 
 
<div class="termdef">
 
 
정의 : XML 네임 스페이스 는 <span class="NS10">URI</span> 참조 <span class="NS10">[https://triple-underscore.github.io/xml-names-ja.html#_ref-RFC3986 [RFC3986]]</span><span class="NS11">[https://triple-underscore.github.io/xml-names-ja.html#_ref-RFC3987 [RFC3987]]</span> 에 의해 확인된다. 요소 이름 / 속성 이름이 사양에 언급 구조를 이용하여 한 [https://triple-underscore.github.io/xml-names-ja.html#dt-namespace XML 네임 스페이스] 에 속해있다.
 
</div>
 
정의 : 열기 이름 은 ( [https://triple-underscore.github.io/xml-names-ja.html#dt-NSName 이름 공간 명] , [https://triple-underscore.github.io/xml-names-ja.html#dt-localname 국소 이름] )의 쌍이다.
 
 
정의 : 주어진 이름 이름 의 네임 스페이스 는 이름 이 <span class="NS10">URI </span>S 로 식별되는 이름 공간에 속하는한다면, S 이다. 이름 이름 이 어떤 이름 공간에 속하지 않는다면 해당 네임 스페이스 이름의 값은 아니다.
 
 
정의 : 하나의 사례에서도 국소 이름 은 이름 이된다.
 
 
[통일적으로 관리되는 <span class="NS10">URI</span> 로 네임 스페이스 어휘 [https://triple-underscore.github.io/xml-names-ja.html#dt-localname 국소 이름] ] 조합하면 이름 충돌은 피할 수있게된다.
 
 
<span class="NS10">URI</span> 참조는 이름에 허용되지 않는 문자를 포함 할 수있다 위에 길고 불편하기 때문에 [https://triple-underscore.github.io/xml-names-ja.html#dt-expname 열기 이름] 이 XML 문서의 요소와 속성의 이름에 직접 이용되는 것은 아니다. 대신 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 정규화 된 이름] 이 사용된다.
 
 
정의 : 유 정규화 된 이름 은 네임 스페이스 해석의 대상이되는 이름이다.
 
 
이 사양에 맞는 문서에서는 요소 이름 / 속성 이름은 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 수식 명] 으로 출현한다. 구문으로, 그들은 접두사가 이름 ( [https://triple-underscore.github.io/xml-names-ja.html#NT-PrefixedName <code>PrefixedName</code>]) 또는 접두사없는 이름 ( [https://triple-underscore.github.io/xml-names-ja.html#NT-UnprefixedName <code>UnprefixedName</code>]) 중 하나이며, 접두사를 네임 스페이스에 속박하는 및 접두사없이 요소 이름을 기본 이름 공간에 속박하는 특성에 따른 선언 구문이 제공되고있다. 이 선언의 시야 (범위)는 문서의 각 부분에 다른 속박을 적용 할 수 있도록하기 위해, 그것이 출현하는 요소 아래 (요소 자신과 그 내용)에 한정된다. 이 사양에 적합한 처리 장치는 이러한 선언과 접두어를 인식하고 올바르게 작동해야한다.
 
</div>
 
<div id="iri-use" class="section">
 
 
=== 네임 스페이스 이름으로 <span class="NS10">URI</span> 의 사용 ===
 
 
빈 문자열은 <span class="NS10">URI</span> 참조로 합법적 이어도 네임 스페이스 이름으로 사용할 수 없다.
 
 
네임 스페이스 선언에서 상대 <span class="NS10">URI</span> 참조의 사용은 동일한 문서에 대한 참조를 포함하여 비추천되었다.
 
 
참고 : 이것은 W3C XML Plenary Ballot [https://triple-underscore.github.io/xml-names-ja.html#_ref-Relative-URI-deprecation [Relative-URI-deprecation]] 에 의해 결정되었다. 거기는 “DOM, XPath 등의 후 사양에서도 이에 대한 해석은 정의하지 않는다고하는” 것도 선언되었다.
 
</div>
 
<div id="NSNameComparison" class="section">
 
 
===<span class="NS10">URI</span> 참조 비교법 ===
 
 
네임 스페이스를 식별하는 <span class="NS10">URI</span> 참조가있는 이름이 주어진 네임 스페이스에 속하는지 여부와 2 개의 이름이 동일한 네임 스페이스에 속하는지 여부를 결정하는 비교된다.
 
 
정의 : 두 <span class="NS10">URI</span> 문자열로 취급하며, 문자열로 일치 할 때, 즉 같은 문자 순서 일 때, 그 때에 한하여 서로 일치 한다고한다.
 
 
비교에서는 문자 대소를 구분 % - 탈출하거나 그 반대로 되돌릴 수는 없다.
 
 
따라서 2 개의 <span class="NS10">URI</span> 참조가 [https://triple-underscore.github.io/xml-names-ja.html#dt-identical 서로 일치] 하지 않아도 동일한 자원에 해결 될 수있다. 예를 들어, 문자 대소 나 % - 탈출의 유무에서만 차이하는 <span class="NS10">URI</span> 참조 또는 [기저 URI가 다른 외부 실체]의 <span class="NS10">URI</span> 참조 (가 상대 <span class="NS10">URI</span> 참조 네임 스페이스 이름으로 비추천 된 것 주의).
 
 
이름 공간 선언의 <span class="NS10">URI</span> 참조는 속성의 [https://www.w3.org/TR/REC-xml/#AVNormalize 정규화 된 값] 이며, XML 문자와 엔터티 참조 대체 어떻게 비교보다 먼저 진행된다.
 
 
==== 예 ====
 
 
다음의 <span class="NS10">URI</span> 참조는 문자 대소가 상이한 때문에 네임 스페이스를 식별하는 데 있어서는 모든 서로 다른 :
 
 
*<nowiki>http://www.example.org/wine</nowiki>
 
*<nowiki>http://www.Example.org/wine</nowiki>
 
*<nowiki>http://www.example.org/Wine</nowiki>
 
 
다음 <span class="NS10">URI</span> 참조도 네임 스페이스를 식별하는 데 있어서는 모든 서로 다른 :
 
 
*<nowiki>http://www.example.org/~wilbur</nowiki>
 
*<nowiki>http://www.example.org/%7ewilbur</nowiki>
 
*<nowiki>http://www.example.org/%7ewilbur</nowiki>
 
*<nowiki>http://www.example.org/%7Ewilbur</nowiki>
 
 
참조의 해결 후에 등가가 될 <span class="NS10">URI</span> 에 의한 혼동 위험이 있으므로, 네임 스페이스에서는 % - 이스케이프 된 문자는 사용하지 않는 것이 강력히 권장된다.
 
</div>
 
 
</div>
 
<div id="ns-decl" class="section">
 
 
== 네임 스페이스 선언 ==
 
 
정의 : 이름 공간 (더 정확하게는 네임 스페이스 속박) 예약 된 속성의 부족을 이용하여 선언 된다. 이러한 속성 이름은 'xmlns'과 일치하거나 'xmlns:'부터 시작해야한다. 이러한 특성은 다른 XML 속성뿐만 아니라 직접 또는 [https://www.w3.org/TR/REC-xml/#dt-default 기본] 의해供せる/ 공급 될 수있다.
 
 
이름 공간 선언의 속성 이름 :
 
 
; [1] <code>NSAttName</code>
 
:[https://triple-underscore.github.io/xml-names-ja.html#NT-PrefixedAttName <code>PrefixedAttName</code>] | [https://triple-underscore.github.io/xml-names-ja.html#NT-DefaultAttName <code>DefaultAttName</code>]
 
; [2] <code>PrefixedAttName</code>
 
: 'xmlns :' [https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]
 
: 네임 스페이스 구속 : [https://triple-underscore.github.io/xml-names-ja.html#xmlReserved [예약 접두사와 네임 스페이스 이름]
 
; [3] <code>DefaultAttName</code>
 
: 'xmlns'
 
; [4] <code>NCName</code>
 
:[https://www.w3.org/TR/REC-xml/#NT-Name <code>Name</code>]- ( [https://www.w3.org/TR/REC-xml/#NT-Char <code>Char</code>]* ':' [https://www.w3.org/TR/REC-xml/#NT-Char <code>Char</code>]*)
 
:[https://triple-underscore.github.io/xml-names-ja.html#NT-NCNameStartChar <code>NCNameStartChar</code>] [https://triple-underscore.github.io/xml-names-ja.html#NT-NCNameChar <code>NCNameChar</code>]*
 
: ( &quot; <code>:</code>&quot;비 XML ) [https://www.w3.org/TR/REC-xml/#NT-Name <code>Name</code>] [https://www.w3.org/TR/xml11#NT-Name <code>Name</code>]
 
 
속성의 [https://www.w3.org/TR/REC-xml/#AVNormalize 정규화 된 값] 은 네임 스페이스를 식별하는 [https://triple-underscore.github.io/xml-names-ja.html#dt-NSName 네임 스페이스] 로의 <span class="NS10">URI</span> 참조이거나 또는 빈 문자열이어야한다. 네임 스페이스 이름은 그것이 의도하는 목적을 감안하여 고유하고 지속적으로 관리해야한다. 존재하는 스키마 검색 취득에 직접적으로 사용할 수있는 것이 목표가 아니다. 이러한 목표를 염두에두고 설계 된 예로는 Uniform Resource Names [https://triple-underscore.github.io/xml-names-ja.html#_ref-RFC2141 [RFC2141]] 가있다. 그러나 보통의 URL은 그런 방법으로 관리하고, 같은 목표를 얻을 수는 주 둔다. 정의 : 속성 이름 [https://triple-underscore.github.io/xml-names-ja.html#NT-PrefixedAttName <code>PrefixedAttName</code>]과 일치한다면 그 [https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]가 이름 공간 접두사 를주고 그 속성 값의 [https://triple-underscore.github.io/xml-names-ja.html#dt-NSName 네임 스페이스 이름] 이 그 선언이 부여 된 요소의 시야에서 네임 스페이스 이름과 요소 이름 / 속성 이름과 연결에 이용된다.
 
 
정의 : 속성 이름 [https://triple-underscore.github.io/xml-names-ja.html#NT-DefaultAttName <code>DefaultAttName</code>]과 일치한다면, 그 속성 값의 [https://triple-underscore.github.io/xml-names-ja.html#dt-NSName 네임 스페이스 이름] 이 그 선언이 부여 된 요소의 시야에서 기본 네임 스페이스 된다.
 
 
기본 네임 스페이스 및 선언 덮어 법은 [https://triple-underscore.github.io/xml-names-ja.html#scoping-defaulting 요소 / 속성에 대한 네임 스페이스 관련 법률] 절에 논의된다.
 
 
<div class="example">
 
 
다음 예제에서는 네임 스페이스 접두사 &quot; <code>edi</code>&quot;네임 스페이스 이름 &quot; <code>http://ecommerce.example.org/schema</code>&quot;에 연결하는 네임 스페이스 선언이다 :
 
 
<pre class="lang-xml"><x xmlns:edi='http://ecommerce.example.org/schema'>
 
  <!-- the "edi" prefix is bound to http://ecommerce.example.org/schema
 
      for the "x" element and contents -->
 
</x></pre>
 
 
</div>
 
 
; 네임 스페이스 구속  [예약 접두사와 네임 스페이스 이름
 
: 접두사 <code>xml</code>는 정의하여 네임 스페이스 이름 &quot; <code>http://www.w3.org/XML/1998/namespace</code>&quot;에 속박된다. 이 네임 스페이스는 :
 
:* 선언도 좋지만, 할 필요는 없다.
 
:* 다른 어떠한 네임 스페이스에도 속박되지 않아야한다.
 
:* 다른 접두사가이 네임 스페이스에 구애되어서는 안된다.
 
:* 기본 네임 스페이스로 선언되고는한다.
 
: 접두사 <code>xmlns</code>는 네임 스페이스 속박의 선언에만 이용되고 정의는 네임 스페이스 이름 &quot; <code>http://www.w3.org/2000/xmlns/</code>&quot;에 속박된다. 이 네임 스페이스는 :
 
:* 선언되지 않아야한다.
 
:* 다른 접두사가이 이름 공간에 구애되어서는 안된다.
 
:* 기본 네임 스페이스로 선언되고는한다.
 
:* 요소 이름은 접두사 &quot; <code>xmlns</code>&quot;이 안된다.
 
: 문자 대소를 구분하지 않고 아래로 머리가 &quot; <code>xml</code>&quot;에 일치하는 것 같은 다른 모든 접두사도 예약이다. 따라서 :
 
:* 이용자는 다음의 사양에서 정의 된 경우를 제외하고 그들을 이용해야 아니다.
 
:* 처리기는 그들을 치명적인 오류로 취급해서는 안된다.
 
 
접두사가 예약되지 않은해도 문자 대소를 구분하지 않고 아래로 [https://triple-underscore.github.io/xml-names-ja.html#NT-LocalPart <code>LocalPart</code>]머리를 &quot; <code>xml</code>&quot;에 일치하는 이름의 사용은 접두사없이 사용 된 경우 예약이되어 버리므로 권유 없다.
 
</div>
 
<div id="ns-qualnames" class="section">
 
 
== 유 수식 명 ==
 
 
이 사양에 적합한 XML 문서에서는 일부의 이름 (비 종단 기호 에 해당하는 구문을 이용)은 다음에 정의되는 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 수식 명] 으로 주어져야한다 : [https://www.w3.org/TR/REC-xml/#NT-Name <code>Name</code>]
 
 
; [7] <code>QName</code>
 
:[https://triple-underscore.github.io/xml-names-ja.html#NT-PrefixedName <code>PrefixedName</code>] | [https://triple-underscore.github.io/xml-names-ja.html#NT-UnprefixedName <code>UnprefixedName</code>]
 
; [8] <code>PrefixedName</code>
 
:[https://triple-underscore.github.io/xml-names-ja.html#NT-Prefix <code>Prefix</code>] ':' [https://triple-underscore.github.io/xml-names-ja.html#NT-LocalPart <code>LocalPart</code>]
 
; [9] <code>UnprefixedName</code>
 
:[https://triple-underscore.github.io/xml-names-ja.html#NT-LocalPart <code>LocalPart</code>]
 
; [10] <code>Prefix</code>
 
:[https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]
 
; [11] <code>LocalPart</code>
 
:[https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]
 
 
접두사 ( [https://triple-underscore.github.io/xml-names-ja.html#NT-Prefix <code>Prefix</code>])는 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 수식 명] 을 이루는 [https://triple-underscore.github.io/xml-names-ja.html#dt-prefix 네임 스페이스 접두사] 를 제공하는 - 그것은 [https://triple-underscore.github.io/xml-names-ja.html#dt-NSDecl 네임 스페이스 선언] 안의 이름 공간 <span class="NS10">URI</span> 참조에 연결되어야한다.
 
 
정의 : [https://triple-underscore.github.io/xml-names-ja.html#NT-LocalPart <code>LocalPart</code>]이 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 수식 명] 을 이루는 국소 부위 의 제공.
 
 
접두사는 네임 스페이스 이름의 자리 표시 자로 ''만'' 기능하는 것에주의. 응용 시야가 포함하고있는 문서를 초과하는 이름을 만들 때는 접두사가 아닌 네임 스페이스를 이용해야한다.
 
</div>
 
<div id="ns-using" class="section">
 
 
== 유 수식 명 이용 ==
 
 
이 사양에 적합한 XML 문서에서 요소의 이름은 다음과 같이 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 수식 명] 으로 주어진다 :
 
 
; [12] <code>STag</code>
 
: '&lt;' [https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>]( ) * ? '&gt;'[https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>] [https://triple-underscore.github.io/xml-names-ja.html#NT-Attribute <code>Attribute</code>][https://www.w3.org/TR/REC-xml/#NT-Attribute <code>Attribute</code>][https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]
 
: 네임 스페이스 구속 : [https://triple-underscore.github.io/xml-names-ja.html#nsc-NSDeclared [접두사는 선언 됨]
 
; [13] <code>ETag</code>
 
: '&lt;/' ? '&gt;'[https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>] [https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]
 
: 네임 스페이스 구속 : [https://triple-underscore.github.io/xml-names-ja.html#nsc-NSDeclared [접두사는 선언 됨]
 
; [14] <code>EmptyElemTag</code>
 
: '&lt;' [https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>]( ) * ? '/&gt;'[https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>] [https://triple-underscore.github.io/xml-names-ja.html#NT-Attribute <code>Attribute</code>][https://www.w3.org/TR/REC-xml/#NT-Attribute <code>Attribute</code>][https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]
 
: 네임 스페이스 구속 : [https://triple-underscore.github.io/xml-names-ja.html#nsc-NSDeclared [접두사는 선언 됨]
 
  
 
<div class="example">
 
<div class="example">
  
요소 이름 역할을하는 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 된 이름] 의 예 :
+
네임스페이스 접두사 edi 를 네임스페이스 이름과 연결하는 네임스페이스 선언의 예 <nowiki>http://ecommerce.example.org/schema</nowiki>: <syntaxhighlight lang="xml">
 +
<x xmlns:edi='http://ecommerce.example.org/schema'>
 +
  <!-- "edi" prefix는 "x"의 엘리먼트와 컨텐츠에 대해서 http://ecommerce.example.org/schema에 바인딩 된다.-->
 +
</x>
 +
</syntaxhighlight><br /></div>
  
<pre class="lang-xml"> <!-- the 'price' element's namespace is http://ecommerce.example.org/schema -->
+
</div>요소 이름으로 사용되는 규정된 이름의 예:<syntaxhighlight lang="xml">
  <edi:price xmlns:edi='http://ecommerce.example.org/schema' units='Euro'>32.18</edi:price></pre>
+
<!-- the 'price' element의 네임스페이스는 http://ecommerce.example.org/schema 이다.-->
 
+
<edi:price xmlns:edi='http://ecommerce.example.org/schema' units='Euro'>32.18</edi:price>
</div>
+
</syntaxhighlight>속성 이름으로 사용되는 규정된 이름의 예:<syntaxhighlight lang="xml">
속성은 [https://triple-underscore.github.io/xml-names-ja.html#dt-NSDecl 이름 공간 선언] 되거나 또는 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 수식 명] 으로 이름이 주어진다 :
+
<x xmlns:edi='http://ecommerce.example.org/schema'>
 
+
   <!-- the 'taxClass' attribute의 네임스페이스는 http://ecommerce.example.org/schema이다. -->
; [15] <code>Attribute</code>
 
:[https://triple-underscore.github.io/xml-names-ja.html#NT-NSAttName <code>NSAttName</code>] [https://www.w3.org/TR/REC-xml/#NT-Eq <code>Eq</code>] [https://www.w3.org/TR/REC-xml/#NT-AttValue <code>AttValue</code>] | [https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>] [https://www.w3.org/TR/REC-xml/#NT-Eq <code>Eq</code>] [https://www.w3.org/TR/REC-xml/#NT-AttValue <code>AttValue</code>]
 
: 네임 스페이스 구속 : [https://triple-underscore.github.io/xml-names-ja.html#nsc-NSDeclared [접두사는 선언 됨]
 
: 네임 스페이스 구속 : [https://triple-underscore.github.io/xml-names-ja.html#nsc-NoPrefixUndecl [접두사를 선언되지 않은하는 것은 없다]]
 
: 네임 스페이스 구속 : [https://triple-underscore.github.io/xml-names-ja.html#nsc-AttrsUnique [속성은 고유]]
 
 
 
<div class="example">
 
 
 
속성 이름 역할을하는 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 된 이름] 의 예 :  
 
 
 
<pre class="lang-xml"><x xmlns:edi='http://ecommerce.example.org/schema'>
 
   <!-- the 'taxClass' attribute's namespace is http://ecommerce.example.org/schema -->
 
 
   <lineItem edi:taxClass="exempt">Baby food</lineItem>
 
   <lineItem edi:taxClass="exempt">Baby food</lineItem>
</x></pre>
+
</x>
 
+
</syntaxhighlight><div id="ns-using" class="section">
</div>
+
== 네임스페이스 범위 ==
 
+
</div>하위 태그에서 사용할 수 있다.<syntaxhighlight lang="xml">
; 네임 스페이스 구속 [접두사는 선언 됨
+
<?xml version="1.0"?>
:&quot; <code>xml</code>&quot;또는 &quot; <code>xmlns</code>&quot;이외의 이름 공간 접두사는, 그 접두사가 사용되는 요소의 시작 태그 또는 그 상위 요소 (즉, 접두사에 의한 마크 업이 그 [https://www.w3.org/TR/REC-xml/#dt-content 내용] 에 출현하는 요소) ]에서 [https://triple-underscore.github.io/xml-names-ja.html#dt-NSDecl 이름 공간 선언] 속성은 선언되어 있어야한다.
 
 
 
; 네임 스페이스 구속 [접두사를 선언되지 않은하는 것은 없다]
 
: 접두사 ( [https://triple-underscore.github.io/xml-names-ja.html#NT-Prefix <code>Prefix</code>])을 선언 [https://triple-underscore.github.io/xml-names-ja.html#dt-NSDecl 네임 스페이스 선언] 에서는 (즉 [https://triple-underscore.github.io/xml-names-ja.html#NT-NSAttName <code>NSAttName</code>]이 [https://triple-underscore.github.io/xml-names-ja.html#NT-PrefixedAttName <code>PrefixedAttName</code>]되어있는 곳에서는), 속성 값 ( [https://www.w3.org/TR/REC-xml/#NT-AttValue <code>AttValue</code>])은 비어 있으면 안된다.
 
 
 
이 구속에 의해 : 이름 공간 선언 속성이 XML [https://www.w3.org/TR/REC-xml/#dt-docent 문서 엔티티] 에 직접하지 않고, 외부 실체 선언 된 기본 속성을 통해 제공되고있는 곳에서는 연산의 어려움에 인도있다. 그러한 선언은 검증하지 않는 XML 처리기에 기반 소프트웨어에서 읽지 못할 수도있다. 많은 XML 응용은 아마도 네임 스페이스를 구별하는 것도 포함 <span class="trans-note">[네임 스페이스]</span> 검증의 처리 장치를 요구하지 않습니다. 이러한 응용에서 올바른 연산이 요구되는 경우 네임 스페이스 선언은 직접 공급되거나 또는 내부 부분 집합의 [https://www.w3.org/TR/REC-xml/#dt-doctype DTD] 에서 선언 된 기본 속성을 통해 공급되어야한다.
 
 
 
요소 이름이나 속성 이름은 [https://www.w3.org/TR/REC-xml/#dt-doctype DTD] 안의 선언에 출현하는 경우에는 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 수식 명] 으로도 주어진다 :
 
 
 
; [16] <code>doctypedecl</code>
 
: '&lt;! DOCTYPE' ( )? ? ( '['( | | ) * '' ' ?)?&gt;'[https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>] [https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>][https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>] [https://www.w3.org/TR/REC-xml/#NT-ExternalID <code>ExternalID</code>][https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>][https://www.w3.org/TR/REC-xml/#NT-markupdecl <code>markupdecl</code>][https://www.w3.org/TR/REC-xml/#NT-PEReference <code>PEReference</code>][https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>][https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]''
 
; [17] <code>elementdecl</code>
 
: '&lt;! ELEMENT' ? '&gt;'[https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>] [https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>] [https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>] [https://www.w3.org/TR/REC-xml/#NT-contentspec <code>contentspec</code>] [https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]
 
; [18] <code>cp</code>
 
: ( [https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>]| [https://www.w3.org/TR/REC-xml/#NT-choice <code>choice</code>]| [https://www.w3.org/TR/REC-xml/#NT-seq <code>seq</code>]) ( '?'| '*'| '+')?
 
; [19] <code>Mixed</code>
 
: '(' [https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]? '#PCDATA'( [https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]? '|' [https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]? [https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>]) * [https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]? ') *'| '(' [https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]? '#PCDATA' [https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]? ')'
 
; [20] <code>AttlistDecl</code>
 
: '&lt;! ATTLIST' * ? '&gt;'[https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>] [https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>] [https://triple-underscore.github.io/xml-names-ja.html#NT-AttDef <code>AttDef</code>][https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]
 
; [21] <code>AttDef</code>
 
:[https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>]( [https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>]| [https://triple-underscore.github.io/xml-names-ja.html#NT-NSAttName <code>NSAttName</code>])[https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>] [https://www.w3.org/TR/REC-xml/#NT-AttType <code>AttType</code>] [https://www.w3.org/TR/REC-xml/#NT-S <code>S</code>] [https://www.w3.org/TR/REC-xml/#NT-DefaultDecl <code>DefaultDecl</code>]
 
 
 
DTD의 유효성 검사는 다음과 같은 의미에서 이름 공간을 인식하지 못하는 것임을주의 : DTD는 문서에 나타나도 좋은 요소 나 속성을 (이름 공간 명, [https://triple-underscore.github.io/xml-names-ja.html#dt-localname 국소 이름] )의 쌍으로는 없이 그 이름을 해석하지 않고 구속한다. 네임 스페이스를 사용하는 문서를 DTD를 맞대고 검증 할 때 각 인스턴스에 사용되는 접두사와 동일한 접두사가 DTD에서 사용되어야한다. 그러나 DTD는 이름 공간 선언 속성에 대해 &quot; <code>#FIXED</code>&quot;값을 제공하는 것으로, 유효한 문서에 사용 된 네임 스페이스를 간접적으로 구속 할 수있다.
 
</div>
 
<div id="scoping-defaulting" class="section">
 
 
 
== 요소 / 속성에 대한 네임 스페이스 관련 법률 ==
 
 
 
<div id="scoping" class="section">
 
 
 
=== 네임 스페이스 시각 ===
 
 
 
접두사를 선언 네임 스페이스 선언의 시각은 그것이 출현하는 시작 태그에서 끝 태그까지의 범위에서 더 내연 있으며, [https://triple-underscore.github.io/xml-names-ja.html#NT-NSAttName <code>NSAttName</code>]부가 동일하게 같은 모든 [접두사를 선언 네임 스페이스 선언의 시야를 제외한 범위가된다. 빈 태그 사례의 시각은 그 태그 자신된다.
 
 
 
이러한 네임 스페이스 선언은 그 시야에 들어하고 그 선언에 지정된 접두사에 일치하는 접두사를 가지는 같은 모든 요소 이름 / 속성 이름에 적용된다.
 
 
 
접두사가 요소 이름 / 속성 이름에 해당하는 [https://triple-underscore.github.io/xml-names-ja.html#dt-expname 열기 이름] 은 해당 접두어 ( [https://triple-underscore.github.io/xml-names-ja.html#NT-Prefix <code>Prefix</code>])을 속박하는 <span class="NS10">URI</span> 를 [https://triple-underscore.github.io/xml-names-ja.html#dt-NSName 네임 스페이스] 에 있고 그 [https://triple-underscore.github.io/xml-names-ja.html#dt-localpart 국소 부위] ( [https://triple-underscore.github.io/xml-names-ja.html#NT-LocalPart <code>LocalPart</code>])을 [https://triple-underscore.github.io/xml-names-ja.html#dt-localname 국소 이름] 을 가진다.
 
 
 
<div class="example">
 
 
 
<pre class="lang-xml"><?xml version="1.0"?>
 
 
 
 
<html:html xmlns:html='http://www.w3.org/1999/xhtml'>
 
<html:html xmlns:html='http://www.w3.org/1999/xhtml'>
 
 
   <html:head><html:title>Frobnostication</html:title></html:head>
 
   <html:head><html:title>Frobnostication</html:title></html:head>
 
   <html:body><html:p>Moved to  
 
   <html:body><html:p>Moved to  
 
     <html:a href='http://frob.example.com'>here.</html:a></html:p></html:body>
 
     <html:a href='http://frob.example.com'>here.</html:a></html:p></html:body>
</html:html></pre>
+
</html:html>
다음의 예와 같이 단일 요소에 여러 네임 스페이스 접두사를 속성으로 선언 할 수있다 :
+
</syntaxhighlight><div id="scoping-defaulting" class="section">
  
<pre class="lang-xml"><?xml version="1.0"?>
+
<div id="scoping" class="section">
 +
 
 +
<div class="example">
 +
다음의 예와 같이 단일 요소에 여러 네임 스페이스 접두사를 속성으로 선언 할 수있다 : <syntaxhighlight lang="xml">
 +
<?xml version="1.0"?>
 
<!-- both namespace prefixes are available throughout -->
 
<!-- both namespace prefixes are available throughout -->
<bk:book xmlns:bk='urn:loc.gov:books'
+
<bk:book xmlns:bk='urn:loc.gov:books' xmlns:isbn='urn:ISBN:0-395-36341-6'>
        xmlns:isbn='urn:ISBN:0-395-36341-6'>
 
 
     <bk:title>Cheaper by the Dozen</bk:title>
 
     <bk:title>Cheaper by the Dozen</bk:title>
 
     <isbn:number>1568491379</isbn:number>
 
     <isbn:number>1568491379</isbn:number>
</bk:book></pre>
+
</bk:book>
 
+
</syntaxhighlight></div></div></div>
</div></div>
+
<div id="ProcessorConformance" class="section">  
<div id="defaulting" class="section">
+
</div></div><div id="_references" class="section"><div id="nrefs" class="section">
 
+
== 외부링크 ==
=== 기본 네임 스페이스의 적용 방법 ===
+
https://www.w3.org/TR/2009/REC-xml-names-20091208/
 
 
[https://triple-underscore.github.io/xml-names-ja.html#dt-defaultNS 기본 네임 스페이스] 선언의 시야는 더 내연의 기본 네임 스페이스 선언의 시야를 제외하고 그것이 출현하는 시작 태그에서 끝 태그까지 걸쳐있다. 빈 태그 사례의 시각은 그 태그 자신된다.
 
 
 
기본 네임 스페이스 선언은 그 시야에 들어가는 접두사없이 요소 이름에 적용된다. 기본 네임 스페이스 선언은 속성 이름에 직접 적용되지 않는다. 접두사가없는 특성의 해석은 그것이 출현하는 요소로 결정된다.
 
 
 
접두사없는 요소가있는 기본 네임 스페이스 선언의 시야에 들어가는 경우, 그 요소에 대응하는 [https://triple-underscore.github.io/xml-names-ja.html#dt-expname 열기 이름] 은 그 [https://triple-underscore.github.io/xml-names-ja.html#dt-defaultNS 기본 네임 스페이스] 의 <span class="NS10">URI</span> 를 [https://triple-underscore.github.io/xml-names-ja.html#dt-NSName 네임 스페이스] 에있는. 시야에 기본 네임 스페이스 선언이 없으면, 네임 스페이스는 값을 가지지 않는다. 접두사없는 속성 이름의 네임 스페이스 이름은 항상 값을 가지지 않는다. 어떤 사례에서도 [https://triple-underscore.github.io/xml-names-ja.html#dt-localname 국소 이름] 은 [https://triple-underscore.github.io/xml-names-ja.html#dt-localpart 국소 부위] ( [https://triple-underscore.github.io/xml-names-ja.html#NT-LocalPart <code>LocalPart</code>])가된다 (물론 이것은 접두사없는 이름 자신과 동일).
 
 
 
<div class="example">
 
 
 
<pre class="lang-xml"><?xml version="1.0"?>
 
<!-- 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></pre>
 
<pre class="lang-xml"><?xml version="1.0"?>
 
<!-- 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></pre>
 
네임 스페이스의 시야를 あてがう 약간 큰 예 :
 
 
 
<pre class="lang-xml"><?xml version="1.0"?>
 
<!-- 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>
 
      <!-- 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></pre>
 
 
 
</div>
 
기본 네임 스페이스 선언의 특성 값은 비어되고있다. 그 효과는 선언의 시각에는 기본 네임 스페이스는 없다]와 같게된다.
 
 
 
<div class="example">
 
 
 
<pre class="lang-xml"><?xml version='1.0'?>
 
<Beers>
 
  <!-- the 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>
 
    <!-- no 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></pre>
 
 
 
</div>
 
 
 
</div>
 
<div id="uniqAttrs" class="section">
 
 
 
=== 속성 고유성 ===
 
 
 
<dl>
 
<dt> 네임 스페이스 구속 : [속성은 고유] </dt>
 
<dd><p>이 사양에 적합한 XML 문서에서 어떤 태그도 다음 중 하나를 만족하는 복수의 속성을 포함하고는한다 : </p>
 
<ul>
 
<li>서로의 이름은 일치하는 </li>
 
<li><p>그 [https://triple-underscore.github.io/xml-names-ja.html#dt-qualname 유 정규화 된 이름] 은 다음을 모두 충족 :</p>
 
<ul>
 
<li>각각의 [https://triple-underscore.github.io/xml-names-ja.html#dt-localpart 국소 부위] 는 서로 동일</li>
 
<li>각각의 [https://triple-underscore.github.io/xml-names-ja.html#dt-prefix 이름 공간 접두사] 는 [https://triple-underscore.github.io/xml-names-ja.html#dt-identical 서로 일치] 하는 [https://triple-underscore.github.io/xml-names-ja.html#dt-NSName 네임 스페이스] 에 속박되어있다</li></ul></li></ul>
 
</dd>
 
<dd>이 구속은 어떤 요소에서도 [https://triple-underscore.github.io/xml-names-ja.html#dt-expname 열기 이름] 이 동일하게 2 개의 속성은없는 것을 요구하는 것과 동일하다. </dd></dl>
 
 
 
<div class="example">
 
 
 
예를 들어 다음의 빈 요소 태그 &quot; <code>bad</code>&quot;는 모두 불법된다 :
 
 
 
<pre class="lang-xml"><!-- 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></pre>
 
그러나 다음의 것은 모두 합법적된다. 두 번째 것은 속성 이름은 기본 네임 스페이스에는 적용되지 않기 때문에 합법적된다 :
 
 
 
<pre class="lang-xml"><!-- 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></pre>
 
 
 
</div>
 
 
 
</div>
 
 
 
</div>
 
<div id="Conformance" class="section">
 
 
 
== 문서의 적합성 ==
 
 
 
이 사양은 <span class="NS10">XML</span><span class="NS11">XML 1.1</span> 문서에 적용된다. 이 사양을 준수하기 위해서는 문서는 <span class="NS10">XML</span><span class="NS11">XML 1.1</span> 사양 <span class="NS10">[https://triple-underscore.github.io/xml-names-ja.html#_ref-XML [XML]]</span><span class="NS11">[https://triple-underscore.github.io/xml-names-ja.html#_ref-XML11 [XML11]]</span> 에 의거 정형식해야한다.
 
 
 
이 사양에 적합한 XML 문서에서 요소 이름 / 속성 이름 [https://triple-underscore.github.io/xml-names-ja.html#NT-QName <code>QName</code>]생성 규칙에 부합 돈까스 &quot;네임 스페이스 구속&quot;을 충족하여야한다. <span class="NS10">XML</span><span class="NS11">XML 1.1</span> 정형식이기 때문에 XML 생성 규칙 에 일치하는 것이 요구되는 문서의 다른 (요소 / 속성 이름이 아닌) 모든 토큰이 사양의 생성 규칙 에 따라야한다 . [https://www.w3.org/TR/REC-xml/#NT-Name <code>Name</code>] [https://www.w3.org/TR/xml11#NT-Name <code>Name</code>][https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]
 
 
 
정의 :이 사양에 적합한 문서는 이름 공간 정형식 인 것으로 알려졌다.
 
 
 
따라서, [https://triple-underscore.github.io/xml-names-ja.html#dt-nwf 이름 공간 정형식] 인 문서에서는 :
 
 
 
* 요소 이름 / 속성 이름은 0 개 또는 1 개의 콜론 ( &quot; <code>:</code>&quot;)를 포함한다.
 
* [실체 이름 / 처리 명령 대상 / 기법 이름은 콜론을 포함하지 않는다.
 
 
 
또한, [https://triple-underscore.github.io/xml-names-ja.html#dt-nwf 이름 공간 정형식] 되는 문서는 [https://triple-underscore.github.io/xml-names-ja.html#dt-nv 네임 스페이스에서 타당] 될 수있다.
 
 
 
<div class="p">
 
 
 
정의 : [https://triple-underscore.github.io/xml-names-ja.html#dt-nwf 이름 공간 정형식] 인 문서는 다음을 모두 충족한다면 네임 스페이스에서 타당 하다고된다 :
 
 
 
*<span class="NS10">XML</span><span class="NS11">XML 1.1</span> 에 근거하여 타당하다. <span class="NS10">XML</span><span class="NS11">XML 1.1</span> 에 준거 해 정형식으로되기 위해서는 문서의 요소 / 특성의 이름은 XML 생성 규칙 에 일치하는 것이 요구된다. [https://www.w3.org/TR/REC-xml/#NT-Name <code>Name</code>] [https://www.w3.org/TR/xml11#NT-Name <code>Name</code>]
 
* 문서의 토큰 중 요소 / 특성 이름을 제외한 모든이 사양의 생성 규칙 [https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]에 일치하고있다.
 
 
 
</div>
 
<div class="p">
 
 
 
따라서, [https://triple-underscore.github.io/xml-names-ja.html#dt-nv 네임 스페이스에서 타당] 문서에서는 다음과 같은 형식으로 선언 된 속성은 콜론을 포함하지 :
 
 
 
*<span class="dtd-type">ID</span>
 
*<span class="dtd-type">IDREF</span>
 
*<span class="dtd-type">IDREFS</span>
 
*<span class="dtd-type">ENTITY</span>
 
*<span class="dtd-type">ENTITIES</span>
 
*<span class="dtd-type">NOTATION</span>
 
 
 
</div>
 
 
 
</div>
 
<div id="ProcessorConformance" class="section">
 
 
 
== 처리 장치의 적합성 ==
 
 
 
<div>
 
 
 
이 사양에 부합하기 위해서는 처리 장치는 [https://triple-underscore.github.io/xml-names-ja.html#dt-nwf 이름 공간 정형식] 위반을보고하여야한다. 그러나 네임 스페이스가 <span class="NS10">URI 참조 [https://triple-underscore.github.io/xml-names-ja.html#_ref-RFC3986 [RFC3986]]</span> 인지 여부의 검사는 요구되지 않는다.
 
</div>
 
정의 :이 사양에 적합한 XML 유효성 검사에 대한 처리기 중 네임 스페이스 타당성에 대한 위반을보고하는 것에 대해 '''''네임 스페이스 검증 용 처리기''''' 한다.
 
</div>
 
<div id="_appendix" class="section">
 
 
 
== 부록 ==
 
 
 
''이 절의 각 하위 절은 규범이 아니다.''
 
 
 
<div id="Philosophy" class="section">
 
 
 
=== XML 네임 스페이스의 내부 구조 ===
 
 
 
이 부록은 삭제되었다.
 
</div>
 
<div id="changes" class="section">
 
 
 
=== 버전 1.0에서의 변경 사항 ===
 
 
 
이 버전은 2009 년 6 월 20 일 정오표 [https://triple-underscore.github.io/xml-names-ja.html#_ref-1.0-Errata [1.0-Errata]] [https://triple-underscore.github.io/xml-names-ja.html#_ref-1.0-2e-Errata [1.0-2e-Errata]] 가 통합되어있다.
 
 
 
더 일관성을 위해 몇 가지 어법의 변경이나 추가를 포함 편집상의 변경 사항이있다. 참고 부록 &quot;XML 네임 스페이스 내부 구조&quot;는 삭제되었다.
 
 
 
제 5 판을 포함하는 XML 1.0의 모든 버전과 일치하도록 BNF를 조정했다.
 
</div>
 
<div id="sec-xml-and-sgml" class="section">
 
 
 
=== 감사 ===
 
 
 
이 작업에는 많은 분들의 의견이 반영되어있다. 특히, W3C XML WG, Special Interest Group, W3C Metadata Activity 참가자들과 Microsoft의 Charles Frankston 씨에서 특히 귀중한 공헌에 감사한다.
 
 
 
 
 
</div>
 
<div id="orphans" class="section NS10">
 
 
 
=== 폐지 된 생성 규칙 ===
 
 
 
다음 2 개의 생성 규칙이 사양의 처음과 다음 버전에 있었지만 수정판이다. 더 이상 그들이 사용되는 것은 아니지만,이 사양 날짜가없는 버전에 대한 상호 참조 용으로 유지되고있다. <span class="trans-note">[이 뜻은 버전 1.0, 1.1의 중첩으로 인해 발생한 중복 id를 변경하고 있기 때문에 (변경은이 절에 한함)이 상호 참조가 작동하지 않습니다. ]</span>
 
 
 
<code>NCNameStartChar</code>정의에 원래 이용 된 XML 1.0의 <code>Letter</code>생성 규칙은 XML 1.0 제 5 판에서 이름 정의로 올바른 것은 없게되었으므로, <code>NCNameStartChar</code>생성 규칙은 XML 어떤 버전에 대해서도 올바른 결과를 얻을 수 있도록하기 위해 [https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]에 근거한 정의로 변경되었다.
 
 
 
; [5] <code>NCNameChar</code>
 
:[https://www.w3.org/TR/REC-xml/#NT-NameChar <code>NameChar</code>] - ':'
 
: ( &quot; <code>:</code>&quot;비 XML [https://www.w3.org/TR/REC-xml/#NT-NameChar <code>NameChar</code>]) <span lang="en" class="_en">/* An XML NameChar, minus the &quot;:&quot; */</span>
 
; [6] <code>NCNameStartChar</code>
 
:[https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]- ( *)[https://www.w3.org/TR/REC-xml/#NT-Char <code>Char</code>] [https://www.w3.org/TR/REC-xml/#NT-Char <code>Char</code>] [https://www.w3.org/TR/REC-xml/#NT-Char <code>Char</code>]
 
: ( [https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]첫 글자) <span lang="en" class="_en">/* The first letter of an NCName */</span>
 
 
 
Note : Production [https://triple-underscore.github.io/xml-names-ja.html#NT-NCNameStartChar-NS10 <code>NCNameStartChar</code>]takes advantage of the fact that a single-character [https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]is necessarily an [https://triple-underscore.github.io/xml-names-ja.html#NT-NCNameStartChar-NS10 <code>NCNameStartChar</code>], and works by subtracting from the set of [https://triple-underscore.github.io/xml-names-ja.html#NT-NCName <code>NCName</code>]s of all lengths the set of all strings of two or more characters, leaving only the NCNames which are one character long .
 
 
 
 
 
</div>
 
 
 
</div>
 
 
 
</div><div id="_references" class="section">
 
 
 
== 참조 문헌 ==
 
 
 
<div id="refs" class="section">
 
 
 
=== 참조 문헌 (규범) ===
 
 
 
; [RFC2119]
 
: [http://www.rfc-editor.org/rfc/rfc2119.txt 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]
 
: [http://www.rfc-editor.org/rfc/rfc2141.txt RFC 2141 : URN Syntax] , R. Moats, ed. IETF (Internet Engineering Task Force), May 1997. <span> Available at http://www.rfc-editor.org/rfc/rfc2141.txt. </span>
 
; [RFC3986]
 
: [http://www.rfc-editor.org/rfc/rfc3986.txt 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]
 
: [http://www.rfc-editor.org/rfc/rfc3629.txt 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]
 
: [http://www.rfc-editor.org/rfc/rfc3987.txt Internationalized Resource Identifiers (IRIs)], M. Duerst and M. Suignard eds. January 2005. Available at http://www.rfc-editor.org/rfc/rfc3987.txt.
 
; [XML]
 
: [http://www.w3.org/TR/REC-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 /.
 
: [http://www.w3.org/TR/2006/REC-xml-20060816/ 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]
 
: [http://www.w3.org/TR/2006/REC-xml11-20060816/ 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/.
 
 
 
 
 
</div>
 
<div id="nrefs" class="section">
 
 
 
=== 참고 문헌 (참고) ===
 
 
 
; [1.0-Errata]
 
: [http://www.w3.org/XML/xml-names-19990114-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]
 
: [http://www.w3.org/XML/2006/xml-names-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]
 
: [http://www.w3.org/XML/2004/xml-names11-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]
 
: [http://www.w3.org/2000/09/xppa 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]
 
: [http://www.w3.org/TR/2002/WD-xml-names11-req-20020403/ 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/.
 
 
 
 
 
 
</div>
 
</div>
  
 
</div>
 
</div>

2021년 7월 27일 (화) 02:42 판

개요

태그나 속성에 이름의 중복으로 인한 충돌을 방지하고자 네임스페이스를(일종의 접두사) 사용한다. 충돌방지를 위한 것이므로 고유한 값을 가지는 URI를 사용한다.

<tagName xlmns:prefix="URI">
<prefix: tagName> </prefix: tagName>

네임스페이스 접두사 edi 를 네임스페이스 이름과 연결하는 네임스페이스 선언의 예 http://ecommerce.example.org/schema:
<x xmlns:edi='http://ecommerce.example.org/schema'>
  <!-- "edi" prefix는 "x"의 엘리먼트와 컨텐츠에 대해서 http://ecommerce.example.org/schema에 바인딩 된다.-->
</x>

요소 이름으로 사용되는 규정된 이름의 예:
<!-- the 'price' element의 네임스페이스는 http://ecommerce.example.org/schema 이다.-->
<edi:price xmlns:edi='http://ecommerce.example.org/schema' units='Euro'>32.18</edi:price>
속성 이름으로 사용되는 규정된 이름의 예:
<x xmlns:edi='http://ecommerce.example.org/schema'>
  <!-- the 'taxClass' attribute의 네임스페이스는 http://ecommerce.example.org/schema이다. -->
  <lineItem edi:taxClass="exempt">Baby food</lineItem>
</x>

네임스페이스 범위

하위 태그에서 사용할 수 있다.
<?xml version="1.0"?>
<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>
다음의 예와 같이 단일 요소에 여러 네임 스페이스 접두사를 속성으로 선언 할 수있다 :
<?xml version="1.0"?>
<!-- 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>

둘러보기 메뉴