SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Chuyên đề 1: TÌM HIỂU VỀ XML Chương 4 Lược đồ XML (XML Schema) Trường Đại học Nha Trang Khoa Công nghệ Thông tin
Nội dung ,[object Object],[object Object],[object Object]
XML Schema Definition (XSD)
XML Schema ,[object Object],[object Object],[object Object],[object Object],[object Object]
Lí do sử dụng XML Schema ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ví dụ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Schema và namespace ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tham chiếu đến một XML Schema ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Xây dựng lược đồ từ nhiều thành phần ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Khai báo phần tử trong XML Schema ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Khai báo phần tử trong XSD ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Khai báo phần tử trong XSD ,[object Object],[object Object],[object Object],[object Object]
Khai báo phần tử kiểu giản đơn
Kiểu giản đơn ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Định nghĩa một phần tử giản đơn ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ví dụ ,[object Object],[object Object],<lastname>Refsnes</lastname> <age>36</age> <dateborn>1970-03-27</dateborn>   < xs:element   name =&quot;lastname&quot;  type =&quot;xs:string&quot;/> < xs:element   name =&quot;age&quot;  type =&quot;xs:integer&quot;/> < xs:element   name =&quot;dateborn&quot;  type =&quot;xs:date&quot;/>
Giá trị mặc định và cố định ,[object Object],[object Object],[object Object],[object Object]
Khai báo thuộc tính trong XSD
Thuộc tính trong XSD ,[object Object],[object Object]
Khai báo thuộc tính ,[object Object],[object Object],[object Object],xs:boolean xs:date xs:time   xs:string  xs:decimal  xs:integer
Ví dụ ,[object Object],[object Object],[object Object],[object Object]
Khai báo loại thuộc tính ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Các loại ràng buộc
Ràng buộc nội dung  ,[object Object],[object Object]
Ràng buộc giá trị < xs:element  name=&quot;age&quot;> < xs:simpleType > < xs:restriction  base=&quot;xs:integer&quot;> <xs:minInclusive value=&quot;0&quot;/> <xs:maxInclusive value=&quot;120&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >  Kiểu miền con
Ràng buộc giá trị < xs:element   name=&quot;car&quot;> < xs:simpleType > < xs:restriction   base=&quot;xs:string&quot;> <xs:enumeration  value=&quot;Audi&quot;/> <xs:enumeration  value=&quot;Golf&quot;/> <xs:enumeration  value=&quot;BMW&quot;/> < /xs:restriction > < /xs:simpleType > </xs:element >  Kiểu liệt kê
Ràng buộc giá trị < xs:element  name=&quot;letter&quot;> < xs:simpleType > < xs:restriction  base=&quot;xs:string&quot;> <xs:pattern value=&quot;[a-z]&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >  < xs:element  name=&quot;initials&quot;> < xs:simpleType > < xs:restriction  base=&quot;xs:string&quot;> <xs:pattern value=&quot;[a-zA-Z][a-zA-Z][a-zA-Z]&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >  Pattern constraint
Ràng buộc giá trị < xs:element   name=&quot;letter&quot;> < xs:simpleType > < xs:restriction   base=&quot;xs:string&quot;> <xs:pattern  value=&quot;([a-z])*&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >  < xs:element  name=&quot;letter&quot;> < xs:simpleType > < xs:restriction   base=&quot;xs:string&quot;> <xs:pattern  value=&quot;([a-z][A-Z])+&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >
Ràng buộc giá trị < xs:element  name=&quot;gender&quot;> < xs:simpleType > < xs:restriction  base=&quot;xs:string&quot;> <xs:pattern value=&quot;male|female&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >  < xs:element  name=&quot;password&quot;> < xs:simpleType > < xs:restriction  base=&quot;xs:string&quot;> <xs:pattern value=&quot;[a-zA-Z0-9]{8}&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >
Ràng buộc về ký tự dấu cách ,[object Object],[object Object],[object Object],< xs:element  name=&quot;address&quot;> < xs:simpleType > < xs:restriction  base=&quot;xs:string&quot;> <xs:whiteSpace value=&quot;preserve&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >
Ràng buộc về độ dài < xs:element  name=&quot;password&quot;> < xs:simpleType > < xs:restriction  base=&quot;xs:string&quot;> <xs:length value=&quot;8&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >  < xs:element  name=&quot;password&quot;> < xs:simpleType > < xs:restriction  base=&quot;xs:string&quot;> <xs:minLength value=&quot;5&quot;/> <xs:maxLength value=&quot;8&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >
Bảng tóm lược Specifies how white space (line feeds, tabs, spaces, and carriage returns) is handled  whiteSpace   Specifies the exact number of digits allowed. Must be greater than zero  totalDigits   Defines the exact sequence of characters that are acceptable  pattern   Specifies the minimum number of characters or list items allowed. Must be equal to or greater than zero   minLength   Specifies the lower bounds for numeric values (the value must be greater than or equal to this value)   minInclusive   Specifies the lower bounds for numeric values (the value must be greater than this value)   minExclusive   Specifies the maximum number of characters or list items allowed. Must be equal to or greater than zero   maxLength   Specifies the upper bounds for numeric values (the value must be less than or equal to this value)   maxInclusive   Specifies the upper bounds for numeric values (the value must be less than this value)   maxExclusive   Specifies the exact number of characters or list items allowed. Must be equal to or greater than zero   length   Specifies the maximum number of decimal places allowed. Must be equal to or greater than zero   fractionDigits   Defines a list of acceptable values   enumeration   Description   Constraint
Khai báo phần tử kiểu phức hợp
Định nghĩa phần tử phức hợp ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ví dụ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Định nghĩa một phần tử phức hợp trong XSD ,[object Object],[object Object],<employee> <firstname>John</firstname> <lastname>Smith</lastname> </employee>
Định nghĩa một phần tử phức hợp trong XSD ,[object Object],< xs:element  name=&quot;employee&quot;> < xs:complexType > < xs:sequence > <xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/> <xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/> < /xs:sequence > < /xs:complexType > < /xs:element >
Định nghĩa một phần tử phức hợp trong XSD ,[object Object],< xs:element  name=&quot;employee&quot; type=&quot;personinfo&quot;/> < xs:complexType  name=&quot;personinfo&quot;> < xs:sequence > <xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/> <xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/> < /xs:sequence > < /xs:complexType >
Định nghĩa phần tử rỗng ,[object Object],< xs:element  name=&quot;product&quot; type=&quot;prodtype&quot;/> < xs:complexType  name=&quot;prodtype&quot;> < xs:attribute  name=&quot;prodid&quot; type=&quot;xs:positiveInteger&quot;/> < /xs:complexType >   < xs:element  name=&quot;product&quot;> < xs:complexType > < xs:attribute  name=&quot;prodid&quot; type=&quot;xs:positiveInteger&quot;/> < /xs:complexType > < /xs:element >
Định nghĩa phần tử chỉ chứa phần tử con  ,[object Object],[object Object],[object Object],[object Object],< xs:element  name=&quot;person&quot;> < xs:complexType > < xs:sequence > <xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/> <xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/> < /xs:sequence > < /xs:complexType > < /xs:element >

