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. Returns true if str2 appears anywhere inside str1
timezone-from-time(time)
processor application
upper-case(str)
matches(str1, str2)
2. Returns 2008
timezone-from-time(time)
path
processor application
year-from-date(current-date())
3. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
replace(str1, str2, str3)
month-from-date(current-date())
//title | //price
processing-instruction
4. Selects attributes
@
timezone-from-time(time)
translate(str1, str2, str3)
current-dateTime()
5. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
abs(num)
Xpath operators
processor application
remove((item1, item2, item3...), position)
6. The XPath division operator not "/" cuz "/" is used in path expressions
.
syntax
upper-case(str)
div
7. XPath is a for defining parts of an XML document
starts-with(str1, str2)
syntax
not(arg)
lower-case(str)
8. Selects all title elements of the book element AND all price elements in the entire document
//title[@*]
ceiling(num)
/bookstore/book/title | //price
instinct-values(item1, item2, item3...))
9. Selects from the root node
'/'
10. selects first book element from the children of books element
standard function
arrays and functions
//title | //price
books/book[1]
11. Converts string number to numeric value
number(arg)
syntax
criteria
usable document
12. Returns minute value from time passed
standard function
substring-after(str1, str2)
month-from-date(date)
minutes-from-time(time)
13. Selects all the child nodes of the bookstore element
number(arg)
Predicates
compare(arg1, arg2)
/bookstore/*
14. Returns substring from start position to end of string
//book[@isbn]
substring(str,start)
syntax
/bookstore/*
15. A predicate is used by is used by adding square brackets [ ] to the end of a path or portion of a path - and adding ________ inside the brackets
matches(str1, str2)
ends-with(str1, str2)
criteria
number(arg)
16. ________ allow more specific selections within the XPath
Predicates
floor(num)
abs(num)
boolean(arg)
17. Selects all title AND price elements in the entire document
replace(str1, str2, str3)
round(num)
@
//title | //price
18. Returns October or 10 ?
usable document
lower-case(str)
replace(str1, str2, str3)
month-from-date(current-date())
19. Returns time right now
string(arg)
upper-case(str)
current-time()
seconds-from-time(time)
20. Replaces chars of str2 found in str1 with chars of str3
substring-before(str1, str2)
hours-from-time(time)
syntax
translate(str1, str2, str3)
21. Returns length of current node string
string-length()
child nodes
'//'
transforming
22. Converts string to lower case
upper-case(str)
month-from-date(current-date())
boolean(arg)
lower-case(str)
23. Selects last book element from the children of books element
criteria
string(arg)
books/book[price > 35.00]
books/book[last()]
24. Returns timezone value from time passed
substring-after(str1, str2)
path
timezone-from-time(time)
/bookstore/*
25. Converts string to upper case
upper-case(str)
criteria
translate(str1, str2, str3)
substring(str1, start, len)
26. Returns length of passed string
processor application
string-length(str)
minutes-from-time(time)
'/'
27. Returns true if str1 ends with str2
//book[@isbn]
child nodes
usable document
ends-with(str1, str2)
28. Selects parent of current node
//book/title | //book/price
normalize-space(str)
..
standard function
29. Selects all book elements with a child element "price" with values greater than 35
current-date()
books/book[1]
books/book[price > 35.00]
substring-before(str1, str2)
30. Returns everything before the first occurrence of str2
matches(str1, str2)
substring-before(str1, str2)
child nodes
processor application
31. Sibling nodes all have the same ______
remove((item1, item2, item3...), position)
starts-with(str1, str2)
upper-case(str)
parent
32. Returns next highest integer
abs(num)
translate(str1, str2, str3)
ceiling(num)
/bookstore/book/title | //price
33. Returns hour value from time passed
hours-from-time(time)
day-from-date(date)
round(num)
substring(str,start)
34. Returns n-length substring from start position
trees of nodes
substring(str1, start, len)
normalize-space(str)
sequence
35. Trims leading and trailing spaces
arrays and functions
lower-case(str)
normalize-space(str)
index-of((item1, item2), item3...), target)
36. Returns today's date
arrays and functions
string(arg)
normalize-space(str)
current-date()
37. Converts value to a string
.
div
current-date()
string(arg)
38. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
ceiling(num)
concat(str1, str2, str3...)
@
compare(arg1, arg2)
39. XPath is a major element in _______
Predicates
XSLT
substring(str,start)
month-from-date(date)
40. Returns false or true
processing-instruction
parent
current-dateTime()
boolean(arg)
41. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
index-of((item1, item2), item3...), target)
round(num)
criteria
remove((item1, item2, item3...), position)
42. Returns true if str1 contains str2
transformation
.
processor application
contains(str1, str2)
43. Selects all title elements which have any attribute
books/book[price > 35.00]
//title[@*]
current-dateTime()
standard function
44. Transformation is actually accomplished by a _____________ like Saxon XSLT
trees of nodes
usable document
processor application
current-dateTime()
45. Selects current node
.
div
//title | //price
current-date()
46. In str1, replaces all occurrences of str2 with str3
string-join((str1, str2, str3), separator)
replace(str1, str2, str3)
/bookstore/book/title | //price
//book/title | //book/price
47. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
transforming
not(arg)
hours-from-time(time)
year-from-date(date)
48. Selects all book elements with an attribute isbn=
books/book[last()]
month-from-date(current-date())
substring(str1, start, len)
//book[@isbn]
49. Returns day value from date passed
path
day-from-date(date)
substring(str,start)
compare(arg1, arg2)
50. Returns false if true - true if false (negative logic)
not(arg)
sequence
replace(str1, str2, str3)
index-of((item1, item2), item3...), target)