tailieunhanh - Teach Yourself J2EE in 21 Days phần 8

Liệt kê 17,11 mang lại cùng một số tính năng của stylesheets đã được mô tả trước đó. Các quy định tại dòng 3 phù hợp với một yếu tố , và các khách hàng và các thuộc tính tài liệu tham khảo được đưa vào sản xuất tại dòng 4. Tại dòng 5, mô tả thành phần công việc của con là đầu ra trong đoạn riêng của mình, | 766 Day 17 Listing Continued 14 TR TD xsl value-of select name TD TD xsl value-of select . TD TR 15 xsl template 16 xsl stylesheet Listing brings together several features of stylesheets that have been described previously. The rule at line 3 matches a job element and the customer and reference attributes are inserted into the output at line 4. At line 5 the job description child element is output in its own paragraph and the skill and location children are output inside an HTML table at lines 6 and 8. In line 6 the HTML table border attribute is enclosed in quotes so that it is valid XML the same is also true for line 10 and the colspan attribute . Line 12 uses one rule to match the location or skill elements. Finally the name of the selected node is inserted into the output stream using the name function in line 13. Figure shows the result of applying the stylesheet from Listing to the file. Figure The XML to HTML table transformation. XSL supports significantly more complex transformation rules than those shown so far. The next section will provide an overview of some of the additional XSL features. Transforming XML Documents 767 Using Stylesheet Elements XSL defines about twenty elements for transforming XML documents. So far you have seen the basic xsl template element for defining template rules and the xsl apply-templates and xsl value-of rules for including data in the output document. Many transformations can be defined just using these three elements. However some of the more complex requirements need additional support from XSL. Processing Whitespace and Text By default an XSL transformation retains the whitespace in the original document. This may not be required for the following reasons The whitespace is generally ignored when processing the output. Users browsing the transformed document may find the whitespace misleading or annoying. Some output document formats may be whitespace sensitive so the .

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.