Weitere ähnliche Inhalte

Was ist angesagt?

lý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tánlý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tánNgo Trung
 
csdl - buoi2-3-4
csdl - buoi2-3-4csdl - buoi2-3-4
csdl - buoi2-3-4kikihoho
 
Phụ thuộc hàm và các dạng chuẩn - dhcntt
Phụ thuộc hàm và các dạng chuẩn - dhcnttPhụ thuộc hàm và các dạng chuẩn - dhcntt
Phụ thuộc hàm và các dạng chuẩn - dhcnttanhhuycan83
 
Bài 1 - Làm quen với C# - Lập trình winform
Bài 1 - Làm quen với C# - Lập trình winformBài 1 - Làm quen với C# - Lập trình winform
Bài 1 - Làm quen với C# - Lập trình winformMasterCode.vn
 
bảng tra phân phối chuẩn
bảng tra phân phối chuẩnbảng tra phân phối chuẩn
bảng tra phân phối chuẩnRuc Trương
 
Bai tap-thuc-hanh-he-quan-tri-csdl
Bai tap-thuc-hanh-he-quan-tri-csdlBai tap-thuc-hanh-he-quan-tri-csdl
Bai tap-thuc-hanh-he-quan-tri-csdlgiang nguyen le
 
Xây dựng cơ sở dữ liệu trong quản lý nhân sự
Xây dựng cơ sở dữ liệu trong quản lý nhân sựXây dựng cơ sở dữ liệu trong quản lý nhân sự
Xây dựng cơ sở dữ liệu trong quản lý nhân sựAskSock Ngô Quang Đạo
 
