Deck 7: Creating Element Groups

Full screen (f)
exit full mode
Question
Templates with no mode attribute are applied to the specified node set.
Use Space or
up arrow
down arrow
to flip the card.
Question
The first step in using extensions is to define an extension's namespace within the root element.
Question
In a step pattern, to go in a different direction from the context node you change the node-test value.
Question
You can use the generate-id() function to create links for specific locations within a web page.
Question
In a predicate, the expressions are resolved relative to the context node.
Question
The key() function cannot be used with data from external documents.
Question
The node-test part of the step pattern specifies the direction the XSLT processor should move.
Question
Keys can be thought of as generalized IDs, without their limitations.
Question
All IDs belong to the same index, even if they are associated with different attributes.
Question
When an XSLT processor encounters two templates with the same name, it uses the last one defined in the style sheet.
Question
To create a template for a particular node, include the mode attribute in the opening tag.
Question
To reverse a node set, you use the XPath reverse() function.
Question
The default value for the axis portion of the step pattern is self .
Question
Traditional IDs, such as Social Security numbers or ISBNs, are commonly declared as ID attributes in DTDs.
Question
A DTD provides a way to uniquely identify a particular item in the source document.
Question
You can support processors that do not recognize an extension element or attribute by using the fallback element.
Question
A community of XSLT developers created a standard collection of extension elements and extension functions called EXSLT .
Question
Generated IDs are useful when the link has to reference an external page or website, but not for hypertext links within a single page.
Question
IDs can be associated only with elements .
Question
Keys are declared in the style sheet, not in the DTD of the source document.
Question
The _____ attribute provides a way to uniquely identify a particular item in the source document.

A) title
B) unique
C) ID
D) object
Question
When two templates can be applied to the same node set, you distinguish them by adding the _____ attribute within the tag.

A) mode
B) node
C) distinct
D) name
Question
The syntax for declaring a required ID attribute is _____.

A)
B)
C)
D)
Question
In a step pattern, the _____ specifies the direction in which the processor should move through the node tree.

A) predicate
B) node test
C) axis
D) template
Question
To declare an ID attribute as optional in the source document's DTD, use the expression _____.

A)
B)
C)
D)
Question
<strong>  The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image D?</strong> A) descendant B) child C) following D) following-sibling <div style=padding-top: 35px>
The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image D?

A) descendant
B) child
C) following
D) following-sibling
Question
If you designate one node set as $n1 and the other as $n2 , the expression: generate-id($n1) = generate-id($n2) returns a value of _____ if the node set referenced by $n1 is the same as the node set referenced by $n2 .

A) false
B) union
C) true
D) implied
Question
<strong>  The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image A?</strong> A) ancestor-or-self B) ancestor C) preceding D) preceding-sibling <div style=padding-top: 35px>
The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image A?

A) ancestor-or-self
B) ancestor
C) preceding
D) preceding-sibling
Question
<strong>  The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image G?</strong> A) following B) descendant C) following-sibling D) preceding-sibling <div style=padding-top: 35px>
The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image G?

A) following
B) descendant
C) following-sibling
D) preceding-sibling
Question
In the generate-id() function, if you omit the node set argument, the function _____.

A) is applied to the current context node
B) is applied to the root node
C) is applied to all nodes
D) returns an error
Question
The XML processor creates a(n) _____ that matches each element to a specific ID.

A) index
B) library
C) path
D) attribute
Question
Once you generate the list of unique values, you can use the _____ element to write code to the result document for each unique value.

A) namespace
B) stylesheet
C) apply-templates
D) template
Question
The general syntax of a step pattern is _____.

A) axis::predicate[node-test]
B) axis[node-test::predicate]
C) axis::node-test[predicate]
D) axis[predicate::node-test]
Question
ID attributes must be valid XML names and, therefore, they cannot contain _____ or begin with numbers.

