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

Type errors

Type errors occur when a value submitted to an operation is not permitted for this operation.

XSLT

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

            <xsl:template  match="/aaa">
                  <xsl:apply-templates  select="(1,2,3)"/>
                  <xsl:value-of  select="'a' + 'b'"/>
                  <xsl:variable  name="a"
                              select="2.34"
                              as="sch:integer"/>
                  <xsl:value-of  select="$a"/>
            </xsl:template>

      </xsl:stylesheet>
XML

      <aaa/>
Output

Error:


error - XTTE0520
Required item type of @select attribute of xsl:apply-templates is node(); supplied value has item type xs:integer

error - XPTY0004
Unsuitable operands for arithmetic operation (xs:string, xs:string)

error - XTTE0570
Required item type of value of variable $a is xs:integer; supplied value has item type xs:decimal


Failed to compile stylesheet. 3 errors detected.


Previous chapter: Built in Types
Next chapter: Use When
Previous page: Static errors
Next page: Dynamic errors

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