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 time right now
processor application
minutes-from-time(time)
year-from-date(date)
current-time()
2. Selects all title AND price elements of all book elements
number(arg)
timezone-from-time(time)
ends-with(str1, str2)
//book/title | //book/price
3. Returns 2008
year-from-date(current-date())
instinct-values(item1, item2, item3...))
'/'
@
4. Returns everything after the first occurrence of str2
Xpath operators
substring-after(str1, str2)
/bookstore/book/title | //price
substring-before(str1, str2)
5. Sibling nodes all have the same ______
transforming
number(arg)
parent
insert-before((item1, item2, item3...), positionX, itemX)
6. Returns n-length substring from start position
current-time()
instinct-values(item1, item2, item3...))
compare(arg1, arg2)
substring(str1, start, len)
7. Replaces chars of str2 found in str1 with chars of str3
//title[@*]
translate(str1, str2, str3)
processor application
current-time()
8. The XPath division operator not "/" cuz "/" is used in path expressions
XSLT
div
timezone-from-time(time)
insert-before((item1, item2, item3...), positionX, itemX)
9. Selects all elements in the document
//*
string-length(str)
books/book[position()
substring-after(str1, str2)
10. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
instinct-values(item1, item2, item3...))
index-of((item1, item2), item3...), target)
'/'
path
11. Returns month value out of date passed
month-from-date(date)
sequence
month-from-date(current-date())
arrays and functions
12. Selects all title elements which have any attribute
//title[@*]
true() and false()
minutes-from-time(time)
//title | //price
13. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
day-from-date(date)
'//'
sequence
path expressions
14. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
year-from-date(current-date())
/bookstore/book/title | //price
insert-before((item1, item2, item3...), positionX, itemX)
transforming
15. Returns true if str1 ends with str2
compare(arg1, arg2)
path expressions
year-from-date(date)
ends-with(str1, str2)
16. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
Predicates
processing-instruction
XSLT
year-from-date(current-date())
17. Returns complete date/time
index-of((item1, item2), item3...), target)
'/'
.
current-dateTime()
18. Trims leading and trailing spaces
normalize-space(str)
string-length()
concat(str1, str2, str3...)
transformation
19. Returns boolean true or boolean false
'//'
true() and false()
number(arg)
@
20. Converts string to upper case
round(num)
compare(arg1, arg2)
upper-case(str)
books/book[1]
21. Selects parent of current node
upper-case(str)
..
Xpath operators
/bookstore/book/title | //price
22. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
Xpath operators
/bookstore/*
//title[@*]
Predicates
23. Compares strings, returns 0 if same, -1 if not same
compare(arg1, arg2)
//*
abs(num)
parent
24. XPath is a major element in _______
arrays and functions
/bookstore/*
day-from-date(date)
XSLT
25. every element and every attribute have just one _________
month-from-date(date)
substring(str,start)
contains(str1, str2)
parent node
26. Converts value to a string
string(arg)
remove((item1, item2, item3...), position)
insert-before((item1, item2, item3...), positionX, itemX)
replace(str1, str2, str3)
27. Selects from the root node
'/'
28. Returns today's date
nodes
abs(num)
arrays and functions
current-date()
29. Returns timezone value from time passed
..
minutes-from-time(time)
timezone-from-time(time)
replace(str1, str2, str3)
30. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
parent node
attribute node
upper-case(str)
processor application
31. Selects all book elements with a child element "price" with values greater than 35
criteria
transformation
sequence
books/book[price > 35.00]
32. Selects all title AND price elements in the entire document
//title | //price
processor application
substring-before(str1, str2)
abs(num)
33. Converts string number to numeric value
number(arg)
matches(str1, str2)
..
/bookstore/*
34. Travels from current node to select nodes that match - wherever they are
35. Returns absolute value (example abs(-2.5) returns 2.5
books/book[1]
sequence
abs(num)
normalize-space(str)
36. Returns October or 10 ?
translate(str1, str2, str3)
contains(str1, str2)
sequence
month-from-date(current-date())
37. Selects last book element from the children of books element
books/book[last()]
/bookstore/*
index-of((item1, item2), item3...), target)
number(arg)
38. xpath function categories: numeric - string - boolea - date/time - ________
sequence
timezone-from-time(time)
string(arg)
arrays and functions
39. Selects attributes
//book/title | //book/price
@
ceiling(num)
path expressions
40. Selects all the child nodes of the bookstore element
not(arg)
boolean(arg)
/bookstore/*
//book[@isbn]
41. Converts string to lower case
compare(arg1, arg2)
/bookstore/book/title | //price
lower-case(str)
instinct-values(item1, item2, item3...))
42. Returns length of passed string
processing-instruction
contains(str1, str2)
string-length(str)
/bookstore/book/title | //price
43. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
matches(str1, str2)
..
insert-before((item1, item2, item3...), positionX, itemX)
day-from-date(date)
44. 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
remove((item1, item2, item3...), position)
criteria
transforming
boolean(arg)
45. Returns false if true - true if false (negative logic)
contains(str1, str2)
Predicates
not(arg)
current-date()
46. Returns minute value from time passed
boolean(arg)
replace(str1, str2, str3)
minutes-from-time(time)
'//'
47. Returns length of current node string
normalize-space(str)
.
string-length()
current-date()
48. Concatenates strings together with separator between each string
string-join((str1, str2, str3), separator)
string-length(str)
hours-from-time(time)
substring-before(str1, str2)
49. Returns true if str2 appears anywhere inside str1
books/book[last()]
standard function
matches(str1, str2)
//title | //price
50. In str1, replaces all occurrences of str2 with str3
seconds-from-time(time)
//*
month-from-date(date)
replace(str1, str2, str3)