TAILIEUCHUNG - Essential xml Quick Reference PHẦN 4

Ví dụ này tạo ra một thuộc tính với một tên năng động, giá trị của phần tử fnameLabel trong tài liệu nguồn. Ví dụ này tạo ra các tài liệu tương tự như ví dụ trước. Tự động xác định tên thuộc tính Mô tả thuộc tính thiết lập định nghĩa một tập hợp có tên của các thuộc tính có thể được tái sử dụng trên nhiều yếu tố. các | 104 Essential XML Quick Reference name first Billy last Bob employee Generating attributes with attribute value templates xsl template match employee i id concat lname - fname xmlns i urn ids-r-us format-x name first fname last lname employee xsl template This example generates the same document as the previous example. Dynamically specifying attribute names xsl template match employee name xsl attribute name labels fnameLabel xsl value-of select fname xsl attribute name employee xsl template This example generates an attribute with a dynamic name the value of the fnameLabel element in the source document. attribute-set xsl attribute-set name qname use-attribute-sets qnames -- Content xsl attribute -- xsl attribute-set XSL Transformations 105 Description attribute-set defines a named set of attributes that can be reused across multiple elements. The content of attribute-set consists of zero or more attribute elements that specify the attributes in the set. The contained attribute templates are instantiated each time the attribute-set is used on an element using the same current node that was used to instantiate the element itself. attribute-sets are used by element through the useattribute-sets attribute see element for more details . They may also be used on literal resulting elements through the xsl use-attribute-sets global attribute. Attributes Name Default Description name use-attribute-sets required The name of the attribute-set A whitespace-separated list of other attribute-set names that are to be added to the beginning of this new set XSLT Example Using attribute-set xsl attribute-set name nameAtts xsl attribute name first xsl value-of select fname xsl attribute xsl attribute name last xsl value-of select lname xsl attribute xsl attribute-set xsl template match employees xsl for-each select emp xsl element name employee use-attribute-sets nameAtts xsl attribute mi xsl value-of select middle xsl attribute xsl element 106 Essential XML Quick .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
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.