A) spaces
B) underscores
C) capital letters
D) mixed case letters
Question
The _____ function returns a node-set that matches a specified value from a key index.

A) index()
B) key()
C) return()
D) id()
Question
To generate an ID that identifies a specific node or node set within the source document, XPath provides the _____ function.

A) create-id()
B) set-id()
C) generate-id()
D) node-id()
Question
<strong>  The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image J?</strong> A) preceding-sibling B) preceding C) ancestor D) following-sibling <div style=padding-top: 35px>
The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image J?

A) preceding-sibling
B) preceding
C) ancestor
D) following-sibling
Question
In a step pattern, the _____ defines properties of the node to be matched.

A) node test
B) predicate
C) axis
D) template
Question
The abbreviated form of the step pattern self::node() is _____.

A) )
B) ).
C) )./
D) /
Question
<strong>  The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image F?</strong> A) following-sibling B) descendant C) ancestor D) following <div style=padding-top: 35px>
The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image F?

A) following-sibling
B) descendant
C) ancestor
D) following
Question
Keys have _____ as well as values, allowing the style sheet author to create multiple distinct keys rather than rely on a single index.

A) names
B) namespaces
C) IDs
D) attributes
Question
In XPath 1.0, you cannot use the document() function or variables in a key element's _____ attribute.

A) use
B) name
C) match
D) select
Question
The following expression uses a _____ key() function to return the count of all property elements from the city of Longmont: count(key("cityNames", "Longmont") ) .

A) compound
B) recursive
C) nested
D) complex
Question
The _____ step to employ Muenchian grouping is to add the following expression to the select attribute of a for-each or an apply-templates element: node set[generate-id() =generate-id(key(name,expression) [1]) ] .

A) first
B) second
C) third
D) fourth
Question
The key value itself does not have to be entered explicitly; it can also be inserted as a(n) _____ to a node in the source document.

A) pointer
B) reference
C) extension
D) ancestor
Question
To create a key, add the key element at the top level of the style sheet as a child of the _____ element.

A) xml
B) stylesheet
C) root
D) output
Question
Many XSLT processors support extension _____ that extend the data types associated with XSLT attributes.

A) functions
B) elements
C) attributes
D) attribute values
Question
The first step in using extensions is to define an extension's namespace within the _____ element.

A) root
B) stylesheet
C) template
D) output
Question
The expression to select the first property element from the city of Longmont is _____.

A) key("cityNames", "Longmont") [1]
B) key("cityNames", "Longmont") [0]
C) key("Longmont", "cityNames") [1]
D) key("Longmont", "cityNames") [0]
Question
The _____ math extension functions in EXSLT calculates the nodes with the lowest value in node-set .

A) math.lowest( node-set )
B) math.min( node-set )
C) math.floor( node-set )
D) math.bottom( node-set )
Question
When a processor encounters an extension element it does not recognize, it searches inside of that element for the _____ element.

A) fallback
B) else
C) default
D) catch
Question
The _____ step to employ Muenchian grouping is to create a key for the element or attribute that you want to group using the key element.

A) first
B) second
C) third
D) fourth
Question
If you want to use keys with an external document, you have to first change the _____ node so that it points to a location path within that document.

A) root
B) target
C) parent
D) context
Question
The _____ attribute tells the XSLT processor which prefixes to regard as prefixes for extensions.

A) prefixes
B) extension-prefixes
C) extension-element-prefixes
D) xmlns
Question
The key() function can also be used with a(n) _____ to select a specific node from a node set.

A) ID
B) index
C) predicate
D) DTD
Question
You can test whether a processor supports a particular extension element or attribute using the _____ function

A) element-available()
B) available()
C) test-element()
D) element-check()
Question
If you find it difficult to work with recursive templates, you can instead create loops in Saxon using the _____ extension.

A) loop
B) while
C) for-each
D) do-until
Question
You can have your processor test whether it supports a particular extension function using the _____ function.