Chuong 3 xac_dinh_yeu_cau_he_thong, hệ thống
Chuong 3 xac_dinh_yeu_cau_he_thong, hệ thốngChuong 3 xac_dinh_yeu_cau_he_thong, hệ thống
Chuong 3 xac_dinh_yeu_cau_he_thong, hệ thốngKevin Trieu
 
Bài giảng kiến trúc máy tính
Bài giảng kiến trúc máy tínhBài giảng kiến trúc máy tính
Bài giảng kiến trúc máy tínhCao Toa
 
Bài 3: Xác định yêu cầu hệ thống & Phân tích quy trình xử lý nghiệp vụ - Giáo...
Bài 3: Xác định yêu cầu hệ thống & Phân tích quy trình xử lý nghiệp vụ - Giáo...Bài 3: Xác định yêu cầu hệ thống & Phân tích quy trình xử lý nghiệp vụ - Giáo...
Bài 3: Xác định yêu cầu hệ thống & Phân tích quy trình xử lý nghiệp vụ - Giáo...MasterCode.vn
 
Bài 5: Chuẩn hóa cơ sở dữ liệu
Bài 5: Chuẩn hóa cơ sở dữ liệuBài 5: Chuẩn hóa cơ sở dữ liệu
Bài 5: Chuẩn hóa cơ sở dữ liệuMasterCode.vn
 
Giao trinh-co-so-du-lieu
Giao trinh-co-so-du-lieuGiao trinh-co-so-du-lieu
Giao trinh-co-so-du-lieuAnh Ta
 
Mẫu báo cáo bài tập lớn
Mẫu báo cáo bài tập lớnMẫu báo cáo bài tập lớn
Mẫu báo cáo bài tập lớnJohn MacTavish
 
Toán rời rạc-Dành cho sinh viên,người thi cao học
Toán rời rạc-Dành cho sinh viên,người thi cao họcToán rời rạc-Dành cho sinh viên,người thi cao học
Toán rời rạc-Dành cho sinh viên,người thi cao họcducmanhkthd
 
Bài 3: Lập trình giao diện điều khiển & Xử lý sự kiện - Lập trình winform - G...
Bài 3: Lập trình giao diện điều khiển & Xử lý sự kiện - Lập trình winform - G...Bài 3: Lập trình giao diện điều khiển & Xử lý sự kiện - Lập trình winform - G...
Bài 3: Lập trình giao diện điều khiển & Xử lý sự kiện - Lập trình winform - G...MasterCode.vn
 
csdl - buoi1
csdl - buoi1csdl - buoi1
csdl - buoi1kikihoho
 
Bai tap va loi giai sql
Bai tap va loi giai sqlBai tap va loi giai sql
Bai tap va loi giai sql. .
 

Was ist angesagt? (20)

lý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tánlý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tán
 
csdl - buoi2-3-4
csdl - buoi2-3-4csdl - buoi2-3-4
csdl - buoi2-3-4
 
Phụ thuộc hàm và các dạng chuẩn - dhcntt
Phụ thuộc hàm và các dạng chuẩn - dhcnttPhụ thuộc hàm và các dạng chuẩn - dhcntt
Phụ thuộc hàm và các dạng chuẩn - dhcntt
 
Bài 1 - Làm quen với C# - Lập trình winform
Bài 1 - Làm quen với C# - Lập trình winformBài 1 - Làm quen với C# - Lập trình winform
Bài 1 - Làm quen với C# - Lập trình winform
 
bảng tra phân phối chuẩn
bảng tra phân phối chuẩnbảng tra phân phối chuẩn
bảng tra phân phối chuẩn
 
