TAILIEUCHUNG - Oracle XSQL- P17

Oracle XSQL- P17Welcome to the exciting world of eXtended Structured Query Language (XSQL) development! What’s so exciting? Efficiency and ease of use. XSQL isn’t some razzle-dazzle technology to wow your users. It also isn’t the latest X standard du jour that no one can stop talking about until you ask, “But what does it do for me today?” The problem with all of the great stuff out there is that no one technology does it all. | 300 Chapter 13 Unlike our previous examples you are now using a template element. This element must be defined at the top level a direct child of the root. For this reason all the HTML code should be included in a template. If you don t include all this code the XSLT processor won t find it. Generally a template that matches the root of your XSQL document includes scripts as well as a head section and any header and footer information The next example includes the remaining data from the query. Instead of a bulleted list the data is nicely formatted in a table. It also uses a call-template element to put a standard break wherever necessary. xml version xsl stylesheet version xmlns xsl http 1999 XSL Transform xsl template match page html head title Simple Stylesheet title head body h1 Simple Stylesheet h1 table border 0 th th th Name th th Job th th Salary th xsl apply-templates select ROWSET table body html xsl template xsl template match ROW tr td xsl apply-templates select @num td td xsl apply-templates select ENAME td td xsl apply-templates select JOB td td xsl apply-templates select SAL td xsl call-template name break tr xsl template xsl template name break tr td height 4 colspan 4 hr td tr xsl template xsl template match JOB SAL xsl apply-templates xsl template xsl template match ENAME b xsl apply-templates b xsl template xsl stylesheet XSLT In-Depth 301 Figure Output of stylesheet. The template produces the output seen in Figure . The JOB and SAL elements share a template while ENAME gets its own. The only named template break is referenced by xsl call-template. In practice xsl call-template is used in conjunction with parameters. Examples are found later in this chapter. Also notice that the num attribute from the ROW element is in our output. This was accomplished with xsl apply-templates select @num . Templates work against nodes not elements so you can use these template elements in conjunction with attributes. This example is

TỪ KHÓA LIÊN QUAN
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.