A) function-available()
B) available()
C) test-function()
D) function-check()
Question
The _____ step to employ Muenchian grouping is to reference the group value using expression  where expression is the element or attribute used to group the node set.

A) first
B) second
C) third
D) fourth
Question
Keys are declared in the _____.

A) DTD
B) source document
C) namespace
D) style sheet
Question
_____ are location paths that allow the processor to move freely around the node tree in any direction.
Question
<strong>  Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance. Now that the candidatesDoc variable has been created, Craig would like to define a key named cKey based on the values of the candidateID attribute for the candidate. Which of the following do you tell him shows the correct syntax to use to define this key?</strong> A) <xsl:key name=cKey match=candidate use=@candidateID /> B) <xsl:key name=cKey match=candidate select=@candidateID /> C) <xsl:key name=cKey match=candidate use=candidateID /> D) <xsl:key name=cKey match=candidate select=candidateID /> <div style=padding-top: 35px>
Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance.
Now that the candidatesDoc variable has been created, Craig would like to define a key named cKey based on the values of the candidateID attribute for the candidate. Which of the following do you tell him shows the correct syntax to use to define this key?

A)
B)
C)
D)
Question
<strong>  Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an expression to show only those orders that have a preceding sibling containing the same orderDate . Which of the following do you tell her is the correct expression?</strong> A) orderDate=preceding::order/orderDate B) not(orderDate=preceding::order/orderDate) C) orderDate=ancestor::order/orderDate D) not(orderDate=ancestor::order/orderDate) <div style=padding-top: 35px>
Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
Sandra would like to write an expression to show only those orders that have a preceding sibling containing the same orderDate . Which of the following do you tell her is the correct expression?

A) orderDate=preceding::order/orderDate
B) not(orderDate=preceding::order/orderDate)
C) orderDate=ancestor::order/orderDate
D) not(orderDate=ancestor::order/orderDate)
Question
The _____ function returns a node set based on IDs defined in the document's DTD.
Question
_____ is the processor used by Internet Explorer.

A) IEXML
B) MSXSLT
C) MSXML
D) IEXSLT
Question
The _____ is an index based on a node specified in the match attribute using the values from a node specified in the use attribute.
Question
<strong>  Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an abbreviated expression to select the parent of the current context node. Which of the following do you tell her is the correct abbreviated expression?</strong> A) ) B) ). C) )./ D) * <div style=padding-top: 35px>
Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
Sandra would like to write an abbreviated expression to select the parent of the current context node. Which of the following do you tell her is the correct abbreviated expression?

A) )
B) ).
C) )./
D) *
Question
_____ is a programming technique in which nodes are grouped based on unique values taken from a key index matched to unique IDs created by the generate-id() function.
Question
Ancestor nodes have the same relation to parent nodes that _____ nodes have to child nodes.
Question
The _____ function returns a node-set that matches a specified value from a key index.
Question
<strong>  Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance. Craig would like to be able to use data from both documents in his application. You suggest he create variables that will allow him to pull the node sets from both files. Which of the following shows the correct syntax to create a variable named candidatesDoc to reference the root node of the candidates.xml file?</strong> A) <xsl:variable name=candidatesDoc match=document() 'candidates.xml')  /> B) <xsl:variable name=candidatesDoc select=doc('candidates.xml')  /> C) <xsl:variable name=candidatesDoc match=doc('candidates.xml')  /> D) <xsl:variable name=candidatesDoc select=document() 'candidates.xml')  /> <div style=padding-top: 35px>
Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance.
Craig would like to be able to use data from both documents in his application. You suggest he create variables that will allow him to pull the node sets from both files. Which of the following shows the correct syntax to create a variable named candidatesDoc to reference the root node of the candidates.xml file?

A)
B)
C)
D)
Question
<strong>  Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an expression to create a node set of all the items elements. Which of the following do you tell her is the correct expression?</strong> A) orders::order/items B) items=order/items C) orders/order[items] D) orders::order/@items <div style=padding-top: 35px>
Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
Sandra would like to write an expression to create a node set of all the items elements. Which of the following do you tell her is the correct expression?