C2 2
C2 2C2 2
C2 2
 
Bai tap-thuc-hanh-he-quan-tri-csdl
Bai tap-thuc-hanh-he-quan-tri-csdlBai tap-thuc-hanh-he-quan-tri-csdl
Bai tap-thuc-hanh-he-quan-tri-csdl
 
Xây dựng cơ sở dữ liệu trong quản lý nhân sự
Xây dựng cơ sở dữ liệu trong quản lý nhân sựXây dựng cơ sở dữ liệu trong quản lý nhân sự
Xây dựng cơ sở dữ liệu trong quản lý nhân sự
 
Chuong 3 xac_dinh_yeu_cau_he_thong, hệ thống
Chuong 3 xac_dinh_yeu_cau_he_thong, hệ thốngChuong 3 xac_dinh_yeu_cau_he_thong, hệ thống
Chuong 3 xac_dinh_yeu_cau_he_thong, hệ thống
 
Bài giảng kiến trúc máy tính
Bài giảng kiến trúc máy tínhBài giảng kiến trúc máy tính
Bài giảng kiến trúc máy tính
 
Bài 3: Xác định yêu cầu hệ thống & Phân tích quy trình xử lý nghiệp vụ - Giáo...
Bài 3: Xác định yêu cầu hệ thống & Phân tích quy trình xử lý nghiệp vụ - Giáo...Bài 3: Xác định yêu cầu hệ thống & Phân tích quy trình xử lý nghiệp vụ - Giáo...
Bài 3: Xác định yêu cầu hệ thống & Phân tích quy trình xử lý nghiệp vụ - Giáo...
 
Bài 5: Chuẩn hóa cơ sở dữ liệu
Bài 5: Chuẩn hóa cơ sở dữ liệuBài 5: Chuẩn hóa cơ sở dữ liệu
Bài 5: Chuẩn hóa cơ sở dữ liệu
 
Giao trinh-co-so-du-lieu
Giao trinh-co-so-du-lieuGiao trinh-co-so-du-lieu
Giao trinh-co-so-du-lieu
 
Mẫu báo cáo bài tập lớn
Mẫu báo cáo bài tập lớnMẫu báo cáo bài tập lớn
Mẫu báo cáo bài tập lớn
 
Ktmt chuong 3
Ktmt chuong 3Ktmt chuong 3
Ktmt chuong 3
 
Toán rời rạc-Dành cho sinh viên,người thi cao học
Toán rời rạc-Dành cho sinh viên,người thi cao họcToán rời rạc-Dành cho sinh viên,người thi cao học
Toán rời rạc-Dành cho sinh viên,người thi cao học
 
Bài 3: Lập trình giao diện điều khiển & Xử lý sự kiện - Lập trình winform - G...
Bài 3: Lập trình giao diện điều khiển & Xử lý sự kiện - Lập trình winform - G...Bài 3: Lập trình giao diện điều khiển & Xử lý sự kiện - Lập trình winform - G...
Bài 3: Lập trình giao diện điều khiển & Xử lý sự kiện - Lập trình winform - G...
 
csdl - buoi1
csdl - buoi1csdl - buoi1
csdl - buoi1
 
Bai tap va loi giai sql
Bai tap va loi giai sqlBai tap va loi giai sql
Bai tap va loi giai sql
 
Luận văn: Xây dựng website quản lý nhà hàng, HOT
Luận văn: Xây dựng website quản lý nhà hàng, HOTLuận văn: Xây dựng website quản lý nhà hàng, HOT
Luận văn: Xây dựng website quản lý nhà hàng, HOT
 

Mehr von Bình Trọng Án

A Developer's Guide to CQRS Using .NET Core and MediatR
A Developer's Guide to CQRS Using .NET Core and MediatRA Developer's Guide to CQRS Using .NET Core and MediatR
A Developer's Guide to CQRS Using .NET Core and MediatRBình Trọng Án
 
Nếu con em vị nói lắp
Nếu con em vị nói lắpNếu con em vị nói lắp
Nếu con em vị nói lắpBình Trọng Án
 
