tailieunhanh - Pro PHP XML and Web Services phần 6

Một nút thành phần được xử lý thông qua việc tạo ra các một thẻ bắt đầu bằng cách sử dụng QName của các phần tử, chế biến của bất kỳ không gian tên và các thuộc tính các nút, và chế biến của bất kỳ nút con và một thẻ kết thúc cho các phần tử. Tôi sẽ không giải thích ngữ nghĩa của thế hệ này bởi vì các phần mở rộng PHP xử lý thế hệ thực tế của hình thức tuần tự. | 454 CHAPTER 12 XML SECURITY Element Node An element node is processed through the creation of a start tag using the QName of the element the processing of any namespace and attributes nodes and the processing of any child nodes and an end tag for the element. I will not explain the semantics of this generation because the PHP extensions actually handle the actual generation of the serialized form. rip In canonical form element nodes must always have a starting and ending tag. Empty tags are not allowed. You must write element as element element . One point I would like to mention though concerns using empty namespace declarations. Within a document you can use them to indicate that an element is not in any namespace. Typically however this is used only when within a default namespace and indicates that nodes within the current scope are not within a default namespace. For example element1 xmlns http element2 element3 xmlns element3 element2 element1 The element node elementl sets the default namespace to http . This namespace is automatically inherited by element2. The element3 node removes the default namespace by setting xmlns so that any element falling within the children of element3 would not be in any namespace unless otherwise set by one of those node. With respect to canonical form only elements that would otherwise be in a default namespace can set an empty namespace. So based on this rule the following is invalid -- The following is invalid -- element1 xmlns element2 element2 element1 The node element1 is not within a default namespace so cannot define an empty default namespace in canonical form. In canonical form it looks like this element1 element2 element2 element1 Namespace Node Namespace nodes are processed only if they are not in scope based on the same prefix and name-spaceURI of an ancestor element also within the node set. Consider the following document CHAPTER 12 XML SECURITY 455 element1 xmlns a http .

crossorigin="anonymous">
Đã 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.