A) orders::order/items
B) items=order/items
C) orders/order[items]
D) orders::order/@items
Question
<strong>  Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance. Now that the precinctNames key has been declared, Craig would like to use it to return a count of all votes from the precinct of Ceylon. Which of the following functions do you suggest he use to do this?</strong> A) count(key=precinctNames select=Ceylon) B) count(key(precinctNames, Ceylon) ) C) count::precinctNames//Ceylon D) key(precinctNames, count(Ceylon) ) <div style=padding-top: 35px>
Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance.
Now that the precinctNames key has been declared, Craig would like to use it to return a count of all votes from the precinct of Ceylon. Which of the following functions do you suggest he use to do this?

A) count(key="precinctNames" select="Ceylon")
B) count(key("precinctNames", "Ceylon") )
C) count::precinctNames//"Ceylon"
D) key("precinctNames", count("Ceylon") )
Question
<strong>  Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an expression to select the third order element that follows the context node as a sibling. Which of the following do you tell her is the correct expression?</strong> A) sibling::order[3] B) following::order[3] C) sibling-or-self::order[3] D) following-sibling::order[3] <div style=padding-top: 35px>
Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
Sandra would like to write an expression to select the third order element that follows the context node as a sibling. Which of the following do you tell her is the correct expression?

A) sibling::order[3]
B) following::order[3]
C) sibling-or-self::order[3]
D) following-sibling::order[3]
Question
<strong>  Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance. Craig used the code you suggested to create the cKey key. However, he says he encountering problems when he tries to use this key to actually display data from the candidates.xml external file using the key. You explain to him that he will have to explicitly change the context node to the root element of the candidates.xml file first using a _____ element.</strong> A) root B) for-each C) context D) value-of <div style=padding-top: 35px>
Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance.
Craig used the code you suggested to create the cKey key. However, he says he encountering problems when he tries to use this key to actually display data from the candidates.xml external file using the key. You explain to him that he will have to explicitly change the context node to the root element of the candidates.xml file first using a _____ element.

A) root
B) for-each
C) context
D) value-of
Question
<strong>  Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance. Craig would like to add a key named precinctNames based on each votes element's precinct name. Which of the following elements do you recommend he add to the style sheet to create the key with the correct syntax?</strong> A) <xsl:key name=precinctNames match=//votes use=@precinct /> B) <xsl:key name=precinctNames match=//votes select=@precinct /> C) <xsl:key name=precinctNames match=//votes use=precinct /> D) <xsl:key name=precinctNames match=//votes select=precinct /> <div style=padding-top: 35px>
Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance.
Craig would like to add a key named precinctNames based on each votes element's precinct name. Which of the following elements do you recommend he add to the style sheet to create the key with the correct syntax?

A)
B)
C)
D)
Question
<strong>  Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an expression that moves up the node tree from the context node, selecting all of the elements that are order elements for the customer with the ID jbrown2738. Which of the following do you tell her is the correct expression?</strong> A) ancestor::order[custID=jbrown2738] B) preceding::order[custID=jbrown2738] C) parent::order[custID=jbrown2738] D) descendant::order[custID=jbrown2738] <div style=padding-top: 35px>
Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
Sandra would like to write an expression that moves up the node tree from the context node, selecting all of the elements that are order elements for the customer with the ID jbrown2738. Which of the following do you tell her is the correct expression?

A) ancestor::order[custID="jbrown2738"]
B) preceding::order[custID="jbrown2738"]
C) parent::order[custID="jbrown2738"]
D) descendant::order[custID="jbrown2738"]
Question
The _____ provides an expression that the node value should match.
Question
The _____ function generates a unique ID for a specified node set.
Question
One useful tool for debugging a style sheet is the XSLT 1.0 _____ element.

