Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

Mark V. Scardina, Ben ChangandJinyu Wang

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Best Practices

The following sections describe some best practices to follow when employing XSL and XSLT functionality. Simply put, these sections go over some common problems that you may encounter and explain how to solve them.


Tuning Tips for XSLT


Here are two tips for tuning XSLT. First, avoid unconstrained axes such as //foo because they cause the entire tree to be traversed. Second, if element whitespace is not needed by the transformed output, then <xsl:strip-space elements=“*”/> can be set in the stylesheet, dramatically reducing the size of the DOM tree built and thus improving the transformation performance. Note that when using <xsl:strip-space elements=“*”/>, a prebuilt DOM for the input XML document cannot be passed as a parameter to the XSLT processor. Instead, you need to pass in an URL or a text stream.


The document() Function in XSLT


This function is useful when the XSLT transformation needs data from multiple XML documents. In addition, when the XSLT output includes a large section of XML data, use the <xsl:copy> extension function to copy the XML document content returned from the document() function. Finally, when using the document() function in the XSL file, make sure that the setBaseURL() is correctly set; if it is not set, the XSL file will not be found by the XSLT processor.


Improving the Overall Performance ofXSLTforMultipleTransformations


In Oracle Database 10g, the Oracle XML Developer’s Kit provides an XSLT that is useful when you need to reuse XSL stylesheets for a large number of XSL transformations. It precompiles the XSL in binary format with optimizations for use in the XSL TVM. This greatly speeds up the overall XSL transformation, up to 200 percent, especially if you have large XSL stylesheets.

Using Java, you can also reuse the XSLStylesheet objects by prebuilding them and reusing them in the XSLProcessor.process() procedures. The Java XSLT processor also allows multiple processors in different threads to share the same XSL stylesheet, because it is threadsafe.

/ 218