tailieunhanh - Learning XML phần 9

Quy tắc là một yếu tố XML được gọi là có nội dung là các yếu tố và dữ liệu sẽ tạo thành kết quả cây con. Trong trường hợp này, kết quả là một tập tin HTML hoàn chỉnh. Ví dụ này là Đầu ra của nó là một tập tin HTML: quy tắc mẫu đầu tiên của tôi | Learning XML XSLT and the lang function XSLT also pays attention to language. In Chapter 6 we discussed Boolean functions and their roles in conditional template rules. One important function is lang whose value is true if the current node s language is the same as that of the argument. Consider the following template rule xsl template match para xsl choose xsl when test lang de h1 ACHTUNG h1 xsl apply-templates if xsl otherwise h1 ATTENTION h1 xsl apply-templates xsl otherwise xsl template The XSLT template rule outputs the word ACHTUNG if the language is de or ATTENTION otherwise. Let s apply this rule to the following input tree warning xml lang de para Bitte kein rauchen. para warning The para inherits its language property from the warning that contains it and the first choice in the template rule will be used. page 214 Learning XML Chapter 8. Programming for XML Let s face it. You can t always wait around for somebody to create the perfect software for your needs there will come a time when you have to roll up your sleeves and build it yourself. But rather than attempting to teach you everything about writing programs for XML the intent of this chapter is to provide an introduction to programming technologies that let you get the most out of XML. We ll keep the discussion short and general to allow you to choose the best way to go and leave the details to other authors. There is no best programming language or style to use. There are many ways to skin a potato 16 and that applies to programming. Some people prefer to do everything in Perl the duct tape of the Internet while others like to code in Java preferring its more packaged and orderly philosophy. Even if programmers can t agree on one venue for coding at least there is XML support for most common programming languages used today. Again the choice of tools is up to you this chapter focuses on theory. We first discuss XML parsing and processing in general terms outlining the pros and cons of .

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