A) watch
B) message
C) token
D) breakpoint
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/91
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 7: Creating Element Groups
1
Templates with no mode attribute are applied to the specified node set.
True
2
The first step in using extensions is to define an extension's namespace within the root element.
False
3
In a step pattern, to go in a different direction from the context node you change the node-test value.
False
4
You can use the generate-id() function to create links for specific locations within a web page.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
5
In a predicate, the expressions are resolved relative to the context node.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
6
The key() function cannot be used with data from external documents.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
7
The node-test part of the step pattern specifies the direction the XSLT processor should move.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
8
Keys can be thought of as generalized IDs, without their limitations.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
9
All IDs belong to the same index, even if they are associated with different attributes.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
10
When an XSLT processor encounters two templates with the same name, it uses the last one defined in the style sheet.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
11
To create a template for a particular node, include the mode attribute in the opening tag.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
12
To reverse a node set, you use the XPath reverse() function.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
13
The default value for the axis portion of the step pattern is self .
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
14
Traditional IDs, such as Social Security numbers or ISBNs, are commonly declared as ID attributes in DTDs.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
15
A DTD provides a way to uniquely identify a particular item in the source document.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
16
You can support processors that do not recognize an extension element or attribute by using the fallback element.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
17
A community of XSLT developers created a standard collection of extension elements and extension functions called EXSLT .
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
18
Generated IDs are useful when the link has to reference an external page or website, but not for hypertext links within a single page.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
19
IDs can be associated only with elements .
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
20
Keys are declared in the style sheet, not in the DTD of the source document.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
21
The _____ attribute provides a way to uniquely identify a particular item in the source document.

A) title
B) unique
C) ID
D) object
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
22
When two templates can be applied to the same node set, you distinguish them by adding the _____ attribute within the tag.

A) mode
B) node
C) distinct
D) name
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
23
The syntax for declaring a required ID attribute is _____.

A)
B)
C)
D)
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
24
In a step pattern, the _____ specifies the direction in which the processor should move through the node tree.

A) predicate
B) node test
C) axis
D) template
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
25
To declare an ID attribute as optional in the source document's DTD, use the expression _____.

A)
B)
C)
D)
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
26
<strong>  The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image D?</strong> A) descendant B) child C) following D) following-sibling
The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image D?

A) descendant
B) child
C) following
D) following-sibling
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
27
If you designate one node set as $n1 and the other as $n2 , the expression: generate-id($n1) = generate-id($n2) returns a value of _____ if the node set referenced by $n1 is the same as the node set referenced by $n2 .

A) false
B) union
C) true
D) implied
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
28
<strong>  The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image A?</strong> A) ancestor-or-self B) ancestor C) preceding D) preceding-sibling
The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image A?

A) ancestor-or-self
B) ancestor
C) preceding
D) preceding-sibling
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
29
<strong>  The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image G?</strong> A) following B) descendant C) following-sibling D) preceding-sibling
The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image G?

A) following
B) descendant
C) following-sibling
D) preceding-sibling
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
30
In the generate-id() function, if you omit the node set argument, the function _____.

A) is applied to the current context node
B) is applied to the root node
C) is applied to all nodes
D) returns an error
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
31
The XML processor creates a(n) _____ that matches each element to a specific ID.

A) index
B) library
C) path
D) attribute
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
32
Once you generate the list of unique values, you can use the _____ element to write code to the result document for each unique value.

A) namespace
B) stylesheet
C) apply-templates
D) template
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
33
The general syntax of a step pattern is _____.

A) axis::predicate[node-test]
B) axis[node-test::predicate]
C) axis::node-test[predicate]
D) axis[predicate::node-test]
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
34
ID attributes must be valid XML names and, therefore, they cannot contain _____ or begin with numbers.

A) spaces
B) underscores
C) capital letters
D) mixed case letters
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
35
The _____ function returns a node-set that matches a specified value from a key index.

