Previous | Next | Indexes
adultinternetusers > Tutorials > XSLT 2.0 Tutorial > Variables and Parameters (9/14) >

Circular definitions

A circular definitions occur in documents if a value of variable is dependent on its own value. These definitions can occur in global variables and other more advanced XSLT constructs, but not in local variables. In local variables we would get different error - variable not declared - if we try to achieve circularity.

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:variable  name="xxx"
                        select="$yyy + 5"/>
            <xsl:variable  name="yyy"
                        select="$zzz + 5"/>
            <xsl:variable  name="zzz"
                        select="$xxx + 5"/>

            <xsl:template  match="/aaa">
                  <xsl:value-of  select="$xxx"/>
            </xsl:template>

      </xsl:stylesheet>
XML

      <aaa/>
Output

Error:


error - XTDE0640
Circular definition of variable xxx


Transformation failed: Run-time errors were reported


Previous chapter: Named-Templates
Next chapter: Stylesheet Functions
Previous page: Storing parts of Surf document to a variable
Next page: Sending parameters to templates

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