TAILIEUCHUNG - Ivor Horton’s Beginning Java 2, JDK 5 Edition phần 9

Dưới đây là bộ xử lý XML sẽ cung cấp một ứng dụng chỉ với môi trường giá trị cho thuộc tính độ dày. Nếu bạn đã chỉ định thuộc tính này cho các phần tử trong cơ thể của các tài liệu mà bạn có thể sử dụng chỉ có giá trị mặc định, nếu không, nó là một lỗi. | Java and XML An important aspect of defining possible attribute values by an enumeration like this is that an XML editor can help the author of a document by prompting with the list of possible attribute values from the DTD when the element is being created. An attribute that you declare as FIXED must always have the default value. For example ATTLIST circle color red blue green REQUIRED line_thickness medium FIXED Here the XML processor will supply an application only with the value medium for the thickness attribute. If you were to specify this attribute for the circle element in the body of the document you can use only the default value otherwise it is an error. Defining Parameter Entities You will often need to repeat a block of information in different places in a DTD. A parameter entity identifies a block of parsed text by a name that you can use to insert the text at various places within a DTD. Note that parameter entities are for use only within a DTD. You cannot use parameter entity references in the body of a document. You declare general entities in the DTD when you want to repeat text within the document body. The form for a parameter entity is very similar to what you saw for general entities except that a character appears between ENTITY and the entity name separated from both by a space. For example it is quite likely that you would want to repeat the x and y attributes that you defined in the position element in the previous section in other elements. You could define a parameter entity for these attributes and then use that wherever these attributes should appear in an element declaration. Here s the parameter entity declaration ENTITY coordinates x CDATA REQUIRED y CDATA REQUIRED Now you can use the entity name to insert the x and y attribute definitions in an attribute declaration ATTLIST position coordinates A parameter entity declaration must precede its use in a DTD. The substitution string in a parameter entity declaration is parsed and can

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.