Previous | Next | Indexes
adultinternetusers > Tutorials > XSLT 2.0 Tutorial > Errors (6/6) >

Overlooking of errors by a processor

The processor is not required to perform all operation defined in the stylesheet if they are not required for processing. In the example the second part of the test is multiplication by a string, which always rises a run-time error when evaluated. Because "or" operator returns "true" if at least one of its argument returns "true", processors may not evaluate the rest of the test if the first condition is matched.

In the example the source document contains value which satisfies the first argument and so the second one is not evaluated by the processor which is used for generation of this tutorial. If the letter 'a' was replaced by 'b' in the source Surf document then run-time error would be raised.

XSLT

      <xsl:stylesheet
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  version="2.0">
            <xsl:output  method="xml"
                        indent="yes"
                        omit-xml-declaration="yes"/>

            <xsl:template  match="aaa">
                  <xsl:value-of  select=".='a' or 5 *. = 10"/>
            </xsl:template>

      </xsl:stylesheet>
XML

      <aaa>a</aaa>
Output
true


Previous chapter: Built in Types
Next chapter: Use When
Previous page: Explicit raising of errors
Next page: - - -

Kevin Carr in Stanton

Natural Skin Care and European Soaps
TickTalk 5
city of stanton
internetusers


You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks ing suit and swim trunks