A) index()
B) key()
C) return()
D) id()
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
36
To generate an ID that identifies a specific node or node set within the source document, XPath provides the _____ function.

A) create-id()
B) set-id()
C) generate-id()
D) node-id()
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
37
<strong>  The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image J?</strong> A) preceding-sibling B) preceding C) ancestor D) following-sibling
The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image J?

A) preceding-sibling
B) preceding
C) ancestor
D) following-sibling
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
38
In a step pattern, the _____ defines properties of the node to be matched.

A) node test
B) predicate
C) axis
D) template
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
39
The abbreviated form of the step pattern self::node() is _____.

A) )
B) ).
C) )./
D) /
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
40
<strong>  The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image F?</strong> A) following-sibling B) descendant C) ancestor D) following
The accompanying figure shows a sample node set, with the context node shaded blue. In each image, the objects in the node set that are selected by a specific step pattern axis value are numbered and shaded in red. Which axis value is represented by image F?

A) following-sibling
B) descendant
C) ancestor
D) following
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
41
Keys have _____ as well as values, allowing the style sheet author to create multiple distinct keys rather than rely on a single index.

A) names
B) namespaces
C) IDs
D) attributes
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
42
In XPath 1.0, you cannot use the document() function or variables in a key element's _____ attribute.

A) use
B) name
C) match
D) select
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
43
The following expression uses a _____ key() function to return the count of all property elements from the city of Longmont: count(key("cityNames", "Longmont") ) .

A) compound
B) recursive
C) nested
D) complex
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
44
The _____ step to employ Muenchian grouping is to add the following expression to the select attribute of a for-each or an apply-templates element: node set[generate-id() =generate-id(key(name,expression) [1]) ] .

A) first
B) second
C) third
D) fourth
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
45
The key value itself does not have to be entered explicitly; it can also be inserted as a(n) _____ to a node in the source document.

A) pointer
B) reference
C) extension
D) ancestor
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
46
To create a key, add the key element at the top level of the style sheet as a child of the _____ element.

A) xml
B) stylesheet
C) root
D) output
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
47
Many XSLT processors support extension _____ that extend the data types associated with XSLT attributes.

A) functions
B) elements
C) attributes
D) attribute values
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
48
The first step in using extensions is to define an extension's namespace within the _____ element.

A) root
B) stylesheet
C) template
D) output
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
49
The expression to select the first property element from the city of Longmont is _____.

A) key("cityNames", "Longmont") [1]
B) key("cityNames", "Longmont") [0]
C) key("Longmont", "cityNames") [1]
D) key("Longmont", "cityNames") [0]
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
50
The _____ math extension functions in EXSLT calculates the nodes with the lowest value in node-set .

A) math.lowest( node-set )
B) math.min( node-set )
C) math.floor( node-set )
D) math.bottom( node-set )
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
51
When a processor encounters an extension element it does not recognize, it searches inside of that element for the _____ element.

A) fallback
B) else
C) default
D) catch
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
52
The _____ step to employ Muenchian grouping is to create a key for the element or attribute that you want to group using the key element.

A) first
B) second
C) third
D) fourth
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
53
If you want to use keys with an external document, you have to first change the _____ node so that it points to a location path within that document.

A) root
B) target
C) parent
D) context
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
54
The _____ attribute tells the XSLT processor which prefixes to regard as prefixes for extensions.

A) prefixes
B) extension-prefixes
C) extension-element-prefixes
D) xmlns
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
55
The key() function can also be used with a(n) _____ to select a specific node from a node set.

A) ID
B) index
C) predicate
D) DTD
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
56
You can test whether a processor supports a particular extension element or attribute using the _____ function

A) element-available()
B) available()
C) test-element()
D) element-check()
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
57
If you find it difficult to work with recursive templates, you can instead create loops in Saxon using the _____ extension.

A) loop
B) while
C) for-each
D) do-until
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
58
You can have your processor test whether it supports a particular extension function using the _____ function.

