Define the term scope, and describe the role of scope in the creation of XSLT style sheets, including an explanation the implication of a variable's possible scope.
What will be an ideal response?
The locations in the style sheet where a variable can be referenced are known as the variable's scope. The scope is determined by where the variable is defined. In general, a variable can only be referenced within the element in which it is defined. Variables are said to have either global or local scope.?A variable with global scope, also known as a global variable, can be referenced from anywhere within a style sheet. To create a global variable, the
A variable that is created within an element, such as a template, is known as a local variable, has local scope, and can be referenced only within that element or template. Unlike global variables, local variables can share the same variable name if they are declared in different elements or templates. You can also assign the same name to a global variable and a local variable. In this case, an XSLT processor uses the local variable within the element in which it is defined and the global variable anyplace else it is referenced. Even though the same variable name can be used in the situation just described, it is best practice to give each variable a unique name, regardless of whether it is a global or a local variable, in order to avoid confusion.??
You might also like to view...
The ________ enables you to change the magnification of the document or worksheet
Fill in the blank(s) with correct word
A ____ is a space-saving pointing device embedded in the keyboard of a notebook computer that you can push up, down, or sideways.
A. TrackPoint B. trackpad C. touchpad D. trackball
A(n) ________ is reserved area for text or graphics that displays at the bottom of each page of a document
Fill in the blank(s) with correct word
When you ________ a selection, the selection is removed from the original location and is placed in the Clipboard
Fill in the blank(s) with correct word