XML Validation
XML검증
XML with correct syntax is "Well Formed" XML.
올바른 구문의 XML은 "Well Formed" XML이라 부른다.
XML validated against a DTD is "Valid" XML.
DTD에 맞게 검증된 XML은 "Valid" XML이라 부른다.
Well Formed XML Documents
Well Formed XML 문서
A "Well Formed" XML document has correct XML syntax.
"Well Formed" XML 문서는 올바른 XML 구문을 가진다.
The syntax rules were described in the previous chapters:
구문 규칙은 이전 장에서 묘사되었다.
- XML documents must have a root element
- XML 문서는 루트 엘레먼트를 가져야 한다.
- XML elements must have a closing tag
- XML 엘레먼트는 닫는 태그를 가져야 한다.
- XML tags are case sensitive
- XML 태그들은 대소문자를 구별한다.
- XML elements must be properly nested
- XML 엘레먼트들은 적절히 포함되어야 한다.
- XML attribute values must be quoted
- XML 속성값들은 반드시 따옴표 안에 있어야 한다.
<?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> |
Valid XML Documents
XML 문서
A "Valid" XML document is a "Well Formed" XML document, which also conforms to the rules of a Document Type Definition (DTD):
"Valid" XML 문서는 DTD(문서 형태 정의)의 규칙을 따르는 "Well Formed" XML 문서다.
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE note SYSTEM "Note.dtd"> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> |
The DOCTYPE declaration in the example above, is a reference to an external DTD file. The content of the file is shown in the paragraph below.
위의 예제에서 DOCTYPE 선언은 외부 DTD 파일에 대한 참조이다. 파일의 내용은 밑의 글에 있다.
XML DTD
XML DTD
The purpose of a DTD is to define the structure of an XML document. It defines the structure with a list of legal elements:
DTD의 목적은 XML 문서의 구조를 정의하는 것이다. 이는 합법적인 엘레먼트의 목록의 구조를 정의한다.
<!DOCTYPE note [ <!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> ]> |
If you want to study DTD, you will find our DTD tutorial on our homepage.
만약 당신이 DTD를 공부하고 싶다면 우리 홈페이지에서 DTD 튜토리얼(설명서)을 찾을 수 있을 것이다.
XML Schema
XML 스키마
W3C supports an XML-based alternative to DTD, called XML Schema:
W3C는 DTD대신에 XML 스키마를 제공한다.
<xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:string"/> <xs:element name="from" type="xs:string"/> <xs:element name="heading" type="xs:string"/> <xs:element name="body" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> |
If you want to study XML Schema, you will find our Schema tutorial on our homepage.
만약 당신이 XML 스키마를 배우고 싶다면 우리 홈페이지에서 스키마 튜토리얼(설명서)을 찾을 수 있을 것이다.
A General XML Validator
일반적인 XML Validator(검증 프로그램)
To help you check the syntax of your XML files, we have created an XML validator to syntax-check your XML.
XML 파일의 구문을 검사하기 위해서 우리는 당신의 XML의 구문을 검사하는 XML validator(검증 프로그램)을 만들었다.
Please see the next chapter.
다음 장을 보아라.
Reference : http://www.w3schools.com/xml/xml_dtd.asp
'컴퓨터 공부 > 번역' 카테고리의 다른 글
COM관련 공부 (0) | 2009.06.04 |
---|---|
INADDR_ANY (0) | 2009.05.25 |
6. XML 속성 (0) | 2009.05.13 |
5. XML 엘레먼트 (0) | 2009.05.13 |
4. XML 구문 규칙 (0) | 2009.05.13 |