A) function-available()
B) available()
C) test-function()
D) function-check()
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
59
The _____ step to employ Muenchian grouping is to reference the group value using expression  where expression is the element or attribute used to group the node set.

A) first
B) second
C) third
D) fourth
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
60
Keys are declared in the _____.

A) DTD
B) source document
C) namespace
D) style sheet
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
61
_____ are location paths that allow the processor to move freely around the node tree in any direction.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
62
<strong>  Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance. Now that the candidatesDoc variable has been created, Craig would like to define a key named cKey based on the values of the candidateID attribute for the candidate. Which of the following do you tell him shows the correct syntax to use to define this key?</strong> A) <xsl:key name=cKey match=candidate use=@candidateID /> B) <xsl:key name=cKey match=candidate select=@candidateID /> C) <xsl:key name=cKey match=candidate use=candidateID /> D) <xsl:key name=cKey match=candidate select=candidateID />
Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance.
Now that the candidatesDoc variable has been created, Craig would like to define a key named cKey based on the values of the candidateID attribute for the candidate. Which of the following do you tell him shows the correct syntax to use to define this key?

A)
B)
C)
D)
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
63
<strong>  Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an expression to show only those orders that have a preceding sibling containing the same orderDate . Which of the following do you tell her is the correct expression?</strong> A) orderDate=preceding::order/orderDate B) not(orderDate=preceding::order/orderDate) C) orderDate=ancestor::order/orderDate D) not(orderDate=ancestor::order/orderDate)
Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
Sandra would like to write an expression to show only those orders that have a preceding sibling containing the same orderDate . Which of the following do you tell her is the correct expression?

A) orderDate=preceding::order/orderDate
B) not(orderDate=preceding::order/orderDate)
C) orderDate=ancestor::order/orderDate
D) not(orderDate=ancestor::order/orderDate)
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
64
The _____ function returns a node set based on IDs defined in the document's DTD.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
65
_____ is the processor used by Internet Explorer.

A) IEXML
B) MSXSLT
C) MSXML
D) IEXSLT
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
66
The _____ is an index based on a node specified in the match attribute using the values from a node specified in the use attribute.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
67
<strong>  Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an abbreviated expression to select the parent of the current context node. Which of the following do you tell her is the correct abbreviated expression?</strong> A) ) B) ). C) )./ D) *
Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
Sandra would like to write an abbreviated expression to select the parent of the current context node. Which of the following do you tell her is the correct abbreviated expression?

A) )
B) ).
C) )./
D) *
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
68
_____ is a programming technique in which nodes are grouped based on unique values taken from a key index matched to unique IDs created by the generate-id() function.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
69
Ancestor nodes have the same relation to parent nodes that _____ nodes have to child nodes.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
70
The _____ function returns a node-set that matches a specified value from a key index.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
71
<strong>  Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance. Craig would like to be able to use data from both documents in his application. You suggest he create variables that will allow him to pull the node sets from both files. Which of the following shows the correct syntax to create a variable named candidatesDoc to reference the root node of the candidates.xml file?</strong> A) <xsl:variable name=candidatesDoc match=document() 'candidates.xml')  /> B) <xsl:variable name=candidatesDoc select=doc('candidates.xml')  /> C) <xsl:variable name=candidatesDoc match=doc('candidates.xml')  /> D) <xsl:variable name=candidatesDoc select=document() 'candidates.xml')  />
Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance.
Craig would like to be able to use data from both documents in his application. You suggest he create variables that will allow him to pull the node sets from both files. Which of the following shows the correct syntax to create a variable named candidatesDoc to reference the root node of the candidates.xml file?

A)
B)
C)
D)
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
72
<strong>  Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an expression to create a node set of all the items elements. Which of the following do you tell her is the correct expression?</strong> A) orders::order/items B) items=order/items C) orders/order[items] D) orders::order/@items
Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
Sandra would like to write an expression to create a node set of all the items elements. Which of the following do you tell her is the correct expression?

