본문 바로가기
컴퓨터과학[2-1]/knou_[2-1]HtmlXml

HTML/XML XML Namespace 선언 및 취소

by boolean 2015. 4. 28.
728x90

XML Namespace 선언 및 취소

XML Namespace 선언 세가지 방법

  1. 
    <person xmlns="http://www.daum.net/pers"                             //person  디폴트 네임스페이스
                 xmlns:html="http://www.w3.org/1999/xhtml">
    <name>
    .........................
    </name>
    
    < html:html>
    < html:head>
    < html:title>Hello Namespace</html:title>
    </html:head>
    < html:body>
    Nice o meet you!
    </html:body>
    </html:html>
    
  2. 
    <pers:person xmlns="http://www.daum.net/pers"               //  pers:person
                 xmlns:html="http://www.w3.org/1999/xhtml">
    <pers:name>
    .........................
    </pers:name>
    
    < html:html>
    < html:head>
    < html:title>Hello Namespace</html:title>
    </html:head>
    < html:body>
    Nice o meet you!
    </html:body>
    </html:html>
    
  3. 
    <person xmlns="http://www.daum.net/pers">               //  person   디폴트 네임스페이스
                 
    <name>
    .........................
    </name>
    
    < html xmlns="htttp://www.w3.org/1999/xhtml">       //디폴트 네임스페이스
    Hello Namespace</html:title>
    </html:head>
    
    Nice o meet you!
    </html:body>
    </html:html>
    

<?xml version="1.0" encoding="UTF-8"?>
<person xmlns="http://www.daum.net/pers">
<!-- Root element default Namespace 루트 엘리먼트 네임스페이스 선언 URI는 단지 유일성을 강조하는 이름의 개념이다.-->
	<name>
	  <title>Sir</title>
	  <first>Kim</first>
	  <middle/>
	  <last>Hwa joong</last>
	</name>
	<position>Vice President of Marketing</position>
	<resume>
	< html xmlns="http://www.w3.org/1999/xhtml">           
	<!-- Child element default Namespace 자식 엘리먼트 네임스페이스 선언-->
	  <head>
	  <title>hello</title>
	  
                <style type="text/css">.another_category {
    border: 1px solid #E5E5E5;
    padding: 10px 10px 5px;
    margin: 10px 0;
    clear: both;
}

.another_category h4 {
    font-size: 12px !important;
    margin: 0 !important;
    border-bottom: 1px solid #E5E5E5 !important;
    padding: 2px 0 6px !important;
}

.another_category h4 a {
    font-weight: bold !important;
}

.another_category table {
    table-layout: fixed;
    border-collapse: collapse;
    width: 100% !important;
    margin-top: 10px !important;
}

* html .another_category table {
    width: auto !important;
}

*:first-child + html .another_category table {
    width: auto !important;
}

.another_category th, .another_category td {
    padding: 0 0 4px !important;
}

.another_category th {
    text-align: left;
    font-size: 12px !important;
    font-weight: normal;
    word-break: break-all;
    overflow: hidden;
    line-height: 1.5;
}

.another_category td {
    text-align: right;
    width: 80px;
    font-size: 11px;
}

.another_category th a {
    font-weight: normal;
    text-decoration: none;
    border: none !important;
}

.another_category th a.current {
    font-weight: bold;
    text-decoration: none !important;
    border-bottom: 1px solid !important;
}

.another_category th span {
    font-weight: normal;
    text-decoration: none;
    font: 10px Tahoma, Sans-serif;
    border: none !important;
}

.another_category_color_gray, .another_category_color_gray h4 {
    border-color: #E5E5E5 !important;
}

.another_category_color_gray * {
    color: #909090 !important;
}

.another_category_color_gray th a.current {
    border-color: #909090 !important;
}

.another_category_color_gray h4, .another_category_color_gray h4 a {
    color: #737373 !important;
}

.another_category_color_red, .another_category_color_red h4 {
    border-color: #F6D4D3 !important;
}

.another_category_color_red * {
    color: #E86869 !important;
}

.another_category_color_red th a.current {
    border-color: #E86869 !important;
}

.another_category_color_red h4, .another_category_color_red h4 a {
    color: #ED0908 !important;
}

.another_category_color_green, .another_category_color_green h4 {
    border-color: #CCE7C8 !important;
}

.another_category_color_green * {
    color: #64C05B !important;
}

