SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
XML XPATH
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. In str1, replaces all occurrences of str2 with str3
/bookstore/book/title | //price
normalize-space(str)
lower-case(str)
replace(str1, str2, str3)
2. Selects all book elements with an attribute isbn=
path
//book[@isbn]
/bookstore/*
instinct-values(item1, item2, item3...))
3. Selects all title AND price elements in the entire document
XSLT
year-from-date(date)
//title | //price
translate(str1, str2, str3)
4. Concatenates strings together with separator between each string
translate(str1, str2, str3)
string-length()
parent
string-join((str1, str2, str3), separator)
5. Returns month value out of date passed
round(num)
/bookstore/book/title | //price
Xpath operators
month-from-date(date)
6. Returns everything after the first occurrence of str2
path expressions
substring-after(str1, str2)
standard function
current-date()
7. The XPath division operator not "/" cuz "/" is used in path expressions
upper-case(str)
div
matches(str1, str2)
trees of nodes
8. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
books/book[position()
concat(str1, str2, str3...)
substring-after(str1, str2)
attribute node
9. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
ends-with(str1, str2)
arrays and functions
//book[@isbn]
remove((item1, item2, item3...), position)
10. Returns year value out of the date passed
hours-from-time(time)
string-length()
index-of((item1, item2), item3...), target)
year-from-date(date)
11. Transformation is actually accomplished by a _____________ like Saxon XSLT
matches(str1, str2)
/bookstore/*
processor application
trees of nodes
12. Selects all elements in the document
number(arg)
//*
books/book[1]
books/book[position()
13. Selects all title AND price elements of all book elements
floor(num)
boolean(arg)
normalize-space(str)
//book/title | //book/price
14. XPath is a for defining parts of an XML document
syntax
true() and false()
Xpath operators
path
15. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
.
transforming
not(arg)
standard function
16. every element and every attribute have just one _________
parent node
books/book[price > 35.00]
criteria
upper-case(str)
17. Returns true if str1 contains str2
index-of((item1, item2), item3...), target)
contains(str1, str2)
floor(num)
//title[@*]
18. Returns absolute value (example abs(-2.5) returns 2.5
abs(num)
timezone-from-time(time)
Xpath operators
floor(num)
19. selects first book element from the children of books element
books/book[1]
matches(str1, str2)
translate(str1, str2, str3)
criteria
20. ________ allow more specific selections within the XPath
syntax
Predicates
processing-instruction
compare(arg1, arg2)
21. Selects all book elements with a child element "price" with values greater than 35
ceiling(num)
boolean(arg)
books/book[price > 35.00]
substring(str,start)
22. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
sequence
//*
attribute node
//title[@*]
23. Selects first two book elements from the children of books element
parent node
books/book[position()
day-from-date(date)
usable document
24. Travels from current node to select nodes that match - wherever they are
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
25. Returns false if true - true if false (negative logic)
not(arg)
year-from-date(date)
div
books/book[last()]
26. Returns false or true
books/book[price > 35.00]
boolean(arg)
Xpath operators
/bookstore/book/title | //price
27. Selects parent of current node
div
replace(str1, str2, str3)
string(arg)
..
28. Sibling nodes all have the same ______
parent
timezone-from-time(time)
string-join((str1, str2, str3), separator)
/bookstore/book/title | //price
29. The process of taking raw XML - adding XSL - and outputting a document file of some type
not(arg)
year-from-date(date)
transformation
parent node
30. Element nodes may have zero - one - or more _________
child nodes
translate(str1, str2, str3)
ends-with(str1, str2)
standard function
31. Converts value to a string
books/book[1]
lower-case(str)
parent
string(arg)
32. Selects all title elements which have any attribute
standard function
//title | //price
//title[@*]
transformation
33. Returns hour value from time passed
hours-from-time(time)
year-from-date(current-date())
string(arg)
@
34. Returns second value from time passed
seconds-from-time(time)
processor application
substring-before(str1, str2)
criteria
35. Converts string number to numeric value
path expressions
abs(num)
criteria
number(arg)
36. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
insert-before((item1, item2, item3...), positionX, itemX)
arrays and functions
compare(arg1, arg2)
criteria
37. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
trees of nodes
'//'
path expressions
month-from-date(date)
38. Returns length of current node string
lower-case(str)
round(num)
books/book[position()
string-length()
39. Returns next lowest integer
books/book[last()]
boolean(arg)
Xpath operators
floor(num)
40. Compares strings, returns 0 if same, -1 if not same
string-length(str)
floor(num)
compare(arg1, arg2)
nodes
41. Selects current node
transforming
substring(str1, start, len)
.
nodes
42. Returns true if str1 starts with str2
starts-with(str1, str2)
floor(num)
arrays and functions
books/book[price > 35.00]
43. Selects attributes
contains(str1, str2)
standard function
@
books/book[position()
44. Returns everything before the first occurrence of str2
substring-before(str1, str2)
criteria
child nodes
concat(str1, str2, str3...)
45. Selects all the child nodes of the bookstore element
/bookstore/*
upper-case(str)
translate(str1, str2, str3)
starts-with(str1, str2)
46. Returns timezone value from time passed
Predicates
minutes-from-time(time)
timezone-from-time(time)
books/book[1]
47. Replaces chars of str2 found in str1 with chars of str3
starts-with(str1, str2)
//title[@*]
abs(num)
translate(str1, str2, str3)
48. Converts string to lower case
lower-case(str)
//book/title | //book/price
timezone-from-time(time)
@
49. _______ have 3 primary relationships: parent - child - sibling
ends-with(str1, str2)
processor application
nodes
string-join((str1, str2, str3), separator)
50. Returns minute value from time passed
minutes-from-time(time)
parent
//title[@*]
standard function