Bài giảng chuyên đề - Lê Minh Hoàng
Bài giảng chuyên đề - Lê Minh HoàngBài giảng chuyên đề - Lê Minh Hoàng
Bài giảng chuyên đề - Lê Minh HoàngBình Trọng Án
 
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ định
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ địnhCác câu chuyện toán học - Tập 3: Khẳng định trong phủ định
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ địnhBình Trọng Án
 
2816 mcsa--part-11--domain-c111ntroller--join-domain-1
2816 mcsa--part-11--domain-c111ntroller--join-domain-12816 mcsa--part-11--domain-c111ntroller--join-domain-1
2816 mcsa--part-11--domain-c111ntroller--join-domain-1Bình Trọng Án
 
Tỷ lệ vàng - một phát hiện vĩ đại của hình học
Tỷ lệ vàng - một phát hiện vĩ đại của hình họcTỷ lệ vàng - một phát hiện vĩ đại của hình học
Tỷ lệ vàng - một phát hiện vĩ đại của hình họcBình Trọng Án
 
Attributes & .NET components
Attributes & .NET componentsAttributes & .NET components
Attributes & .NET componentsBình Trọng Án
 
Sách chữa tật nói lắp Version 1.0 beta
Sách chữa tật nói lắp Version 1.0 betaSách chữa tật nói lắp Version 1.0 beta
Sách chữa tật nói lắp Version 1.0 betaBình Trọng Án
 
Displaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLDisplaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLBình Trọng Án
 

Mehr von Bình Trọng Án (20)

A Developer's Guide to CQRS Using .NET Core and MediatR
A Developer's Guide to CQRS Using .NET Core and MediatRA Developer's Guide to CQRS Using .NET Core and MediatR
A Developer's Guide to CQRS Using .NET Core and MediatR
 
Nếu con em vị nói lắp
Nếu con em vị nói lắpNếu con em vị nói lắp
Nếu con em vị nói lắp
 
Bài giảng chuyên đề - Lê Minh Hoàng
Bài giảng chuyên đề - Lê Minh HoàngBài giảng chuyên đề - Lê Minh Hoàng
Bài giảng chuyên đề - Lê Minh Hoàng
 
Tìm hiểu về NodeJs
Tìm hiểu về NodeJsTìm hiểu về NodeJs
Tìm hiểu về NodeJs
 
Clean code-v2.2
Clean code-v2.2Clean code-v2.2
Clean code-v2.2
 
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ định
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ địnhCác câu chuyện toán học - Tập 3: Khẳng định trong phủ định
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ định
 
Luyện dịch Việt Anh
Luyện dịch Việt AnhLuyện dịch Việt Anh
Luyện dịch Việt Anh
 
2816 mcsa--part-11--domain-c111ntroller--join-domain-1
2816 mcsa--part-11--domain-c111ntroller--join-domain-12816 mcsa--part-11--domain-c111ntroller--join-domain-1
2816 mcsa--part-11--domain-c111ntroller--join-domain-1
 
LinQ to XML
LinQ to XMLLinQ to XML
LinQ to XML
 
Chuyên đề group policy
Chuyên đề group policyChuyên đề group policy
Chuyên đề group policy
 
Tỷ lệ vàng - một phát hiện vĩ đại của hình học
Tỷ lệ vàng - một phát hiện vĩ đại của hình họcTỷ lệ vàng - một phát hiện vĩ đại của hình học
Tỷ lệ vàng - một phát hiện vĩ đại của hình học
 
Attributes & .NET components
Attributes & .NET componentsAttributes & .NET components
Attributes & .NET components
 
Ajax Control ToolKit
Ajax Control ToolKitAjax Control ToolKit
Ajax Control ToolKit
 
Linq intro
Linq introLinq intro
Linq intro
 
Sách chữa tật nói lắp Version 1.0 beta
Sách chữa tật nói lắp Version 1.0 betaSách chữa tật nói lắp Version 1.0 beta
Sách chữa tật nói lắp Version 1.0 beta
 
Mô hình 3 lớp
Mô hình 3 lớpMô hình 3 lớp
Mô hình 3 lớp
 