.another_category_color_green th a.current {
    border-color: #64C05B !important;
}

.another_category_color_green h4, .another_category_color_green h4 a {
    color: #3EA731 !important;
}

.another_category_color_blue, .another_category_color_blue h4 {
    border-color: #C8DAF2 !important;
}

.another_category_color_blue * {
    color: #477FD6 !important;
}

.another_category_color_blue th a.current {
    border-color: #477FD6 !important;
}

.another_category_color_blue h4, .another_category_color_blue h4 a {
    color: #1960CA !important;
}

.another_category_color_violet, .another_category_color_violet h4 {
    border-color: #E1CEEC !important;
}

.another_category_color_violet * {
    color: #9D64C5 !important;
}

.another_category_color_violet th a.current {
    border-color: #9D64C5 !important;
}

.another_category_color_violet h4, .another_category_color_violet h4 a {
    color: #7E2CB5 !important;
}
</style>

                
                <link rel="stylesheet" type="text/css" href="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-e11b6cd63d67e948b9dd33a1d0a60492dd6a0cbf/static/style/revenue.css"/>
<link rel="canonical" href="https://booolean.tistory.com/249"/>

<!-- BEGIN STRUCTURED_DATA -->
<script type="application/ld+json">
    {"@context":"http://schema.org","@type":"BlogPosting","mainEntityOfPage":{"@id":"https://booolean.tistory.com/249","name":null},"url":"https://booolean.tistory.com/249","headline":"HTML/XML XML Namespace 선언 및 취소","description":"XML Namespace 선언 및 취소 XML Namespace 선언 세가지 방법 ......................... &lt; html:html&gt; &lt; html:head&gt; &lt; html:title&gt;Hello Namespace &lt; html:body&gt; Nice o meet you! ......................... &lt; html:html&gt; &lt; html:head&gt; &lt; html:title&gt;Hello Namespace &lt; html:body&gt; Nice o meet you! // person 디폴트 네임스페이스 ......................... &lt; html xmlns=&quot;htttp://www.w3.org/1999/xhtml&quot;&gt; //디폴트 네임스페이스 Hello Namespace Nice o m..","author":{"@type":"Person","name":"boolean","logo":null},"image":{"@type":"ImageObject","url":"https://img1.daumcdn.net/thumb/R800x0/?scode=mtistory2&fname=https%3A%2F%2Ft1.daumcdn.net%2Ftistory_admin%2Fstatic%2Fimages%2FopenGraph%2Fopengraph.png","width":"800px","height":"800px"},"datePublished":"2015-04-28T00:11:59+09:00","dateModified":"2015-04-30T00:18:14+09:00","publisher":{"@type":"Organization","name":"TISTORY","logo":{"@type":"ImageObject","url":"https://t1.daumcdn.net/tistory_admin/static/images/openGraph/opengraph.png","width":"800px","height":"800px"}}}
</script>
<!-- END STRUCTURED_DATA -->
<link rel="stylesheet" type="text/css" href="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-e11b6cd63d67e948b9dd33a1d0a60492dd6a0cbf/static/style/dialog.css"/>
<link rel="stylesheet" type="text/css" href="//t1.daumcdn.net/tistory_admin/www/style/top/font.css"/>
<link rel="stylesheet" type="text/css" href="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-e11b6cd63d67e948b9dd33a1d0a60492dd6a0cbf/static/style/postBtn.css"/>
<link rel="stylesheet" type="text/css" href="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-e11b6cd63d67e948b9dd33a1d0a60492dd6a0cbf/static/style/comment.css"/>
<link rel="stylesheet" type="text/css" href="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-e11b6cd63d67e948b9dd33a1d0a60492dd6a0cbf/static/style/tistory.css"/>
<script type="text/javascript" src="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-e11b6cd63d67e948b9dd33a1d0a60492dd6a0cbf/static/script/common.js"></script>
<script type="text/javascript" src="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-e11b6cd63d67e948b9dd33a1d0a60492dd6a0cbf/static/script/comment.js" defer=""></script>

                
                </head>
	  < body>
	  <h1>hello Kim</h1>
	  <p>Nice to meet you.<name>Kim</name></p>
	  <p>Nice to meet you.<name xmlns="">Kim</name></p>
	  <!-- Cancel default Namespace 디폴트 네임스페이스 취소-->
	  < /body>
          < /html>
	
	</resume>
</person>


댓글