TAILIEUCHUNG - Pro PHP XML and Web Services phần 2

chẳng hạn như trong bảng liệt kê 3-26, là một hình thức của nhóm. Đây là một nhóm địa phương giấu tên. Nhóm cũng có thể là sự lựa chọn hoặc tất cả. Trình tự A, như bạn đã biết, có nghĩa là các yếu tố phải xuất hiện trong đó trình tự chính xác. Một sự lựa chọn có nghĩa là một số lượng nhất định được xác định bởi thuộc tính maxOccurs | 78 CHAPTER 3 VALIDATION same thing. For instance the element rue is the same as the element street. Based on these declarations the following two documents are both valid address name street address adresse nom rue adresse Element Groups The sequence element you have seen used earlier in the chapter such as within Listing 3-26 is a form of grouping. It is an unnamed local group. Groups may also be choice or all. A sequence as you already know means the elements must appear in that exact sequence. A choice means that a certain number determined by the maxOccurs and minOccurs attributes which both default to 1 may be selected. Using all allows the elements to appear in any order although all the elements must be present within the content of a parent element. When you create named groups you can share them so you don t need to define local groups. You can just reference the named group. Take the case of an address. A document may have a shipping address as well as a billing address. In most cases the elements required are the same. You could create a named group and share between the two as follows xsd group name Address xsd sequence xsd element name street xsd element name city xsd element name state xsd element name zipcode xsd sequence xsd group xsd element name BillingAddress xsd sequence xsd group ref Address xsd sequence xsd element xsd element name ShippingAddress xsd sequence xsd element name attention type xsd string xsd group ref Address xsd sequence xsd element CHAPTER 3 VALIDATION 79 The xsd group element is laid out similarly to the xsd element elements. Notice within the xsd sequence elements for the element declarations that the xsd group element does not include a name attribute but rather a ref attribute. This attribute instructs the XML Schema to reference the group named Address. The ShippingAddress declaration also shows how you can use a group as well as declare additional elements. Attributes I ve shown only simple attribute declarations up .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.