Xsd examples
Xsd examplesXsd examples
Xsd examples
 
Displaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLDisplaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSL
 
Tp2
Tp2Tp2
Tp2
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 

Chapter 4 xml schema

  • 1. Chuyên đề 1: TÌM HIỂU VỀ XML Chương 4 Lược đồ XML (XML Schema) Trường Đại học Nha Trang Khoa Công nghệ Thông tin
  • 2.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Khai báo phần tử kiểu giản đơn
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. Khai báo thuộc tính trong XSD
  • 19.
  • 20.
  • 21.
  • 22.
  • 24.
  • 25. Ràng buộc giá trị < xs:element name=&quot;age&quot;> < xs:simpleType > < xs:restriction base=&quot;xs:integer&quot;> <xs:minInclusive value=&quot;0&quot;/> <xs:maxInclusive value=&quot;120&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element > Kiểu miền con
  • 26. Ràng buộc giá trị < xs:element name=&quot;car&quot;> < xs:simpleType > < xs:restriction base=&quot;xs:string&quot;> <xs:enumeration value=&quot;Audi&quot;/> <xs:enumeration value=&quot;Golf&quot;/> <xs:enumeration value=&quot;BMW&quot;/> < /xs:restriction > < /xs:simpleType > </xs:element > Kiểu liệt kê
  • 27. Ràng buộc giá trị < xs:element name=&quot;letter&quot;> < xs:simpleType > < xs:restriction base=&quot;xs:string&quot;> <xs:pattern value=&quot;[a-z]&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element > < xs:element name=&quot;initials&quot;> < xs:simpleType > < xs:restriction base=&quot;xs:string&quot;> <xs:pattern value=&quot;[a-zA-Z][a-zA-Z][a-zA-Z]&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element > Pattern constraint
  • 28. Ràng buộc giá trị < xs:element name=&quot;letter&quot;> < xs:simpleType > < xs:restriction base=&quot;xs:string&quot;> <xs:pattern value=&quot;([a-z])*&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element > < xs:element name=&quot;letter&quot;> < xs:simpleType > < xs:restriction base=&quot;xs:string&quot;> <xs:pattern value=&quot;([a-z][A-Z])+&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >
  • 29. Ràng buộc giá trị < xs:element name=&quot;gender&quot;> < xs:simpleType > < xs:restriction base=&quot;xs:string&quot;> <xs:pattern value=&quot;male|female&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element > < xs:element name=&quot;password&quot;> < xs:simpleType > < xs:restriction base=&quot;xs:string&quot;> <xs:pattern value=&quot;[a-zA-Z0-9]{8}&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >
  • 30.
  • 31. Ràng buộc về độ dài < xs:element name=&quot;password&quot;> < xs:simpleType > < xs:restriction base=&quot;xs:string&quot;> <xs:length value=&quot;8&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element > < xs:element name=&quot;password&quot;> < xs:simpleType > < xs:restriction base=&quot;xs:string&quot;> <xs:minLength value=&quot;5&quot;/> <xs:maxLength value=&quot;8&quot;/> < /xs:restriction > < /xs:simpleType > < /xs:element >
  • 32. Bảng tóm lược Specifies how white space (line feeds, tabs, spaces, and carriage returns) is handled whiteSpace Specifies the exact number of digits allowed. Must be greater than zero totalDigits Defines the exact sequence of characters that are acceptable pattern Specifies the minimum number of characters or list items allowed. Must be equal to or greater than zero minLength Specifies the lower bounds for numeric values (the value must be greater than or equal to this value) minInclusive Specifies the lower bounds for numeric values (the value must be greater than this value) minExclusive Specifies the maximum number of characters or list items allowed. Must be equal to or greater than zero maxLength Specifies the upper bounds for numeric values (the value must be less than or equal to this value) maxInclusive Specifies the upper bounds for numeric values (the value must be less than this value) maxExclusive Specifies the exact number of characters or list items allowed. Must be equal to or greater than zero length Specifies the maximum number of decimal places allowed. Must be equal to or greater than zero fractionDigits Defines a list of acceptable values enumeration Description Constraint
  • 33. Khai báo phần tử kiểu phức hợp
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.