TAILIEUCHUNG - Introducing XSLT

XML là một cách tuyệt vời để đại diện cho dữ liệu trong một định dạng xách tay, nhưng XML không chứa thông tin về định dạng dữ liệu như thế nào để hiển thị. Các Extensible Stylesheet Language Transformation (XSLT) cho phép bạn kiểm soát các định dạng của dữ liệu XML, và có thể được sử dụng để chuyển đổi dữ liệu XML để định dạng thích hợp để hiển thị nó như là một tài liệu. An XSL stylesheet-còn được gọi là một tập tin XSLT-là một mẫu có chứa các quy tắc mô tả làm thế. | Introducing XSLT XML is a great way to represent data in a portable format but XML doesn t contain information on how to format that data for display. The Extensible Stylesheet Language Transformation XSLT allows you to control the formatting of XML data and may be used to transform XML data to a format suitable for displaying it as a document. An XSL stylesheet-also known as an XSLT file-is a template that contains the rules that describe how the data in the XML file is to be formatted for viewing. The XML and XSLT files are processed together by an XSLT processor. The rules defined in the XSLT file are applied to the data in the XML file and the final result is output by the XSLT processor. Microsoft Internet Explorer contains an XSLT processor and you ll see examples in this section that display the results of processing an XML and XSLT file in Internet Explorer. Note Internet Explorer actually comes with a default XSLT file which causes XML files to use different colors for the parts of the XML document and to be displayed with and - icons to expand and collapse nested XML data. Listing shows an example XSLT file named which you ll find in the xml directory. Later you ll see how to apply this XLST file to an XML file containing customer data. xml version xsl stylesheet xmlns xsl http 1999 XSL Transform version xsl template match HTML HEAD TITLE Customers TITLE HEAD BODY xsl for-each select NorthwindCustomers Customers p b Customer b br xsl value-of select CustomerID br br xsl value-of select CompanyName br br xsl value-of select PostalCode br br xsl value-of select Country br br xsl value-of select Phone br p xsl for-each BODY HTML xsl template xsl stylesheet As you can see the file contains HTML tags and xsl tags. The xsl tags are instructions that indicate how XML is to be transformed. You can reference this XSLT

Đã 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.