xslt cookbook phần 9

Tôi nghĩ mọi người đều cần phải có một áo lót wonderbra. Có rất nhiều cách để tăng cường cho chúng, tất cả mọi người không. -Lập trình Christina Aguilera Thực sự đầy tham vọng không bao giờ hài lòng với những gì họ được đưa ra và ám ảnh hướng để tăng cường những gì họ có. | Chapter 12. Extending and Embedding XSLT I think everybody should have a great Wonderbra. There s so many ways to enhance them everybody does it. Christina Aguilera Truly ambitious programmers are never satisfied with what they are given and are obsessively driven to enhance what they have. I say ambitious rather than great because greatness in my opinion comes from knowing when it is wiser to work within the system versus when it is best to extend the system. Nevertheless this chapter is dedicated to extending the system both from the perspective of XSLT needing functionality best implemented in another language and from the perspective of other languages needing XSLT. Extending XSLT is by definition a facility on the fringes of the specification. Extensions decrease the portability of the XSLT script. This is definitely a hazard when you use extensions provided natively by your XSLT processor or when implementing your own extension. It is true even if you implement your extensions in a highly portable language like Java. The most obvious reason is that some XSLT processors are not written in Java and are thus unlikely ever to support Java-based extensions. However even if you only want your extensions to work in Java-based XSLT processors you might still find that the extension mechanism of XSLT was not fully standardized in Version . This state of affairs improved in Version but is no longer an official XSLT release and many processors do not support it. Surprisingly XSLT does not promise any standardization with respect to extensions. Extensibility in XSLT The current XSLT Working Draft http TR xslt20 has this to say about extensions This specification does not define any mechanism for creating or binding implementations of extension instructions or extension functions and does not require that implementations support any such mechanism. Such mechanisms if they exist are implementation-defined. Therefore an XSLT stylesheet that

Bấm vào đây để xem trước nội dung