True/False
Indicate whether the sentence or statement is true
or false.
|
|
|
1.
|
You
cannot use the position() function in conditional statements.
|
|
|
2.
|
The
values of the position() function are determined by the order in which the nodes are processed in the
result document.
|
|
|
3.
|
The
values in the position() function are based on the order of nodes in the source
document.
|
|
|
4.
|
You
are not limited to counting only one type of item with the <xsl:number> element.
|
|
|
5.
|
XSLT
allows you to number items that may appear at different levels.
|
|
|
6.
|
XPath
does not support functions to manipulate text strings.
|
|
|
7.
|
If an
object is not specified in the string() function, the function returns the string value of the
context node.
|
|
|
8.
|
The
XPath text string functions can be used in predicates to extract nodes whose text values match a
particular pattern.
|
|
|
9.
|
If
you plan to create an international document, you may need to support the numbering schemes of other
countries.
|
|
|
10.
|
Because the <xsl:decimal-format> element defines behavior for the entire
document, it must be placed within a template and cannot be entered as a direct child of the
<xsl:stylesheet> element.
|
|
|
11.
|
The
&nbs; entity is supported by XSLT.
|
|
|
12.
|
XSLT
variables act like variables in other programming languages.
|
|
|
13.
|
Variable names cannot start with a number and they are not case
sensitive.
|
|
|
14.
|
Storing code in result tree fragments can result in style sheets that are easier to
maintain and revise.
|
|
|
15.
|
You
cannot use the <xsl:value-of> element to reference the result tree fragment because the XSLT
processor converts the data type of the variable from a result tree fragment to a Boolean value, a
number, or a text string.
|
|
|
16.
|
Because local variables are referenced anywhere in the style sheet, each must have a
unique variable name.
|
|
|
17.
|
You
cannot assign a local variable a name if you have already assigned that name to a global
variable.
|
|
|
18.
|
The
value of a parameter cannot be changed after it is declared.
|
|
|
19.
|
The
value of the parameter can be set outside its scope.
|
|
|
20.
|
A
local parameter can have its value set from another template within the style sheet
file.
|
|
|
21.
|
The
ability to set the parameters value from outside the style sheet depends upon which XSLT
processor is being used and the type of Web server.
|
|
|
22.
|
When
passing a parameter value, you must make sure that the value of the name attribute in the
<xsl:with-param> element matches the name of the template parameter.
|
|
|
23.
|
The
<xsl:call-template> element cannot be contained within another template.
|
|
|
24.
|
XPath
does not include a minimum or maximum function, but you can create your own using a recursive
template.
|
|
|
25.
|
When
template names clash, the XSLT processor uses whichever template is defined first in the combined
sheet.
|
|
|
26.
|
There
is no limit to how many style sheets can be included in a single document.
|
|
|
27.
|
XPath
does not provide a function to generate random numbers, but JavaScript does with its Math.random()
function.
|
|
|
28.
|
An
extension supported by the saxon XSLT processor allows variable values to be changed on the
fly.
|
|
|
29.
|
Like
extension functions, you can test whether your processor supports a particular extension or
attribute, using the function
element-available(extension).
|
Modified True/False
Indicate
whether the sentence or statement is true or false. If false, change the identified word or
phrase to make the sentence or statement true.
|
|
|
30.
|
To
display the position of the current node as it appears in the result document, use the XSLT
function: position(). _________________________
|
|
|
31.
|
The
any attribute value of <xsl:number> allows you to produce hierarchical sequence numbers
to indicate the position of the element within the node tree. _________________________
|
|
|
32.
|
To
use the multiple attribute value with <xsl:number>, you need to use the count attribute
to indicate which elements in the source document are part of the hierarchy from which you want to
count. _________________________
|
|
|
33.
|
There
is seldom a need to restart the number list when the level attribute is equal to multiple
because the nodes being numbered are siblings. _________________________
|
|
|
34.
|
In
the <xsl:number> element, the grouping-separator attribute defines the number of digits
in each group of numbers. _________________________
|
|
|
35.
|
The
contains(string1, string2) XPath text string function returns the value true if string1
contains the test string, string2, and false if otherwise. _________________________
|
|
|
36.
|
The
number format symbol is a placeholder that is usually used as the rightmost symbol in the
number format. _________________________
|
|
|
37.
|
The
% number symbol multiplies the number by 100 and displays the number as a percentage.
_________________________
|
|
|
38.
|
With
the <xsl:decimal-format> element, if you omit a(n) grouping separator, the numbering
scheme becomes the default format for the document. _________________________
|
|
|
39.
|
The
copy of the current node in the source document created by the <xsl:copy> element is called
a(n) deep node. _________________________
|
|
|
40.
|
A(n)
shallow copy of a selected node includes all descendants of that node.
_________________________
|
|
|
41.
|
The
<xsl:copy-of> element is used with result tree fragments in most cases.
_________________________
|
|
|
42.
|
To
create local variable, the variable must be declared at the top level of the style sheet, as a
direct child of the <xsl:stylesheet> element. _________________________
|
|
|
|
|
|
43.
|
The
figure above shows the use of recursion in a function. _________________________
|
|
|
44.
|
The
only element that <xsl:call-template> can contain is the <xsl:if> element.
_________________________
|
|
|
45.
|
Extension elements extend the list of elements that can be used in an XSLT
style sheet. _________________________
|
|
|
46.
|
A
community of XSLT developers is working on an initiative to create a standard collection of extension
elements and extension functions called URI. _________________________
|
|
|
47.
|
Some
XSLT processors support extensions to the XSLT and XPath languages.
_________________________
|
|
|
48.
|
Different XSLT processors and versions of the same processor support different
extensions. _________________________
|
Multiple Choice
Identify the
letter of the choice that best completes the statement or answers the question.
|
|
|
49.
|
The
____ function creates a subset of nodes that occupy a particular position in the node
tree. a. | subset() | b. | position() | c. | create() | d. | makeset() | | |
|
|
|
50.
|
Which
of the following returns the position of the current node in the result document? a. | <xsl:value-of
select=location() /> | b. | <xsl:value-of select=position()
/> | c. | <xsl:value-of select=where()
/> | d. | <xsl:value-of select=current()
/> | | |
|
|
|
51.
|
To
display the position of the current node as it appears in the source document, use the XSLT element:
____. a. | <xsl:position
/> | b. | <xsl:location /> | c. | <xsl:number
/> | d. | <xsl:where /> | | |
|
|
|
52.
|
The
position() function returns the ____ position of the context node. a. | integer | b. | binary | c. | unary | d. | decimal | | |
|
|
|
53.
|
The
____ attribute of the number element can be used to specify any XPath expression that evaluates to a
number. a. | integer | b. | decimal | c. | value | d. | number | | |
|
|
|
54.
|
Which
of the following expressions counts elements named either A or
B? a. | <xsl:number
sum=A | B> | b. | <xsl:number count=A |
B> | c. | <xsl:number tally=A |
B> | d. | <xsl:number ID=A |
B> | | |
|
|
|
55.
|
What
is the default type in the <xsl:number> element? a. | any | b. | multiple | c. | index | d. | single | | |
|
|
|
56.
|
The
____ type of the <xsl:number> element numbers items with its siblings. a. | single | b. | multiple | c. | index | d. | any | | |
|
|
|
57.
|
The
____ type of the <xsl:number> element numbers items across levels. a. | any | b. | multiple | c. | index | d. | single | | |
|
|
|
58.
|
The
____ type of the <xsl:number> element displays numbers in a hierarchical
format. a. | multiple | b. | any | c. | index | d. | single | | |
|
|
|
59.
|
To
ignore the effect of different levels and the presence or absence of siblings, you can use the ____
attribute. a. | index | b. | multiple | c. | any | d. | single | | |
|
|
|
60.
|
Which
of the following attribute values of the <xsl:number> element is particularly useful with legal
documents where sections are numbered hierarchically? a. | any | b. | index | c. | multiple | d. | single | | |
|
|
|
61.
|
To
use the ____ attribute value of the <xsl:number> element, you need to indicate which elements
in the source document are part of the hierarchy from which you want to count. a. | index | b. | any | c. | multiple | d. | single | | |
|
|
|
62.
|
Typically, the from attribute is used with the <xsl:number> element when the
level attribute is set to either ____. a. | any or single | b. | any or
multiple | c. | index or single | d. | index or
multiple | | |
|
|
|
63.
|
With
the <xsl:number> element, the format list type value of ____ is used to create a list of
integers.
|
|
|
64.
|
With
the <xsl:number> element, the format list type value of ____ is used to create an alphabetical
list of lowercase characters.
|
|
|
65.
|
With
the <xsl:number> element, the format list type value of ____ is used to create an alphabetical
list of uppercase characters.
|
|
|
66.
|
With
the <xsl:number> element, the format list type value of ____ is used to create a list of
lowercase Roman numerals.
|
|
|
67.
|
With
the <xsl:number> element, the format list type value of ____ is used to create a list of
uppercase Roman numerals.
|
|
|
68.
|
The
default grouping-size attribute in the <xsl:number> element is ____.
|
|
|
69.
|
What
is the default grouping separator for the <xsl:number> element? a. | period | b. | comma | c. | apostrophe | d. | ampersand | | |
|
|
|
70.
|
The
style <xsl:number format=1 grouping-size=2 grouping-separator=
/> displays the number 548710 as ____. a. | 548 710 | b. | 54 87
10 | c. | 5 4 87 1
0 | d. | 5487
10 | | |
|
|
|
71.
|
With
the <xsl:number> element, the ____ attribute specifies the language to be used by the XSLT
processor. a. | language | b. | letter | c. | linguistic | d. | lang | | |
|
|
|
|
|
|
72.
|
Which
of these elements generates the table shown in the figure above? a. | <xsl:number
value=position() format=i) /> | b. | <xsl:number
value=position() format=A) /> | c. | <xsl:number
value=position() format=I) /> | d. | <xsl:number
value=position() format=1) /> | | |
|
|
|
73.
|
The
XPath numeric function ____ rounds the value number up to the nearest integer. a. | ceiling(number) | b. | round(number) | c. | up(number) | d. | height(number) | | |
|
|
|
74.
|
The
XPath numeric function ____ counts the number of nodes in node_set. a. | sum(node_set) | b. | count(node_set) | c. | tally(node_set) | d. | total(node_set) | | |
|
|
|
75.
|
The
XPath numeric function ____ rounds the value number down to the nearest integer. a. | down(number) | b. | floor(number) | c. | round(number) | d. | count(number) | | |
|
|
|
76.
|
The
XPath numeric function ____ returns the index of the last node in node_set. a. | end(node_set) | b. | final(node_set) | c. | position(node_set, 0) | d. | last(node_set) | | |
|
|
|
77.
|
The
XPath numeric function ____ rounds the value number to the nearest integer. a. | round(number) | b. | near(integer) | c. | int(number) | d. | balance(number) | | |
|
|
|
78.
|
The
XPath numeric function ____ calculates the sum of the values of node_set. a. | sum(node_set) | b. | total(node_set) | c. | count(node_set) | d. | calculate(node_set) | | |
|
|
|
79.
|
The
____ symbol causes the XSLT processor to navigate the entire node tree, searching for matching
nodes.
|
|
|
80.
|
The
XPath text string function ____ returns the value true if string1 begins with the characters defined
in string2 and false if otherwise. a. | begin(string1, string2) | b. | open(string1,
string2) | c. | origin(string1, string2) | d. | starts-with(string1, string2) | | |
|
|
|
81.
|
The
function substring-before(C101 C102 C103 C104, ) returns the text string:
____. a. | C101 | b. | C101 C102 C103 C104 | c. |
| d. | C102 | | |
|
|
|
82.
|
The
____ operator in XPath provides the remainder after performing a division of one number by
another.
|
|
|
83.
|
Which
of the following symbols serves as a placeholder that displays an optional number of digits in the
formatted number?
|
|
|
84.
|
Which
of the following symbols separates the pattern for positive numbers from the pattern for negative
numbers?
|
|
|
85.
|
The
pattern format-number(56823.847, #,##0.00) displays the number ____. a. | 56,823.85 | b. | 56,823.847 | c. | 56823.847 | d. | 5,6823.85 | | |
|
|
|
86.
|
The
expression format-number(-238.2, #,##0.0;(#,##0.0)) displays the number -238.2 as
____. a. | (238.20) | b. | (238.2) | c. | -238.2 | d. | (-238.2) | | |
|
|
|
87.
|
The
expression format-number(152.25, $#,##0.00) displays the number 152.25 as
____. a. | $152.2 | b. | $152.30 | c. | $152.25 | d. | $1,522.5 | | |
|
|
|
88.
|
The
____ attribute of the <xsl:decimal-format> element is a character used to indicate a required
digit in the number format pattern. a. | zero-digit | b. | pattern-separator | c. | required-digit | d. | NAN | | |
|
|
|
89.
|
The
HTML code to create a cell that covers several table rows is ____. a. | <td
rowspan=value> | b. | <th rpowspan=value> | c. | <tr
rowspan=value> | d. | <tc rowspan=value> | | |
|
|
|
90.
|
In
HTML, you cant display two adjacent blank spaces without inserting the ____
entity. a. | 
 | b. | &nbs; | c. | 
 | d. | 	 | | |
|
|
|
91.
|
The
____ entity inserts a new line into your document. a. | 
 | b. | &nbs; | c. | 
 | d. | 	 | | |
|
|
|
92.
|
To
create a variable named Company that stores the text string WizardWorks, use
the code: ____. a. | <xsl:variable
ID=Company store=WizardWorks /> | b. | <xsl:variable
term=Company hold=WizardWorks /> | c. | <xsl:variable
key=Company save=WizardWorks /> | d. | <xsl:variable
name=Company select=WizardWorks /> | | |
|
|
|
93.
|
A
____ variable can be referenced from anywhere within a style sheet. a. | local | b. | global | c. | universal | d. | Boolean | | |
|
|
|
94.
|
A
____ variable can be referenced only within the template in which it is declared. a. | global | b. | local | c. | resident | d. | Boolean | | |
|
|
|
|
|
|
95.
|
What
is the value of the Group variable in the figure above? a. | @CID,
B | b. | [starts-with(@CID, B)] | c. | Customers/Customer | d. | Customers/Customer [starts-with(@CID,
B)] | | |
|
|
|
96.
|
Currently, ____ does not support setting parameter values from outside the style
sheet. a. | XML
Spy | b. | saxon | c. | MSXML | d. | All of the
above | | |
|
|
|
97.
|
A
____ template needs to have a stopping condition, usually expressed in an if statement or a choose
statement that tells the processor under what conditions to stop the process. a. | conditional | b. | modal | c. | logical | d. | recursive | | |
|
|
|
98.
|
Which
of the following XSLT processors support the math.min() function? a. | saxon | b. | libxslt | c. | jd.xslt | d. | All of the above | | |
|
Completion
Complete each sentence or
statement.
|
|
|
99.
|
Space
that is devoid of any printable character is called ____________________ space.
|
|
|
100.
|
A(n)
____________________ is a user-defined name that stores a particular value or object.
|
|
|
101.
|
To
store a(n) ____________________ value in a variable, the select attribute must contain an expression
whose value is either true or false.
|
|
|
102.
|
The
syntax for creating a(n) ____________________ fragment is: | | <xsl:variable
name=name> | | | | | XSLT elements
and literal result elements | | | </xsl:variable> | | | | | |
|
|
|
103.
|
A(n)
____________________ fragment is often used to store long sections of code that the style sheet
author wants to repeat throughout the source document.
|
|
|
104.
|
Rather than searching through a long style sheet for the code, result tree fragments
allow code samples to be placed at the top of the document, stored in
____________________.
|
|
|
105.
|
To
display a result tree fragment, you create a(n) ____________________.
|
|
|
106.
|
When
you copy the current node in the source document but without the descendants of that node, its
what known as a(n) ____________________ copy.
|
|
|
107.
|
A(n)
____________________ copy of a selected node includes all descendants of that node.
|
|
|
108.
|
The
area where a variable can be referenced in known as the variables
____________________.
|
|
|
109.
|
A(n)
____________________ variable is a variable with global scope.
|
|
|
110.
|
A
variable that is declared within a template is known as a(n) ____________________
variable.
|
|
|
111.
|
____________________ are similar to variables but differ in that they can be changed
after they are declared.
|
|
|
112.
|
Parameters that are local in scope are known as ____________________
parameters.
|
|
|
113.
|
The
code | | total_cost =
0 | | | | for each item in
the order | | | | | total_cost = price * quantity + total_cost | | | next item | | | | | |
is an example of
a program ____________________, which repeats a section of code for each item in the
order.
|
|
|
114.
|
XSLT
is a(n) ____________________ programming language that relies on the evaluation of functions and
expressions, rather than the sequential execution of commands.
|
|
|
115.
|
____________________ is the process by which a function calls itself.
|
|
|
116.
|
____________________ templates are templates that call themselves, usually passing
along a new parameter value with each call.
|
|
|
117.
|
A(n)
____________________ template is a collection of functions and commands that are accessed from other
templates in the style sheet.
|
Matching
|
|
|
Identify the letter of the choice that best matches the phrase or
definition. a. | <xsl:number> | e. | format-number(value, format) | b. | single | f. | normalize-space() | c. | any | g. | variable | d. | multiple | h. | parameter | | | | |
|
|
|
118.
|
Numbering-level value that displays numbers in a hierarchical format
|
|
|
119.
|
User-defined name that stores a particular value or object
|
|
|
120.
|
Its
value can be changed outside after it is declared
|
|
|
121.
|
Numbering-level value that numbers items across levels
|
|
|
122.
|
Function used to remove any leading or trailing spaces from a text
string
|
|
|
123.
|
XPath
function used to control how the processor displays numbers
|
|
|
124.
|
Element used to display the position of the current node as it appears in the source
document
|
|
|
125.
|
Numbering-level value that numbers items with their siblings
|