A) orders::order/items
B) items=order/items
C) orders/order[items]
D) orders::order/@items
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
73
<strong>  Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance. Now that the precinctNames key has been declared, Craig would like to use it to return a count of all votes from the precinct of Ceylon. Which of the following functions do you suggest he use to do this?</strong> A) count(key=precinctNames select=Ceylon) B) count(key(precinctNames, Ceylon) ) C) count::precinctNames//Ceylon D) key(precinctNames, count(Ceylon) )
Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance.
Now that the precinctNames key has been declared, Craig would like to use it to return a count of all votes from the precinct of Ceylon. Which of the following functions do you suggest he use to do this?

A) count(key="precinctNames" select="Ceylon")
B) count(key("precinctNames", "Ceylon") )
C) count::precinctNames//"Ceylon"
D) key("precinctNames", count("Ceylon") )
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
74
<strong>  Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an expression to select the third order element that follows the context node as a sibling. Which of the following do you tell her is the correct expression?</strong> A) sibling::order[3] B) following::order[3] C) sibling-or-self::order[3] D) following-sibling::order[3]
Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
Sandra would like to write an expression to select the third order element that follows the context node as a sibling. Which of the following do you tell her is the correct expression?

A) sibling::order[3]
B) following::order[3]
C) sibling-or-self::order[3]
D) following-sibling::order[3]
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
75
<strong>  Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance. Craig used the code you suggested to create the cKey key. However, he says he encountering problems when he tries to use this key to actually display data from the candidates.xml external file using the key. You explain to him that he will have to explicitly change the context node to the root element of the candidates.xml file first using a _____ element.</strong> A) root B) for-each C) context D) value-of
Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance.
Craig used the code you suggested to create the cKey key. However, he says he encountering problems when he tries to use this key to actually display data from the candidates.xml external file using the key. You explain to him that he will have to explicitly change the context node to the root element of the candidates.xml file first using a _____ element.

A) root
B) for-each
C) context
D) value-of
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
76
<strong>  Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance. Craig would like to add a key named precinctNames based on each votes element's precinct name. Which of the following elements do you recommend he add to the style sheet to create the key with the correct syntax?</strong> A) <xsl:key name=precinctNames match=//votes use=@precinct /> B) <xsl:key name=precinctNames match=//votes select=@precinct /> C) <xsl:key name=precinctNames match=//votes use=precinct /> D) <xsl:key name=precinctNames match=//votes select=precinct />
Craig is working to develop an XSLT application to display election results, using XML files with the structures shown in the accompanying figure. He has heard that you have experience developing applications, and comes to you for guidance.
Craig would like to add a key named precinctNames based on each votes element's precinct name. Which of the following elements do you recommend he add to the style sheet to create the key with the correct syntax?

A)
B)
C)
D)
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
77
<strong>  Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an expression that moves up the node tree from the context node, selecting all of the elements that are order elements for the customer with the ID jbrown2738. Which of the following do you tell her is the correct expression?</strong> A) ancestor::order[custID=jbrown2738] B) preceding::order[custID=jbrown2738] C) parent::order[custID=jbrown2738] D) descendant::order[custID=jbrown2738]
Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
Sandra would like to write an expression that moves up the node tree from the context node, selecting all of the elements that are order elements for the customer with the ID jbrown2738. Which of the following do you tell her is the correct expression?

A) ancestor::order[custID="jbrown2738"]
B) preceding::order[custID="jbrown2738"]
C) parent::order[custID="jbrown2738"]
D) descendant::order[custID="jbrown2738"]
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
78
The _____ provides an expression that the node value should match.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
79
The _____ function generates a unique ID for a specified node set.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
80
One useful tool for debugging a style sheet is the XSLT 1.0 _____ element.

A) watch
B) message
C) token
D) breakpoint
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 91 flashcards in this deck.